﻿/* public/css/admin.css */

body {
    background-color: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #334155;
}

/* ================== 侧边栏 (高级深蓝灰) ================== */
.sidebar {
    background-color: #0f172a;
    min-height: 100vh;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 10;
}

    .sidebar h4 {
        font-weight: 700;
        letter-spacing: 0.5px;
        color: #f8fafc !important;
    }

    .sidebar a {
        color: #94a3b8;
        text-decoration: none;
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 8px; /* 导航项改成圆角药丸状 */
        margin-bottom: 0.25rem;
        transition: all 0.2s ease;
    }

        .sidebar a:hover {
            color: #fff;
            background-color: rgba(255, 255, 255, 0.1);
        }

        .sidebar a.active {
            color: #fff;
            background-color: #2563eb; /* 现代感的主蓝色 */
            box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
        }

    .sidebar .text-danger:hover {
        background-color: rgba(220, 38, 38, 0.1) !important;
        color: #ef4444 !important;
    }

.card {
    border: none !important;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #f1f5f9;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

.stat-card {
    border-radius: 12px;
}

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

/* 重新定义 Bootstrap 的背景色 */
.bg-primary {
    background-color: #2563eb !important;
}
/* 现代蓝 */
.bg-success {
    background-color: #10b981 !important;
}
/* 薄荷绿 */
.bg-info {
    background-color: #0ea5e9 !important;
}
/* 天际蓝 */
.bg-danger {
    background-color: #ef4444 !important;
}
/* 珊瑚红 */


.table {
    color: #334155;
    margin-bottom: 0;
}

    .table th {
        color: #64748b;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.85rem;
        letter-spacing: 0.5px;
        border-top: none !important;
        border-bottom: 2px solid #e2e8f0 !important;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .table td {
        vertical-align: middle;
        padding: 0.75rem 0.5rem !important;
        border-bottom: 1px solid #f1f5f9;
    }

.table-bordered > :not(caption) > * > * {
    border-width: 0 0 1px 0 !important;
}

/* ================== 按钮与控件 ================== */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-sm {
    border-radius: 4px;
}

.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
}

    .btn-primary:hover {
        background-color: #1d4ed8;
        border-color: #1d4ed8;
        box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
    }

.form-control, .form-select {
    border-radius: 6px;
    border-color: #cbd5e1;
}

    .form-control:focus, .form-select:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
    }

.nav-link {
    cursor: pointer;
}

.system-status {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.jump-input {
    width: 70px !important;
    flex: 0 0 auto !important;
    text-align: center;
    min-width: 70px;
}

.input-group .jump-input {
    flex: 0 0 auto;
}

.clickable-copy {
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s;
}

    .clickable-copy:hover {
        background-color: #dbeafe;
        border-radius: 4px;
        padding: 0 2px;
    }

/* 美化弹窗 */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
}

/* ================== 表格美化 (无横线 + 高度对齐 + 斑马线) ================== */

.table-bordered > :not(caption) > * > * {
    border-top: none !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: 1px solid #f1f5f9 !important;
}
    .table-bordered > :not(caption) > * > *:last-child {
        border-right: none !important;
    }

.table tbody tr:nth-of-type(even) td,
.table tbody tr:nth-of-type(even) th {
    background-color: rgba(241, 245, 249, 0.6) !important;
}

.table-hover tbody tr:hover td,
.table-hover tbody tr:hover th {
    background-color: #f0f9ff !important;
}

.table-sm tbody tr {
    height: 56px !important;
}

.table-sm tbody td,
.table-sm tbody th {
    height: 56px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    vertical-align: middle !important;
}

/* ================== 日期选择器优雅占位符 ================== */
.date-filter {
    position: relative;
}
    .date-filter::-webkit-datetime-edit {
        color: transparent;
    }
    .date-filter[data-hasval="true"]::-webkit-datetime-edit,
    .date-filter:focus::-webkit-datetime-edit {
        color: inherit;
    }
    .date-filter::before {
        content: attr(placeholder);
        position: absolute;
        color: #94a3b8;
        pointer-events: none;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
    }
    .date-filter[data-hasval="true"]::before,
    .date-filter:focus::before {
        display: none;
    }
