* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #002D6C;
    --primary-light: #0a4a9e;
    --primary-dark: #001d47;
    --primary-bg: rgba(0, 45, 108, 0.06);
    --primary-bg-hover: rgba(0, 45, 108, 0.1);

    --white: #FFFFFF;
    --bg: #FFFFFF;
    --bg-secondary: #f8f9fb;
    --bg-card: #FFFFFF;

    --text-primary: #1a1a2e;
    --text-secondary: #4a4a6a;
    --text-muted: #8a8aa0;
    --text-on-primary: #FFFFFF;

    --border: #e2e4ea;
    --border-light: #f0f1f4;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 8px 28px rgba(0, 0, 0, 0.12);

    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    --max-width: 1280px;
    --header-height: 72px;
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    width: 100%;
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-base);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* Header */
.header {
    height: var(--header-height);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo-img {
    height: 44px;
    filter: brightness(0) invert(1);
}

.header-logo-text {
    display: flex;
    flex-direction: column;
}

.header-logo-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.header-logo-sub {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 500;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-nav-link {
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.8;
}

.header-nav-link:hover,
.header-nav-link.active {
    opacity: 1;
    color: #60a5fa;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-nav-toggle svg {
    width: 28px;
    height: 28px;
}

.header-user {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

/* Home Hero */
.home-page {
    padding: var(--space-xl) 0;
}

.home-hero {
    margin-bottom: var(--space-xl);
    text-align: center;
    padding: 0 10px;
}

.home-hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: var(--space-xs);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.home-hero-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Filter Area */
.filter-area {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 45, 108, 0.05);
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-toggle-header {
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: #f8fafc;
    border-bottom: 1px solid transparent;
}

.filter-toggle-header:hover {
    background: #f1f5f9;
}

.filter-area.is-open .filter-toggle-header {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
}

.filter-toggle-left {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 800;
    color: var(--primary);
    font-size: 1.05rem;
}

.filter-toggle-left svg {
    color: var(--primary);
    filter: drop-shadow(0 2px 4px rgba(0, 45, 108, 0.1));
}

.filter-count {
    background: var(--primary-light);
    color: white;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.filter-toggle-right svg {
    transition: transform 0.4s ease;
    color: var(--text-muted);
}

.filter-area.is-open .filter-toggle-right svg {
    transform: rotate(180deg);
    color: var(--primary);
}

.filter-content {
    max-height: 0;
    opacity: 0;
    padding: 0 28px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
}

.filter-area.is-open .filter-content {
    max-height: 2000px;
    opacity: 1;
    padding: 32px 28px;
}

.filter-section {
    margin-bottom: 32px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section-title {
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #eee, transparent);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    padding: 10px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.filter-chip:hover {
    background: #fff;
    border-color: #cbd5e1;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.filter-chip.active:hover {
    filter: brightness(1.1);
    color: white;
}

/* Selected Filters */
.selected-filters {
    padding-top: 16px;
    border-top: 1px dashed var(--border);
    margin-top: 8px;
}

.selected-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.selected-filters-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.clear-all-btn {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--danger);
}

.selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--primary-bg);
    color: var(--primary);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid rgba(0, 45, 108, 0.1);
}

.selected-chip a {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 2px;
}

/* Search Box */
.search-box {
    margin-bottom: var(--space-lg);
    position: relative;
}

.search-input-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.search-input-wrapper svg {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 56px;
    padding: 0 56px 0 64px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 45, 108, 0.08);
}

/* Results Header */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding: 0 4px;
}

.results-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.results-count {
    font-size: 1rem;
    color: var(--text-secondary);
}

.results-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.export-btns {
    display: flex;
    gap: 8px;
}

@media (max-width: 500px) {
    .export-btns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
        gap: 8px;
    }
}

/* Facility Grid */
.facility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
}

/* Facility Card */
.facility-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.facility-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--primary-light);
}

