﻿/* =========================================================
   DESIGN SYSTEM - ENTERPRISE DOCUMENT INTELLIGENCE (EDI)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Colors (Slide 109 - 123) */
    --primary: #4F46E5; /* Deep Indigo - Thể hiện trí tuệ, AI, chuyên nghiệp */
    --primary-hover: #4338ca;
    --bg-body: #F4F7F9; /* Xám cực nhạt, giúp nổi bật Card trắng */
    --bg-card: #FFFFFF;
    --text-main: #212529; /* Dark Slate - Không dùng đen tuyệt đối (#000) */
    --text-muted: #64748B; /* Cool Gray - Cho text phụ */

    --border-color: #E2E8F0;
    /* Type Scale (Slide 94 - 101) */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 20px;
    --text-xl: 24px;
    --text-2xl: 32px;
    /* Border Radius & Shadows (Slide 162 & 175) */
    --radius-sm: 6px;
    --radius-md: 8px; /* Cho Buttons, Inputs */
    --radius-lg: 12px; /* Cho Cards, Modals */
    /* Soft Shadow Flat Design 2.0 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
}

/* =========================================================
   GLOBAL RESET & TYPOGRAPHY
   ========================================================= */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: var(--text-base);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* FIX FOOTER: Biến body thành cột flexbox full màn hình */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em; /* Kéo nhẹ khoảng cách chữ ở tiêu đề (Slide 104) */
}

/* =========================================================
   BOOTSTRAP OVERRIDES (Component Refactoring)
   ========================================================= */

/* Cards - Slide 261 */
.card {
    background-color: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

/* Inputs & Forms - Slide 266 */
.form-control, .form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    font-size: var(--text-sm);
    color: var(--text-main);
    background-color: #F8FAFC;
    transition: all 0.2s ease;
}

    .form-control:focus, .form-select:focus {
        background-color: #FFFFFF;
        border-color: var(--primary);
        box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15); /* Focus ring hiện đại */
    }

/* Buttons - Slide 264 */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    font-size: var(--text-sm);
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

    .btn-primary:hover {
        background-color: var(--primary-hover);
        transform: translateY(-1px); /* Pull closer effect (Slide 172) */
        box-shadow: var(--shadow-md);
    }

.btn-dark {
    background-color: var(--text-main);
    color: white;
}

/* =========================================================
   CUSTOM LAYOUT ELEMENTS
   ========================================================= */

/* Navbar hiện đại */
.edi-navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); /* Hiệu ứng kính mờ kính */
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
}

    .edi-navbar .nav-link {
        color: var(--text-muted);
        font-weight: 500;
        font-size: var(--text-sm);
        padding: 0.5rem 1.2rem !important; /* Tăng Whitespace */
        border-radius: var(--radius-md);
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 6px;
    }

        .edi-navbar .nav-link:hover,
        .edi-navbar .nav-link.active {
            color: var(--primary);
            background-color: rgba(79, 70, 229, 0.05);
        }

/* Logo Text Cách điệu */
.brand-logo-text {
    font-size: var(--text-xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

    .brand-logo-text span {
        color: var(--primary);
    }

/* User Dropdown Profile */
.profile-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-main);
    font-weight: 500;
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all 0.2s;
}

    .profile-dropdown-toggle:hover {
        box-shadow: var(--shadow-sm);
        border-color: #cbd5e1;
    }

.avatar-circle {
    width: 32px;
    height: 32px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* =========================================================
   FORM UX FIXES (Law of Proximity - Slide 192)
   ========================================================= */
.form-label {
    margin-bottom: 4px; /* Kéo label sát rịt vào input */
    font-size: 13px;
    font-weight: 600;
    color: #475569; /* Giảm sắc độ label (De-emphasize) */
}

/* Làm mờ dấu sao đỏ để không gắt mắt (Slide 167) */
.text-danger {
    opacity: 0.8;
}

/* Đẩy khoảng cách các hàng input ra xa nhau */
.row.g-3 {
    gap: 1.5rem 0 !important; /* Tăng khoảng trống chiều dọc */
}

/* Ghost Buttons (Nút tàng hình - Slide 213) */
.btn-ghost-danger {
    background: transparent;
    color: #94A3B8; /* Xám nhạt khi bình thường */
    border: 1px solid transparent;
    transition: all 0.2s;
}

    .btn-ghost-danger:hover {
        background: #FEF2F2;
        color: #E11D48; /* Đỏ bật lên khi Hover */
        border-color: #FECDD3;
    }