/* 甘肃酒泉中学宿舍管理系统 —— 主界面样式 */
/* originally inline in index.html; 抽出后 index.html 少了 1200+ 行 */
.draggable-student:hover { background: rgba(64, 158, 255, 0.12); }
.draggable-student:active { cursor: grabbing; }
.dorm-drop-hover { transform: translateY(-2px); }
:root {
    --primary-color: #059669;
    --primary-dark: #047857;
    --primary-light: #d1fae5;
    --secondary-color: #0d9488;
    --secondary-dark: #0f766e;
    --danger-color: #dc2626;
    --danger-dark: #b91c1c;
    --danger-light: #fee2e2;
    --warning-color: #d97706;
    --warning-dark: #b45309;
    --warning-light: #fef3c7;
    --info-color: #0284c7;
    --info-dark: #0369a1;
    --info-light: #e0f2fe;
    --success-color: #16a34a;
    --success-dark: #15803d;
    --success-light: #dcfce7;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #f8fafc;
    --sidebar-bg: #064e3b;
    --sidebar-bg-light: #065f46;
    --sidebar-border: rgba(167, 243, 208, 0.22);
    --bg-primary: #ffffff;
    --bg-secondary: #e8f4ee;
    --bg-tertiary: #ecfdf5;
    --border-color: #cbd5e1;
    --border-light: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 24px rgba(15, 23, 42, 0.10);
    --shadow-xl: 0 18px 36px rgba(15, 23, 42, 0.12);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

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

#mobileMenuBtn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: var(--bg-primary);
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
}

#mobileMenuBtn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-xl);
}

.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    min-height: 100vh;
    padding: 24px 16px;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--sidebar-border);
}

.sidebar.closed {
    transform: translateX(-100%);
}

.sidebar-header {
    text-align: center;
    padding: 16px 0 24px;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 20px;
}

.sidebar-header h1 {
    color: var(--text-white);
    font-size: 1.1em;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.sidebar-header .logo {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: none;
    background: transparent;
    color: var(--text-white);
    cursor: pointer;
    font-size: 14px;
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-weight: 500;
    opacity: 0.85;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    transform: translateX(4px);
    opacity: 1;
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 8px 18px rgba(5, 150, 105, 0.24);
    transform: translateX(0);
}

.nav-item.active:hover {
    background: var(--primary-dark);
}

.nav-item .icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.nav-item .text {
    flex: 1;
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--sidebar-border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-white);
}

.user-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.24);
}

.user-info .welcome {
    flex: 1;
    font-size: 13px;
}

.user-info .role {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 11px 14px;
    border: none;
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-dark);
    transform: translateX(4px);
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 32px;
    min-height: 100vh;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.page-title {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title::before {
    content: '';
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 2px;
}

@media (max-width: 768px) {
    #mobileMenuBtn {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 60px;
    }
    
    .page-title {
        font-size: 1.5em;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        padding: 15px;
        padding-top: 70px;
    }
    
    .page-title {
        font-size: 1.3em;
    }
}

.section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.section.active {
    display: block;
}

.scroll-container {
    overflow: auto !important;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 #e2e8f0;
}

.map-zoom-stage {
    display: block;
    position: relative;
    min-width: 100%;
    min-height: 100%;
}

.map-scroll-spacer {
    display: block;
    pointer-events: none;
}

.map-zoom-target {
    display: inline-block;
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    transition: transform 0.2s ease;
}

.scroll-container::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.scroll-container::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 6px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 6px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    overflow: visible !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

h2 {
    color: var(--text-primary);
    margin-bottom: 22px;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    position: relative;
    padding-bottom: 12px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: inline-block;
    margin-right: 10px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
input[type="password"],
select,
textarea {
    padding: 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-right: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-right: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.18);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.24);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.18);
}

.btn-success:hover {
    background: var(--secondary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 118, 110, 0.24);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.16);
}

.btn-danger:hover {
    background: var(--danger-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.22);
}

.btn-info {
    background: var(--info-color);
    color: white;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.16);
}

.btn-info:hover {
    background: var(--info-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.22);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.16);
}

.btn-warning:hover {
    background: var(--warning-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(217, 119, 6, 0.22);
}

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

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-link {
    background: transparent;
    color: var(--primary-color);
    text-decoration: underline;
    padding: 6px 12px;
}

.btn-link:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    margin-right: 6px;
}