.facility-card-image {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.facility-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.facility-card:hover .facility-card-image img {
    transform: scale(1.1);
}

.facility-card-placeholder {
    height: 100%;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    gap: 12px;
}

.facility-card-type-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 4px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.facility-card-body {
    padding: 20px;
}

.facility-card-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.facility-card-info {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.facility-card-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.facility-card-address {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.facility-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.facility-card-district {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

.facility-card-gsb-badge {
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
}

.facility-card-gsb-badge.gsb {
    background: #dcfce7;
    color: #15803d;
}

.facility-card-cost-overview {
    background: #f0fdf4;
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    border: 1px solid #dcfce7;
}

.facility-card-cost {
    font-weight: 700;
    color: #15803d;
    font-size: 0.95rem;
}

.facility-card-detail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-weight: 700;
    color: var(--primary);
    font-size: 0.88rem;
    transition: all 0.2s;
}

.facility-card:hover .facility-card-detail-btn {
    background: var(--primary);
    color: white;
}

/* Detail Page */
.facility-detail-page {
    padding: var(--space-xl) 0;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.detail-content {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.detail-main-info {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-xl);
    padding: var(--space-xl);
}

.detail-image-section {
    position: relative;
    height: 480px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.detail-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-gsb-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.95rem;
    box-shadow: var(--shadow-lg);
    color: white;
}

.detail-gsb-badge.gsb {
    background: var(--success);
}

.detail-gsb-badge.non-gsb {
    background: var(--warning);
}

.detail-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

.detail-info-item {
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.detail-info-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.detail-info-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
}

.detail-info-item.highlight-cost {
    background: #f0fdf4;
    border-color: #dcfce7;
}

.detail-address-section {
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.detail-address-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-weight: 700;
}

/* Login */
.login-page {
    min-height: calc(100vh - var(--header-height) - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 480px;
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px;
        box-shadow: none;
        border: 1px solid var(--border-light);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    height: 64px;
    margin-bottom: 16px;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.login-error {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #ef4444;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 24px;
    font-weight: 500;
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea,
.sort-select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-primary);
    background-color: white;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    cursor: text;
}

.form-select,
.sort-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    cursor: pointer;
    padding-right: 40px;
}

.sort-select {
    width: auto;
    min-width: 200px;
    padding: 8px 40px 8px 16px;
    height: 40px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: 10px;
}

.form-input:focus,
.form-select:focus,
.sort-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    background-color: #fff;
}

.sort-select:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
}

/* Admin */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-light);
}

.admin-page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.admin-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-end;
}

.admin-filter-row {
    width: 100%;
}

.admin-actions-row {
    display: flex;
    gap: 12px;
}

.table-container {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    background: var(--bg-secondary);
    padding: 16px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.table td {
    padding: 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-light);
    white-space: normal;
}

.actions-cell {
    text-align: right;
    vertical-align: middle !important;
}

