/* ===== 新音院花名册管理系统 样式 ===== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #1a1d23;
    color: #e0e0e0;
    font-size: 14px;
    min-height: 100vh;
}

/* ===== 登录页 ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1d23 0%, #2c3e50 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: #2a2d35;
    border-radius: 12px;
    padding: 40px 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

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

.login-header h1 {
    color: #4A90D9;
    font-size: 24px;
    margin-bottom: 8px;
}

.login-header p {
    color: #888;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 6px;
    color: #aaa;
    font-size: 13px;
}

.login-form input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #3a3d45;
    border-radius: 8px;
    background: #1e2028;
    color: #e0e0e0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.login-form input:focus {
    border-color: #4A90D9;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    color: #555;
    font-size: 12px;
}

/* ===== 主界面 ===== */
.app {
    max-width: 100%;
    padding: 0 16px 16px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 8px;
    border-bottom: 1px solid #2a2d35;
    margin-bottom: 16px;
}

.header h1 {
    color: #4A90D9;
    font-size: 20px;
}

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

.user-info {
    color: #aaa;
    font-size: 13px;
}

/* ===== 按钮 ===== */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.btn-primary { background: #4A90D9; color: #fff; }
.btn-primary:hover { background: #357ABD; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #219a52; }
.btn-warning { background: #f39c12; color: #fff; }
.btn-warning:hover { background: #d68910; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-outline { background: transparent; border: 1px solid #4a4d55; color: #aaa; }
.btn-outline:hover { border-color: #4A90D9; color: #4A90D9; }

/* ===== 工具栏 ===== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 8px;
    background: #2a2d35;
    border-radius: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.toolbar-left, .toolbar-center, .toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar label { color: #aaa; font-size: 13px; }

.toolbar select, .toolbar input[type="text"] {
    padding: 6px 10px;
    border: 1px solid #3a3d45;
    border-radius: 6px;
    background: #1e2028;
    color: #e0e0e0;
    font-size: 13px;
    outline: none;
}

.toolbar select:focus, .toolbar input:focus {
    border-color: #4A90D9;
}

/* ===== 表格 ===== */
.table-wrap {
    overflow-x: auto;
    background: #2a2d35;
    border-radius: 8px;
    margin-bottom: 16px;
}

#dataTable {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

#dataTable thead th {
    background: #4A90D9;
    color: #fff;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}

#dataTable tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #333;
    font-size: 13px;
}

#dataTable tbody tr:hover {
    background: #333640;
}

#dataTable tbody tr:nth-child(even) {
    background: #2e3138;
}

#dataTable tbody tr:nth-child(even):hover {
    background: #333640;
}

td.editable {
    cursor: pointer;
    transition: background 0.2s;
}

td.editable:hover {
    background: rgba(74, 144, 217, 0.15);
}

td.editable.saved {
    background: rgba(39, 174, 96, 0.2);
    transition: background 0.5s;
}

.inline-input {
    background: #1e2028;
    border: 1px solid #4A90D9;
    color: #e0e0e0;
    padding: 4px 8px;
    border-radius: 4px;
    width: 100%;
    min-width: 80px;
    font-size: 13px;
    outline: none;
}

.loading, .empty {
    text-align: center;
    padding: 40px !important;
    color: #666;
}

/* ===== 分页 ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #3a3d45;
    border-radius: 4px;
    background: #2a2d35;
    color: #aaa;
    cursor: pointer;
    font-size: 13px;
}

.pagination button:hover { border-color: #4A90D9; color: #4A90D9; }
.pagination button.active { background: #4A90D9; color: #fff; border-color: #4A90D9; }
.page-info { color: #888; margin-left: 8px; font-size: 13px; }

/* ===== 弹窗 ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: #2a2d35;
    border-radius: 12px;
    width: 90%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}

.modal-wide { max-width: 900px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #333;
}

.modal-header h3 { color: #4A90D9; font-size: 16px; }
.modal-close { font-size: 24px; color: #888; cursor: pointer; }
.modal-close:hover { color: #e0e0e0; }

.modal-body { padding: 20px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #333; text-align: right; display: flex; gap: 8px; justify-content: flex-end; }

/* ===== 表单 ===== */
.tip { color: #888; font-size: 13px; margin-bottom: 16px; line-height: 1.6; }

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #333;
}

.inline-form input[type="text"],
.inline-form input[type="password"] {
    padding: 6px 10px;
    border: 1px solid #3a3d45;
    border-radius: 6px;
    background: #1e2028;
    color: #e0e0e0;
    font-size: 13px;
    outline: none;
    flex: 1;
    min-width: 100px;
}

.inline-form input:focus { border-color: #4A90D9; }

.hall-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hall-checkbox label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
}

.edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.form-row label {
    display: block;
    color: #888;
    font-size: 12px;
    margin-bottom: 4px;
}

.form-row input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #3a3d45;
    border-radius: 6px;
    background: #1e2028;
    color: #e0e0e0;
    font-size: 13px;
    outline: none;
}