.search-input {
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    width: 220px;
    margin-left: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.table-scroll-wrapper {
    max-height: 560px;
    overflow: auto;
    margin-top: 20px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

th {
    background: var(--bg-tertiary);
    color: #334155;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.table-sort-btn {
    width: 100%;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    padding: 0;
}

.table-sort-btn:hover {
    color: var(--primary-color);
}

th:first-child {
    border-radius: var(--radius-lg) 0 0 0;
}

th:last-child {
    border-radius: 0 var(--radius-lg) 0 0;
}

td {
    color: var(--text-primary);
    font-size: 14px;
}

tr:hover {
    background: rgba(5, 150, 105, 0.04);
}

tr:last-child td {
    border-bottom: none;
}

tr:last-child td:first-child {
    border-radius: 0 0 0 var(--radius-lg);
}

tr:last-child td:last-child {
    border-radius: 0 0 var(--radius-lg) 0;
}

.sort-controls {
    display: flex;
    flex-direction: column;
    font-size: 11px;
}

.sort-arrow {
    cursor: pointer;
    padding: 1px 4px;
    border-radius: 2px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.sort-arrow:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

.sort-arrow.active {
    color: white;
    background: rgba(255, 255, 255, 0.3);
    font-weight: bold;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
    gap: 6px;
}

.pagination button {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 40px;
}

.pagination button:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.18);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 选项卡样式 */
.tabs-container {
    width: 100%;
    margin-top: 16px;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 24px;
    padding-bottom: 4px;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 4px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(5, 150, 105, 0.04);
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: 600;
    background: rgba(5, 150, 105, 0.06);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 12px;
    right: 12px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

/* 上传区域样式 */
.upload-section {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.upload-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
}

.upload-card h3 {
    color: #1e293b;
    font-size: 1.25em;
    margin-bottom: 20px;
    font-weight: 600;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.upload-form .form-group {
    margin-bottom: 0;
}

.upload-form .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.form-input::placeholder {
    color: var(--text-muted);
}



/* 响应式设计 */
@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.pagination button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pagination-info {
    margin: 0 15px;
    color: #666;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    padding: 28px;
    border-radius: var(--radius-xl);
    width: 420px;
    max-width: 90%;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-light);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.modal .form-group {
    margin-bottom: 16px;
}

.modal .btn {
    margin-top: 20px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message.success {
    background: var(--success-light);
    border: 1px solid rgba(22, 163, 74, 0.24);
    color: var(--success-dark);
}

.message.error {
    background: var(--danger-light);
    border: 1px solid rgba(220, 38, 38, 0.24);
    color: var(--danger-dark);
}

.message.warning {
    background: var(--warning-light);
    border: 1px solid rgba(217, 119, 6, 0.24);
    color: var(--warning-dark);
}

.message.info {
    background: var(--info-light);
    border: 1px solid rgba(2, 132, 199, 0.24);
    color: var(--info-dark);
}

.message .icon {
    font-size: 18px;
}

/* 复选框样式 */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    appearance: none;
}

input[type="checkbox"]:checked {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

input[type="checkbox"]:hover {
    border-color: var(--primary-color);
}

/* 筛选栏样式 */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px 20px;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.filter-group input {
    margin-right: 0;
}

.stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 180px;
    background: var(--bg-primary);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-card h4 {
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 500;
    flex-shrink: 0;
}

.stat-card .number {
    font-size: 4em;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.chart-box {
    flex: 1;
    min-width: 400px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-box h3 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

canvas {
    max-width: 100%;
    height: 300px !important;
}
    /* 弹窗样式 */
    .modal-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
justify-content: center;
align-items: center;
z-index: 2000;
animation: fadeIn 0.2s ease;
    }
    
    .modal {
background: #ffffff;
border-radius: 12px;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
width: 90%;
max-width: 600px;
max-height: 80vh;
overflow: hidden;
animation: slideUp 0.3s ease;
    }
    
    .modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 20px;
background: var(--primary-color);
color: white;
border-radius: 12px 12px 0 0;
    }
    
    .modal-header h2 {
font-size: 18px;
font-weight: 600;
margin: 0;
    }
    
    .modal-close {
background: rgba(255, 255, 255, 0.2);
border: none;
color: white;
font-size: 24px;
cursor: pointer;
padding: 0 8px;
border-radius: 4px;
transition: background 0.2s;
    }
    
    .modal-close:hover {
background: rgba(255, 255, 255, 0.3);
    }
    
    #modalContent {
padding: 20px;
max-height: calc(80vh - 60px);
overflow-y: auto;
    }
    
    .dorm-info {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
margin-bottom: 20px;
padding-bottom: 20px;
border-bottom: 1px solid #e2e8f0;
    }
    
    .info-item {
background: #f8fafc;
padding: 12px;
border-radius: 8px;
    }
    
    .info-item label {
display: block;
font-size: 12px;
color: #64748b;
margin-bottom: 4px;
    }
    
    .info-item value {
display: block;
font-size: 14px;
font-weight: 600;
color: #1e293b;
    }
    
    .students-section h3 {
font-size: 16px;
font-weight: 600;
color: #1e293b;
margin-bottom: 12px;
    }
    
    .students-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
    }
    
    .students-table th {
background: #f1f5f9;
padding: 10px 8px;
text-align: left;
font-weight: 600;
color: #475569;
border-bottom: 2px solid #e2e8f0;
    }
    
    .students-table td {
padding: 10px 8px;
border-bottom: 1px solid #f1f5f9;
color: #334155;
    }
    
    .students-table tr:hover td {
background: #f8fafc;
    }
    
    @keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
    }
    
    @keyframes slideUp {
from { 
    opacity: 0; 
    transform: translateY(20px); 
}
to { 
    opacity: 1; 
    transform: translateY(0); 
}
    }
    
