﻿/* ========================================
   GLOBAL BASE STYLES
   style.css  (import variables.css trước)
   ======================================== */

/* ── Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ── Base ── */
body {
    background: var(--background);
    color: var(--foreground);
    font-family: system-ui, -apple-system, sans-serif;
    min-height: 100vh;
}

#lottie-container {
    width: 30rem;
    height: 30rem;
}

.inline-notice {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.2rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
    background: var(--card);
    width: fit-content;
}
 
.inline-notice p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: nowrap;
}
 
/* Biến thể cảnh báo (màu vàng/cam nhạt) - dùng khi cần nhấn mạnh hơn
   mức thông báo trung tính, ví dụ sắp hết quyền, dữ liệu tạm thời... */
.inline-notice.warning {
    border-color: var(--primary);
}
 
.inline-notice.warning p {
    color: var(--primary);
}
 

/* ──────────────────────────────────────
   LOADING SCREEN (dùng cho các trang chờ xác thực/permission ban đầu)
────────────────────────────────────── */
.loading-screen {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-screen h2 {
    margin-bottom: var(--spacing-xs);
    color: var(--primary);
}

.loading-screen p {
    color: var(--text-muted);
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    max-width: 200px;
}

#lottie-loading {
    width: 150px;
    height: 150px;
}

.loading-container p {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
}

/* ──────────────────────────────────────
   LAYOUT HELPERS
────────────────────────────────────── */
.container {
    padding: 0.5rem;
}

.three-card {
    display: grid;


}

/* 2 cột: nội dung chính | sidebar hẹp */
.two-card {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 1rem;
    align-items: start;


}

/* 1 cột full */
.one-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.date-picker {
    position: relative;
    cursor: pointer;
}

.date-picker::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    /* Không có opacity: 0 — icon vẫn hiện */
    /* Nhưng cần đẩy icon về phải */
    background-position: right 0.6rem center;
    background-size: 16px;
}

/* ──────────────────────────────────────
   CARD BASE
────────────────────────────────────── */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--foreground)
}



.card-content {
    padding: 1rem 1.2rem;
}

/* ──────────────────────────────────────
   SECTION TITLE (orange left-border)
────────────────────────────────────── */
.section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-left: 2px solid var(--primary);
    padding-left: 0.5rem;
    white-space: nowrap;
    margin-bottom: 0;

}

/* ──────────────────────────────────────
   BUTTONS
────────────────────────────────────── */
.btn {
    /* padding: 0.45rem 1rem; */
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 0.83rem;
    font-weight: 600;
    transition: opacity var(--transition-fast),
        transform var(--transition-fast);
    white-space: nowrap;
background-color: transparent;
    
}

.btn:hover:not(:disabled) {
    /* opacity: 0.88; */
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-on-title {
    background: var(--primary);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

/* ──────────────────────────────────────
   INDEX / DASHBOARD CARDS
────────────────────────────────────── */
.page-wrapper {
    padding: var(--spacing-lg) var(--spacing-sm);
    min-height: 100vh;
}

.hero-title {
    color: var(--text-primary);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: var(--shadow-md);
}

.welcome-text {
    color: var(--foreground);
    font-size: 1.125rem;
}

.welcome-text strong {
    color: var(--text-primary);
}

.btn:hover:not(:disabled) {
    background-color: transparent;
    /* border: 2px solid currentColor; */
}

.btn-icon {
    width: 80px;
    height: 80px;
    margin-bottom: var(--spacing-sm);
}

.btn-custom span {
    font-size: 1.125rem;
    z-index: 1;
    color: var(--text-primary);
}

/* Logout */
.logout-btn {
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    color: var(--text-primary) !important;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
    background: transparent;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: var(--text-primary) !important;
}

/* ──────────────────────────────────────
   LOADING SCREEN
────────────────────────────────────── */
.loading-screen {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-screen h2 {
    margin-bottom: var(--spacing-xs);
    color: var(--primary);
}

.loading-screen p {
    color: var(--text-muted);
}


/* ──────────────────────────────────────
   RESPONSIVE
────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .btn-custom {
        padding: 2rem 1rem;
    }

    .btn-icon {
        width: 60px;
        height: 60px;
    }

    .two-card {
        grid-template-columns: 1fr;
    }

    .three-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .page-wrapper {
        padding: var(--spacing-sm) var(--spacing-xs);
    }
}