/* ===== RESET CĂN BẢN ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --white:    #FFFFFF;
    --cream:    #FFF9F5;
    --pink-lt:  #FDE8EF;
    --rose:     #D4748C;
    --gold:     #C9A84C;
    --text:     #3D2B1F;
    --gray:     #7A6A5A;
    --border:   #EDD8D0;
    --dark:     #2D1F1A;
    --sidebar:  #3D2B1F;
}

body {
    font-family: 'Be Vietnam Pro', 'Lato', sans-serif;
    background-color: #F5EDE8;
    color: var(--text);
    min-height: 100vh;
}


/* ===== HEADER ADMIN ===== */
#admin-header {
    background-color: var(--dark);
    padding: 0 5%;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-logo span {
    color: var(--rose);
    font-size: 1.4rem;
}

.admin-logo h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--white);
}

/* Liên kết phía trên bên phải */
.header-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-links a {
    text-decoration: none;
    color: #CCC;
    font-size: 0.86rem;
    transition: color 0.25s;
}

.header-links a:hover { color: var(--rose); }

/* Nút đăng xuất */
.btn-logout {
    background-color: var(--rose);
    color: var(--white) !important;
    padding: 6px 16px;
    border-radius: 18px;
}

.btn-logout:hover {
    background-color: var(--gold);
    color: var(--white) !important;
}


/* ===== BỐ CỤC ADMIN: Sidebar bên trái + Nội dung bên phải ===== */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 58px);
}


/* ===== SIDEBAR ===== */
.sidebar {
    width: 215px;
    background-color: var(--sidebar);
    flex-shrink: 0;
    padding-bottom: 20px;
}

/* Khu vực thông tin admin */
.admin-profile {
    text-align: center;
    padding: 24px 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 10px;
}

/* Avatar icon tròn */
.avatar {
    width: 58px;
    height: 58px;
    background-color: var(--rose);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 10px;
}

.admin-name {
    color: var(--white);
    font-weight: 700;
    font-size: 0.95rem;
}

.admin-role {
    color: var(--rose);
    font-size: 0.76rem;
    margin-top: 3px;
}

/* Các mục menu trong sidebar */
.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    text-decoration: none;
    color: #C0AFA8;
    padding: 11px 18px;
    font-size: 0.86rem;
    transition: all 0.22s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background-color: rgba(255,255,255,0.07);
    color: var(--white);
    border-left-color: var(--rose);
}

/* Mục đang được chọn */
.sidebar-nav a.active {
    background-color: rgba(212,116,140,0.18);
    color: var(--white);
    border-left-color: var(--rose);
}


/* ===== NỘI DUNG CHÍNH ===== */
.admin-main {
    flex: 1;
    padding: 26px 30px;
    overflow-x: auto;
}

/* Tiêu đề khu vực nội dung */
.page-title {
    margin-bottom: 22px;
}

.page-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.45rem;
    color: var(--text);
}

.page-title p {
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 4px;
}


/* ===== THỐNG KÊ NHANH ===== */
.stats-row {
    display: flex;
    gap: 14px;
    margin-bottom: 26px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 16px 22px;
    text-align: center;
    flex: 1;
    min-width: 110px;
    border-bottom: 3px solid var(--rose);
    box-shadow: 0 2px 10px rgba(200,130,130,0.08);
}

.stat-card span {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 5px;
}

.stat-card strong {
    font-family: 'Playfair Display', serif;
    font-size: 1.65rem;
    color: var(--rose);
    display: block;
}

.stat-card p {
    font-size: 0.78rem;
    color: var(--gray);
    margin-top: 3px;
}


/* ===== BẢNG DỮ LIỆU ===== */
.table-wrap {
    background: var(--white);
    border-radius: 14px;
    overflow-x: auto;
    box-shadow: 0 2px 14px rgba(200,130,130,0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.87rem;
    min-width: 700px;
}

/* Đầu bảng màu gradient */
thead {
    background: linear-gradient(135deg, var(--rose), var(--gold));
}

thead th {
    color: var(--white);
    padding: 12px 13px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

/* Các dòng dữ liệu */
tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s;
}

tbody tr:hover { background-color: var(--pink-lt); }

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

tbody td {
    padding: 12px 13px;
    vertical-align: middle;
}


/* ===== BADGE TRẠNG THÁI ===== */
.badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 15px;
    font-size: 0.77rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Chờ xác nhận – vàng cam */
.badge.pending {
    background-color: #FFF3CD;
    color: #856404;
}

/* Đã xác nhận – xanh lá */
.badge.confirmed {
    background-color: #D4EDDA;
    color: #155724;
}

/* Đã tư vấn – xanh dương */
.badge.consulted {
    background-color: #CCE5FF;
    color: #004085;
}


/* ===== RESPONSIVE ===== */

/* Tablet/Mobile (dưới 768px) */
@media (max-width: 768px) {

    /* Sidebar chuyển thành thanh ngang */
    .admin-layout { flex-direction: column; }

    .sidebar {
        width: 100%;
        padding-bottom: 0;
    }

    /* Ẩn thông tin profile để tiết kiệm chỗ */
    .admin-profile { display: none; }

    /* Menu nằm ngang */
    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 6px 8px;
        gap: 4px;
    }

    .sidebar-nav a {
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 7px 10px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    .sidebar-nav a.active,
    .sidebar-nav a:hover {
        border-left: none;
        border-bottom-color: var(--rose);
    }

    .admin-main { padding: 16px 12px; }

    .admin-logo h1 { font-size: 0.95rem; }
}
