/* bds-manager/public_html/assets/css/global.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Harmony Color System (HSL) - Light Mode */
    --hue: 220;
    --primary: hsl(var(--hue), 85%, 57%);
    --primary-hover: hsl(var(--hue), 85%, 48%);
    --primary-glow: hsla(var(--hue), 85%, 57%, 0.15);

    --bg-base: hsl(var(--hue), 20%, 97%);
    --bg-surface: hsl(var(--hue), 0%, 100%);
    --bg-sidebar: hsl(var(--hue), 30%, 12%);
    --bg-glass: rgba(255, 255, 255, 0.7);

    --border-color: hsl(var(--hue), 15%, 90%);
    --border-glass: rgba(255, 255, 255, 0.4);

    --text-primary: hsl(var(--hue), 25%, 15%);
    --text-secondary: hsl(var(--hue), 15%, 45%);
    --text-muted: hsl(var(--hue), 10%, 65%);
    --text-on-primary: #ffffff;
    --text-on-sidebar: hsl(var(--hue), 10%, 85%);

    --success: hsl(142, 70%, 45%);
    --warning: hsl(38, 92%, 50%);
    --danger: hsl(350, 80%, 55%);

    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 16px -6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.12);

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --sidebar-width: 260px;
    --header-height: 70px;
    --border-radius: 16px;
}

[data-theme="dark"] {
    /* Harmony Color System (HSL) - Dark Mode */
    --bg-base: hsl(var(--hue), 22%, 8%);
    --bg-surface: hsl(var(--hue), 20%, 12%);
    --bg-sidebar: hsl(var(--hue), 25%, 7%);
    --bg-glass: rgba(20, 24, 35, 0.7);

    --border-color: hsl(var(--hue), 15%, 20%);
    --border-glass: rgba(255, 255, 255, 0.05);

    --text-primary: hsl(var(--hue), 15%, 92%);
    --text-secondary: hsl(var(--hue), 10%, 70%);
    --text-muted: hsl(var(--hue), 8%, 50%);
    --text-on-sidebar: hsl(var(--hue), 15%, 90%);

    --shadow-sm: 0 2px 8px -2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 16px -6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    min-height: 100vh;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Layout Shell */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--text-on-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform var(--transition-normal);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo svg {
    width: 24px;
    height: 24px;
    fill: url(#logo-grad);
}

.sidebar-menu {
    list-style: none;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.menu-item a svg {
    width: 20px;
    height: 20px;
    transition: stroke var(--transition-fast);
    stroke: var(--text-muted);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.menu-item.active a {
    background-color: var(--primary);
    color: var(--text-on-primary);
    box-shadow: 0 8px 20px -6px var(--primary-glow);
}

.menu-item.active a svg {
    stroke: var(--text-on-primary);
}

.menu-item:not(.active) a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.menu-item:not(.active) a:hover svg {
    stroke: #ffffff;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* User Profile Widget in Sidebar */
.user-profile-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.profile-widget-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.profile-widget-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-widget-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.profile-widget-role {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* Main Content Layout */
.app-main {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--transition-normal);
}

/* Header Styling */
.app-header {
    height: var(--header-height);
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

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

.menu-toggle-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    stroke: var(--text-primary);
    stroke-width: 2;
    padding: 8px;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Notification & Theme Toggle Buttons */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--danger);
}

/* App Container (Dynamic View Injection) */
.app-container {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    animation: fadeIn var(--transition-normal) ease;
}

/* Premium UI Components & Globals */
.premium-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.premium-card:hover {
    box-shadow: var(--shadow-md);
    border-color: hsla(var(--hue), 85%, 57%, 0.2);
}

/* Common UI Inputs and Buttons */
.premium-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--text-on-primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--text-muted);
    color: var(--bg-surface);
    transform: translateY(-2px);
}

/* Google Login UI Wrapper */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-base) 0%, hsl(var(--hue), 20%, 90%) 100%);
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-logo {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.google-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.google-login-btn:hover {
    border-color: var(--text-muted);
    background-color: var(--bg-base);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.google-login-btn svg {
    width: 20px;
    height: 20px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles for Mobile */
@media (max-width: 992px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.active {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
        padding-bottom: 80px;
        /* Chừa khoảng trống bên dưới để không bị Bottom Nav đè */
    }

    .menu-toggle-btn {
        display: block;
    }

    .app-header {
        padding: 0 16px;
    }

    .app-container {
        padding: 16px;
        padding-bottom: 90px !important;
        /* Đảm bảo đủ lề dưới cho di động */
    }

    /* Hiển thị Bottom Nav trên Mobile */
    .mobile-bottom-nav {
        display: flex !important;
    }
}

/* ================= MOBILE BOTTOM NAVIGATION ================= */
.mobile-bottom-nav {
    display: none;
    /* Mặc định ẩn trên màn hình lớn */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--border-color);
    z-index: 999;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    /* Hỗ trợ tai thỏ iOS */
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.08);
    transition: background-color var(--transition-normal), border-color var(--transition-normal);
}

[data-theme="dark"] .mobile-bottom-nav {
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10.5px;
    font-weight: 600;
    gap: 4px;
    flex: 1;
    height: 100%;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-item svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all var(--transition-fast);
}

/* Active State với hiệu ứng Glow chuyên nghiệp */
.nav-item.active {
    color: var(--primary);
}

.nav-item.active svg {
    stroke: var(--primary);
    transform: translateY(-2px);
    filter: drop-shadow(0 0 5px var(--primary-glow));
}

/* Biểu thị dấu chấm phát sáng nhẹ bên dưới mục active */
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--primary);
    box-shadow: 0 0 8px var(--primary);
}