.form-row input:focus { border-color: #4A90D9; }

/* ===== 小表格 ===== */
.mini-table {
    width: 100%;
    border-collapse: collapse;
}

.mini-table th {
    background: #333;
    color: #aaa;
    padding: 8px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
}

.mini-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #333;
    font-size: 13px;
}

.mini-table tr:hover { background: #333640; }

/* ===== 导入结果 ===== */
.result-msg {
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.result-msg.success { background: rgba(39, 174, 96, 0.15); color: #27ae60; }
.result-msg.error { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }

/* ===== Alert ===== */
.alert {
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-error { background: rgba(231, 76, 60, 0.15); color: #e74c3c; border: 1px solid rgba(231, 76, 60, 0.3); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .toolbar { flex-direction: column; align-items: stretch; }
    .toolbar-left, .toolbar-center, .toolbar-right { justify-content: flex-start; }
    .edit-grid { grid-template-columns: 1fr; }
    .modal-box { width: 95%; }
}

/* ===== 文件上传 ===== */
input[type="file"] {
    color: #aaa;
    font-size: 13px;
}

input[type="file"]::file-selector-button {
    padding: 6px 14px;
    border: 1px solid #3a3d45;
    border-radius: 6px;
    background: #1e2028;
    color: #e0e0e0;
    cursor: pointer;
    margin-right: 8px;
}

input[type="file"]::file-selector-button:hover {
    border-color: #4A90D9;
}

/* ===== 超管管理 - 卡片式 ===== */
.super-add-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 0 16px;
    border-bottom: 1px solid #333;
    margin-bottom: 14px;
}
.super-add-bar input[type="text"],
.super-add-bar input[type="password"] {
    padding: 6px 10px;
    border: 1px solid #3a3d45;
    border-radius: 6px;
    background: #1e2028;
    color: #e0e0e0;
    font-size: 13px;
    outline: none;
}
.super-add-bar input:focus { border-color: #4A90D9; }

.super-cards {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 6px;
}
.super-cards::-webkit-scrollbar { width: 8px; }
.super-cards::-webkit-scrollbar-track { background: #1e2028; border-radius: 4px; }
.super-cards::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }
.super-cards::-webkit-scrollbar-thumb:hover { background: #777; }

.super-card {
    background: #1f2230;
    border: 1px solid #2f3346;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 12px;
}
.super-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.super-card-info { flex: 1; min-width: 200px; }
.super-name-line {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.super-name {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.super-id {
    color: #888;
    font-size: 14px;
}
.super-hall-names {
    color: #bbb;
    font-size: 14px;
    margin-top: 6px;
    line-height: 1.5;
}
.super-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.btn-outline-purple {
    background: transparent;
    border: 1.5px solid #7c5cfc;
    color: #7c5cfc;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-outline-purple:hover {
    background: #7c5cfc;
    color: #fff;
}
.btn-purple {
    background: #7c5cfc !important;
    border-color: #7c5cfc !important;
    color: #fff !important;
    border-radius: 20px !important;
    padding: 7px 24px !important;
    font-size: 14px !important;
}
.btn-purple:hover {
    background: #6a48e0 !important;
}

.super-hall-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #3a3d50;
}
.super-hall-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    margin-bottom: 14px;
    background: #161822;
    border: 1px solid #2a2e42;
    border-radius: 8px;
}
.super-hall-list::-webkit-scrollbar { width: 8px; }
.super-hall-list::-webkit-scrollbar-track { background: #0f1118; border-radius: 4px; }
.super-hall-list::-webkit-scrollbar-thumb { background: #4a4d6a; border-radius: 4px; }
.super-hall-list::-webkit-scrollbar-thumb:hover { background: #6a6d8a; }

.hall-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.1s;
    font-size: 15px;
    color: #ddd;
}
.hall-item:hover { background: #2a2e42; }
.hall-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #4A90D9;
    cursor: pointer;
    flex-shrink: 0;
}