.actions-wrapper {
    display: inline-flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.table tr:hover td {
    background: var(--primary-bg);
}

.table-img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.footer {
    padding: 60px 0;
    background: var(--primary);
    color: white;
    margin-top: 60px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    height: 44px;
    filter: brightness(0) invert(1);
    opacity: 1;
}

.footer-brand {
    font-weight: 800;
    color: white;
}

.footer-copy {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Misc */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out backwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image Modal */
.image-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.image-modal-content {
    position: relative;
    max-width: 1200px;
    width: 100%;
}

.image-modal-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 32px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .header-logo-sub {
        display: none;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .header-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #001a3d;
        padding: 80px 30px;
        gap: 20px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    }

    .header-nav.is-visible {
        right: 0;
    }

    .header-nav-link {
        font-size: 1.1rem;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .header-user {
        margin: 10px 0;
        display: inline-block;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .results-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .sort-dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .sort-dropdown label {
        font-weight: 700;
        font-size: 0.85rem;
    }

    .sort-select {
        width: 100% !important;
        min-width: 0 !important;
    }

    .results-actions .btn {
        width: 100%;
    }

    .home-hero-title {
        font-size: 1.6rem;
    }

    .detail-main-info {
        grid-template-columns: 1fr;
    }

    .detail-image-section {
        height: 280px;
    }

    .back-btn {
        margin-left: 0;
        margin-bottom: 20px;
    }

    .detail-page {
        padding-top: 20px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 40px 20px;
    }

    .footer-left {
        flex-direction: column;
        gap: 12px;
    }

    .footer-logo {
        margin: 0 auto;
    }

    .footer-copy {
        font-size: 0.8rem;
        opacity: 0.8;
    }

    .admin-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        text-align: center;
    }

    .admin-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        text-align: center;
        background: white;
        padding: 4px 0 24px;
    }

    .admin-controls {
        align-items: stretch;
        gap: 12px;
    }

    .admin-filter-row {
        margin-bottom: 4px;
    }

    .admin-actions-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .admin-actions-row .btn {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 20px 10px;
        font-size: 0.85rem;
        height: auto;
        border-radius: 16px;
        text-align: center;
        line-height: 1.3;
        margin: 0;
        box-shadow: var(--shadow-sm);
    }

    .admin-actions-row .btn span {
        font-size: 1.75rem;
    }

    .admin-filter-row .sort-select {
        width: 100% !important;
        height: 54px;
        font-size: 1.05rem;
        text-align: center;
        padding-left: 20px;
        background-position: right 20px center;
        border-radius: 14px;
        background-color: #f8fafc;
    }

    .table-container {
        margin: 0 -20px 24px -20px;
        width: calc(100% + 40px);
        display: block !important;
        overflow-x: auto !important;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch !important;
        position: relative;
        background: white;
    }

    .table {
        width: 1200px !important;
        min-width: 1200px !important;
        table-layout: auto;
    }

    .table th,
    .table td {
        padding: 16px 20px;
        font-size: 0.9rem;
        white-space: nowrap !important;
    }

    /* Column widths to ensure they don't collapse */
    .table th:nth-child(1),
    .table td:nth-child(1) {
        min-width: 120px;
    }

    .table th:nth-child(2),
    .table td:nth-child(2) {
        min-width: 300px;
    }

    .table th:nth-child(3),
    .table td:nth-child(3) {
        min-width: 150px;
    }

    .table th:nth-child(4),
    .table td:nth-child(4) {
        min-width: 150px;
    }

    /* Tür */
    .table th:nth-child(5),
    .table td:nth-child(5) {
        width: 200px;
    }

    /* Mülkiyet */
    .table th:nth-child(6),
    .table td:nth-child(6) {
        width: 130px;
    }

    /* Maliyet */
    .table th:nth-child(7),
    .table td:nth-child(7) {
        width: 120px;
    }

    /* İşlemler */


    .table-img {
        width: 48px;
        height: 48px;
    }

    .facility-grid {
        grid-template-columns: 1fr;
    }
}

/* PDF Report Styles (Mirroring React Version) */
.pdf-report-container {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 210mm;
    background: #f4f4f4;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

.pdf-page {
    width: 210mm;
    height: 297mm;
    background: white;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    page-break-after: always;
    overflow: hidden;
}

.pdf-header {
    background-color: #002D6C;
    color: white;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 0 40px;
}

.pdf-logo {
    height: 54px;
    width: auto;
    object-fit: contain;
}

.pdf-header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.pdf-header-text h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.pdf-header-text p {
    margin: 4px 0 0;
    font-size: 10px;
    opacity: 0.9;
}

.pdf-summary-bar {
    background: #f8f9fa;
    padding: 8px 30px;
    border-bottom: 2px solid #002D6C;
    display: flex;
    justify-content: space-between;
}

.pdf-summary-title {
    font-size: 11px;
    font-weight: 700;
    color: #002D6C;
}

.pdf-summary-filters {
    font-size: 8px;
    color: #666;
}

.pdf-grid {
    flex: 1;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 82mm);
    gap: 15px;
}

.pdf-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pdf-card-image-container {
    position: relative;
    height: 42mm;
    background: #f0f0f0;
}

.pdf-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-card-badge-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.pdf-card-badge-overlay.gsb {
    background: #15803d;
}

.pdf-card-badge-overlay.non-gsb {
    background: #f59e0b;
}

.pdf-card-body {
    padding: 10px 14px;
    flex: 1;
}

.pdf-card-name {
    font-size: 12px;
    font-weight: 800;
    color: #002D6C;
    margin-bottom: 8px;
}

.pdf-card-row {
    font-size: 10px;
    margin-bottom: 4px;
    display: flex;
}

.pdf-card-row strong {
    width: 70px;
    flex-shrink: 0;
    color: #002D6C;
}

.pdf-footer {
    padding: 10px 30px;
    text-align: right;
    font-size: 8px;
    color: #999;
    border-top: 1px solid #f0f0f0;
}

/* Admin Modals */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 45, 108, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 900px;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.perm-group {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
}

.perm-category-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(0, 45, 108, 0.1);
}

.perm-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s;
}

.perm-item:hover {
    color: var(--primary);
}

.perm-check-input {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

@media (max-width: 992px) {
    .permission-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .permission-grid {
        grid-template-columns: 1fr;
    }

    .modal-card {
        max-width: 95%;
    }
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    background: var(--primary);
    padding: 24px;
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
}

.modal-body {
    padding: 32px;
}

.modal-footer {
    padding: 20px 32px;
    background: var(--bg-secondary);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid var(--border-light);
}