/* ============================================
   船鑫科技 - 工资单确认系统
   配色：科技蓝 + 白 + 灰
   适配 PC + Mobile
   ============================================ */

/* === CSS Variables === */
:root {
    --primary: #1A6DF5;
    --primary-dark: #0D47A1;
    --primary-light: #E8F0FE;
    --primary-gradient: linear-gradient(135deg, #1A6DF5 0%, #0D47A1 100%);
    
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    
    --bg: #F0F4F8;
    --bg-card: #FFFFFF;
    --bg-sidebar: #1E293B;
    
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --text-white: #FFFFFF;
    
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 4px;
    
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* === Reset === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

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

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: var(--font);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(26, 109, 245, 0.4);
}

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

.btn-success:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: none;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 17px;
}

.btn-block {
    width: 100%;
}

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

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

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg-card);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 109, 245, 0.1);
}

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

.form-input.error {
    border-color: var(--danger);
}

/* 密码输入框 + 显示按钮容器 */
.input-with-action {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-action .form-input {
    padding-right: 48px;
}

.input-action {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
    font-size: 18px;
    color: var(--text-secondary);
    padding: 0;
    font-family: var(--font);
}

.input-action:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.input-action:active {
    background: var(--primary-light);
}

.input-action:focus {
    outline: none;
}

.form-error {
    font-size: 13px;
    color: var(--danger);
    margin-top: 4px;
}

/* === Cards === */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h2, .card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

/* === Login Page === */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(26, 109, 245, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(13, 71, 161, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.login-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

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

.login-logo {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: var(--text-white);
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(26, 109, 245, 0.3);
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-light);
}

.login-hint {
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 13px;
    color: var(--primary-dark);
    line-height: 1.5;
}

/* === Main Layout (after login) === */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Top Nav */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.top-nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-nav-logo {
    width: 36px;
    height: 36px;
    background: var(--primary-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-weight: 700;
    font-size: 16px;
}

.top-nav-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.top-nav-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    display: none;
}

.top-nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-nav-username {
    font-size: 14px;
    color: var(--text-secondary);
}

.top-nav-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 14px;
    font-weight: 600;
}

.btn-logout {
    padding: 6px 14px;
    font-size: 13px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
}

.btn-logout:hover {
    border-color: var(--danger);
    color: var(--danger);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-top: 60px;
    padding: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* === Salary List === */
.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.salary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.salary-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.salary-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.salary-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.salary-item-month {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.salary-item-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.salary-item-icon.pending {
    background: var(--warning-light);
    color: var(--warning);
}

.salary-item-icon.confirmed {
    background: var(--success-light);
    color: var(--success);
}

.salary-item-info {
    flex: 1;
}

.salary-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.salary-item-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

.salary-item-amount {
    text-align: right;
}

.salary-item-net {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.salary-item-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
}

.salary-item-status.pending {
    background: var(--warning-light);
    color: var(--warning);
}

.salary-item-status.confirmed {
    background: var(--success-light);
    color: var(--success);
}

.salary-item-arrow {
    color: var(--text-light);
    margin-left: 12px;
    font-size: 18px;
}

/* === Salary Detail === */
.salary-detail {
    max-width: 600px;
    margin: 60px auto 0;
}

.salary-detail-header {
    text-align: center;
    margin-bottom: 24px;
}

.salary-detail-month {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.salary-detail-name {
    font-size: 16px;
    color: var(--text-secondary);
}

.salary-detail-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

/* Summary section */
.salary-summary {
    background: var(--primary-gradient);
    padding: 32px 24px;
    text-align: center;
    color: var(--text-white);
}

.salary-summary-label {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 8px;
}

.salary-summary-amount {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1px;
}

.salary-summary-amount .currency {
    font-size: 22px;
    font-weight: 500;
}

.salary-summary-sub {
    font-size: 13px;
    opacity: 0.7;
    margin-top: 8px;
}

/* Detail sections */
.salary-section {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.salary-section:last-child {
    border-bottom: none;
}

.salary-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.salary-section-title .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.salary-section-title .dot.income {
    background: var(--success);
}

.salary-section-title .dot.deduction {
    background: var(--danger);
}

.salary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 15px;
}

.salary-row + .salary-row {
    border-top: 1px solid var(--border-light);
}

.salary-row-label {
    color: var(--text-secondary);
}

.salary-row-label .desc {
    display: block;
    font-size: 12px;
    color: var(--text-light);
}

.salary-row-value {
    font-weight: 500;
    color: var(--text-primary);
}

.salary-row-value.positive {
    color: var(--success);
}

.salary-row-value.negative {
    color: var(--danger);
}

.salary-row.total {
    padding: 12px 0;
    border-top: 2px solid var(--border);
    margin-top: 4px;
}

.salary-row.total .salary-row-label {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.salary-row.total .salary-row-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

/* Employee info bar */
.employee-info-bar {
    display: flex;
    gap: 24px;
    padding: 16px 24px;
    background: var(--primary-light);
    flex-wrap: wrap;
}

.employee-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.employee-info-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.employee-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

/* === Confirmation Section === */
.confirm-section {
    margin-top: 24px;
    text-align: center;
    padding: 24px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.confirm-section.confirmed {
    border: 2px solid var(--success);
    background: var(--success-light);
}

.confirm-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.confirm-text {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.confirm-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.confirm-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    margin: 16px 0;
    padding: 16px;
    background: var(--border-light);
    border-radius: var(--radius-sm);
}

.confirm-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.confirm-checkbox label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1.5;
}

/* === Modal === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    max-width: 420px;
    width: 100%;
    padding: 32px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 16px;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

.modal-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.6;
}

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

.modal-actions .btn {
    flex: 1;
}

/* 签名板徽标尺寸限制 */
.modal.modal-sign {
    max-width: 440px;
}

/* 签名区域 */
.signature-area {
    margin-bottom: 12px;
}

.signature-area canvas {
    display: block;
    background: #FAFBFC;
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    touch-action: none;
    cursor: crosshair;
}

.signature-area canvas:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 109, 245, 0.1);
}

.signature-hint {
    font-size: 12px;
    color: var(--text-light);
    text-align: center;
    margin-top: 4px;
}

.signature-actions {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

/* 已确认签名预览 */
.signature-preview {
    margin-top: 16px;
    padding: 12px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.signature-preview img {
    max-width: 280px;
    max-height: 80px;
    display: block;
    margin: 0 auto;
}

.signature-preview::before {
    content: '签名：';
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

/* === Admin === */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: var(--text-white);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 200;
    overflow-y: auto;
}

.admin-sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar-brand {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-sidebar-brand .badge {
    font-size: 10px;
    background: var(--warning);
    color: #1e293b;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.admin-nav {
    padding: 12px 0;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    border-left: 3px solid transparent;
}

.admin-nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-white);
    text-decoration: none;
}

.admin-nav-item.active {
    background: rgba(26, 109, 245, 0.2);
    color: var(--text-white);
    border-left-color: var(--primary);
}

.admin-nav-item .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 32px;
    max-width: 1200px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-title {
    font-size: 24px;
    font-weight: 700;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-card-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-card-value.primary {
    color: var(--primary);
}

.stat-card-value.success {
    color: var(--success);
}

.stat-card-value.warning {
    color: var(--warning);
}

/* === Table === */
.table-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
}

th {
    background: var(--border-light);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    border-bottom: 1px solid var(--border-light);
}

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

tr:hover td {
    background: var(--primary-light);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.pending {
    background: var(--warning-light);
    color: #92400E;
}

.status-badge.confirmed {
    background: var(--success-light);
    color: #065F46;
}

/* === Upload === */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--border-light);
}

.upload-zone:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--text-light);
}

.upload-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 13px;
    color: var(--text-light);
}

