/* custom-theme.css
   Giao diện sáng hiện đại, tươi, chuyên nghiệp
   Tông: trắng – xanh ngọc – tím nhạt
*/

:root {
    --bg: #f7f9fc;
    --panel: #ffffff;
    --surface: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --accent: #2563eb;
    --accent-2: #8b5cf6;
    --border: #e2e8f0;
    --radius: 10px;
    --shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    --transition: all 0.18s ease;
}

/* Toàn trang */
html,
body {
    margin: 0;
    padding: 0;
    font-family: "Inter", "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, #ffffff, #f3f6fa);
    width: 240px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    z-index: 20;
}

.sidebar .label {
    text-transform: uppercase;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.08em;
    padding: 16px 16px 4px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    text-decoration: none;
    color: var(--text);
    border-radius: var(--radius);
    transition: var(--transition);
}

.sidebar ul li a i {
    color: var(--accent);
    width: 22px;
    text-align: center;
}

.sidebar ul li a:hover {
    background: rgba(37, 99, 235, 0.08);
    transform: translateX(5px);
}

.sidebar ul li.active>a {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #fff;
}

.sidebar ul li.active>a i {
    color: #fff;
}

.sidebar img {
    border-radius: 10px;
    margin: 10px auto;
    display: block;
    width: calc(100% - 32px);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    height: 60px;
    position: fixed;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center; /* căn giữa ngang */
    height: 60px;
}

.header .pull-left {
  margin: 0 auto; /* đảm bảo không lệch */
}

.header .logo a span {
  font-size: 20px;
  font-weight: 700;
}

.header .logo a {
    text-decoration: none;
}

.header .logo a span {
    font-weight: 700;
    font-size: 18px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    color: transparent;
}

.hamburger {
    cursor: pointer;
}

.hamburger .line {
    width: 20px;
    height: 2px;
    background: var(--text);
    margin: 3px 0;
    border-radius: 2px;
}

/* Nội dung chính */
.content-wrap {
    min-height: calc(100vh - 70px);
}

/* Card, bảng, khung */
.card,
.panel,
.box {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 16px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border-radius: var(--radius);
    overflow: hidden;
}

thead {
    background: #f1f5f9;
}

thead th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: var(--muted);
}

tbody td {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    color: var(--text);
}

tbody tr:hover {
    background: #f9fafb;
}

/* Nút bấm */
.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    font-size: 13px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Input */
input,
select,
textarea {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 10px;
    color: var(--text);
    outline: none;
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Toast */
.toast-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.toast-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Cuộn */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: var(--transition);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .header,
    .content-wrap {
        margin-left: 0;
    }
}