/* ================= MODERN APP SPLASH SCREEN ================= */
.app-splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #0f172a 0%, #020617 100%);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.5s;
}

.app-splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 320px;
    width: 100%;
    padding: 20px;
}

.splash-logo-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.splash-logo-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.4) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulseGlow 2.5s infinite ease-in-out;
}

.splash-logo-icon {
    width: 76px;
    height: 76px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    animation: logoFloat 3s infinite ease-in-out;
}

.splash-logo-icon svg {
    width: 42px;
    height: 42px;
}

.splash-title {
    font-size: 26px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 15px rgba(0, 242, 254, 0.15);
}

.splash-subtitle {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    margin-bottom: 40px;
    letter-spacing: 0.2px;
}

.splash-loader {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.splash-loader-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.splash-loader-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00f2fe, #4facfe);
    border-radius: 10px;
    box-shadow: 0 0 12px #00f2fe;
    transition: width 0.3s cubic-bezier(0.1, 0.8, 0.2, 1);
}

.splash-loader-text {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@keyframes pulseGlow {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.4;
    }

    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

@keyframes logoFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* ================= PREMIUM SHIMMER SKELETON SCREEN ================= */
.skeleton-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

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

.skeleton-title {
    width: 200px;
    height: 24px;
    background: var(--border-color);
    border-radius: 6px;
}

.skeleton-badge {
    width: 80px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
}

.skeleton-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
}

.skeleton-line {
    height: 14px;
    background: var(--border-color);
    border-radius: 4px;
}

.skeleton-line.short {
    width: 30%;
}

.skeleton-line.medium {
    width: 60%;
}

.skeleton-line.long {
    width: 90%;
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.skeleton-card {
    height: 180px;
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

/* Hiệu ứng xung nhịp và Shimmer cao cấp */
.animate-pulse {
    animation: pulseWave 1.8s infinite ease-in-out;
}

@keyframes pulseWave {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* Tạo lớp Shimmer chéo lướt qua */
.skeleton-title,
.skeleton-badge,
.skeleton-line,
.skeleton-card {
    position: relative;
    overflow: hidden;
}

.skeleton-title::after,
.skeleton-badge::after,
.skeleton-line::after,
.skeleton-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.05) 20%,
            rgba(255, 255, 255, 0.12) 60%,
            rgba(255, 255, 255, 0) 100%);
    animation: shimmerEffect 1.5s infinite;
}

[data-theme="light"] .skeleton-title::after,
[data-theme="light"] .skeleton-badge::after,
[data-theme="light"] .skeleton-line::after,
[data-theme="light"] .skeleton-card::after {
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.02) 20%,
            rgba(0, 0, 0, 0.05) 60%,
            rgba(0, 0, 0, 0) 100%);
}

@keyframes shimmerEffect {
    100% {
        transform: translateX(100%);
    }
}