/* === Toast === */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    max-width: 360px;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

.toast.info {
    background: var(--primary);
}

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

/* === Responsive === */
@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }

    .top-nav {
        padding: 0 16px;
    }

    .top-nav-subtitle {
        display: none;
    }

    .top-nav-username {
        display: none;
    }

    .login-card {
        padding: 24px 20px;
    }

    .salary-item {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .salary-item-left {
        width: 100%;
    }

    .salary-item-amount {
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .salary-item-arrow {
        display: none;
    }

    .salary-detail-card {
        border-radius: var(--radius-sm);
    }

    .salary-summary {
        padding: 24px 16px;
    }

    .salary-summary-amount {
        font-size: 32px;
    }

    .salary-section {
        padding: 16px;
    }

    .employee-info-bar {
        gap: 12px;
        padding: 12px 16px;
    }

    .confirm-section {
        padding: 16px;
        margin-top: 16px;
    }

    /* 管理后台在手机上也用PC侧边栏（不做手机版） */
    .admin-sidebar {
        display: block;
        position: relative;
        width: 100%;
        height: auto;
        min-height: auto;
        left: 0;
        z-index: 10;
    }
    .admin-sidebar-nav-container { padding: 0; }
    .admin-sidebar-header { padding: 12px 16px; }
    .admin-sidebar .admin-nav {
        display: flex;
        overflow-x: auto;
        padding: 0 8px 8px;
        gap: 4px;
        flex-wrap: nowrap;
    }
    .admin-sidebar .admin-nav-item {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 8px 12px;
        font-size: 13px;
    }
    .admin-main { margin-left: 0 !important; padding: 12px !important; }
    .admin-header { flex-direction: row !important; align-items: center !important; flex-wrap: wrap; gap: 8px; }

    .admin-stats {
        grid-template-columns: 1fr 1fr;
    }

    .card-header {
        padding: 16px;
        flex-direction: column;
        gap: 8px;
    }

    .card-body {
        padding: 16px;
    }

    .modal {
        padding: 24px 20px;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 15px;
    }

    .page-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }

    .salary-item-net {
        font-size: 17px;
    }
}

/* === Loading === */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--text-light);
    font-size: 14px;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 12px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Back button === */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 0;
    font-family: var(--font);
    margin-bottom: 16px;
}

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

/* === Empty state === */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-light);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* === File input styling === */
input[type="file"] {
    display: none;
}

/* Mobile bottom nav for admin */
@media (max-width: 768px) {
    .mobile-admin-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-card);
        border-top: 1px solid var(--border);
        z-index: 100;
        padding: 8px 0;
        justify-content: space-around;
    }

    .mobile-admin-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        font-size: 11px;
        color: var(--text-light);
        text-decoration: none;
        padding: 4px 12px;
    }

    .mobile-admin-nav a.active {
        color: var(--primary);
    }

    .mobile-admin-nav a .icon {
        font-size: 20px;
    }

    .admin-main {
        padding-bottom: 70px;
    }
}
