/* =============================================================================
   Base & Typography — Modern Premium Style (Argon Dashboard Inspired)
   ========================================================================== */

@import url("https://fonts.bunny.net/css2?family=Nunito:wght@400;600;700&display=swap");

:root {
    /* Sidebar */
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --sidebar-bg: #6a1b9a;
    --sidebar-text: #f3f4f6;
    --sidebar-hover: rgba(255, 255, 255, 0.15);
    --sidebar-active: #ffffff;

    /* Layout */
    --body-bg: #f9fafb;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-color: #1e293b;
    --text-muted: #6b7280;

    /* Primary Brand */
    --primary: #4f46e5;
    --primary-hover: #4338ca;

    /* Stat Card Colors */
    --stat-products-bg: #eef2ff;
    --stat-products-color: #4f46e5;
    --stat-clients-bg: #ecfdf5;
    --stat-clients-color: #10b981;
    --stat-sales-bg: #eff6ff;
    --stat-sales-color: #3b82f6;
    --stat-attendance-bg: #fff7ed;
    --stat-attendance-color: #f59e0b;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    font-family: "Nunito", -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-color);
    background-color: var(--body-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* =============================================================================
   Layout: Sidebar & Topbar
   ========================================================================== */

#sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    transition: width 0.3s;
    box-shadow: var(--shadow);
    z-index: 10000;
}

#sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

#sidebar .nav-link {
    color: var(--sidebar-text);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    margin: 5px 10px;
}

#sidebar .nav-link:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-active);
}

#sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 700;
}

#sidebar .nav-icon {
    width: 22px;
    margin-right: 12px;
    font-size: 1.1rem;
    text-align: center;
}

#sidebar.collapsed .nav-text {
    display: none;
}

#content-wrapper {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s;
    background-color: var(--body-bg);
    min-height: 100vh;
}

#content-wrapper.sidebar-collapsed {
    margin-left: var(--sidebar-collapsed-width);
}

#topbar {
    background: #fff;
    box-shadow: var(--shadow-sm);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =============================================================================
   Cards & Components
   ========================================================================== */

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: none;
}

.card-header {
    font-weight: 600;
    font-size: 1.05rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #344767;
}

/* Buttons */
.btn-gradient {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    transition: 0.3s;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn-gradient:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* =============================================================================
   Tables (Argon Authors Style)
   ========================================================================== */

.table {
    width: 100%;
}

.table th {
    background: #f8f9fa;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* Avatar */
.avatar-product {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
}

/* =============================================================================
   Badges (Argon-compatible)
   ========================================================================== */

.badge {
    display: inline-block;
    padding: 0.25em 0.5em;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-sm {
    padding: 0.2em 0.4em;
    font-size: 0.65rem;
    border-radius: 0.2rem;
}

/* Gradient Badges */
.bg-gradient-primary   { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.bg-gradient-secondary { background: linear-gradient(135deg, #6b7280, #9ca3af); }
.bg-gradient-success   { background: linear-gradient(135deg, #10b981, #34d399); }
.bg-gradient-info      { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.bg-gradient-warning   { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.bg-gradient-danger    { background: linear-gradient(135deg, #ef4444, #f87171); }

/* =============================================================================
   Forms & Validation
   ========================================================================== */

.form-control {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    border: 1px solid #cbd5e1;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    outline: none;
}

.error-feedback {
    color: #e63946;
    font-size: 0.8rem;
    margin-top: 3px;
}

/* =============================================================================
   Modals
   ========================================================================== */

.modal-content {
    border-radius: 1rem;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

#current-image img {
  width:80px;
  height:80px;
  box-shadow: 0 0 5px rgb(116, 116, 116);
}

/* =============================================================================
   Dashboard Stat Cards
   ========================================================================== */

.section-header {
    font-weight: 700;
    font-size: 1.5rem;
    color: #111827;
    margin-bottom: 24px;
    border-left: 4px solid var(--primary);
    padding-left: 12px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.6rem;
    margin-bottom: 16px;
}

.stat-title {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.stat-value {
    color: #111827;
    font-weight: 700;
    font-size: 1.9rem;
}

/* =============================================================================
   Public Pages (Welcome, Login)
   ========================================================================== */

.hero {
    padding: 100px 0 80px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    text-align: center;
}

.hero-logo {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 16px;
}

.hero h1 {
    font-weight: 700;
    font-size: 2.6rem;
    color: #0f172a;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.btn-signin {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 36px;
    font-weight: 600;
    font-size: 1.05rem;
    border-radius: var(--radius-md);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
}

.btn-signin:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.login-container {
    max-width: 420px;
    margin: 0 auto;
    padding: 50px 20px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 2.2rem;
    color: var(--primary);
}

.login-header h1 {
    font-weight: 700;
    font-size: 1.8rem;
    color: #111827;
    margin-bottom: 6px;
}

.login-header p {
    color: var(--text-muted);
}

.btn-login {
    background: var(--primary);
    border: none;
    color: white;
    padding: 12px;
    width: 100%;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.05rem;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* =============================================================================
   Responsive
   ========================================================================== */

@media (max-width: 992px) {
    #sidebar {
        transform: translateX(-100%);
    }
    #sidebar.show {
        transform: translateX(0);
    }
    #content-wrapper {
        margin-left: 0;
    }
    #topbar {
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.1rem;
    }
    .btn-signin {
        width: 100%;
        padding: 12px 24px;
    }
    .page-header h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 15px;
    }
    .stat-card {
        padding: 16px;
    }
}

.collapsed .sidebar-brand-text {
    display: none;
}