/* =====================================================
   style.css — Venostra Hub Dashboard System 2026
   Theme: Emerald Green (#10B981) | SaaS 2026
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans:wght@400;600&family=Roboto:wght@700;900&display=swap');

/* ── CSS VARIABLES ─────────────────────────────────── */
:root {
    --primary-color:    #10B981;
    --primary-dark:     #059669;
    --primary-light:    rgba(16, 185, 129, 0.12);
    --primary-gradient: linear-gradient(135deg, #10B981 0%, #059669 100%);

    --brand-dark:       #056307;
    --brand-text:       #162114;

    --bg-color:         #F0F4F0;
    --surface:          #FFFFFF;
    --surface-2:        #F8FAFA;
    --glass-bg:         rgba(255, 255, 255, 0.7);
    --glass-border:     rgba(16, 185, 129, 0.15);

    --sidebar-bg:       #0F1F14;
    --sidebar-width:    240px;

    --text-primary:     #111827;
    --text-secondary:   #374151;
    --text-muted:       #6B7280;
    --text-light:       #9CA3AF;

    --border-color:     rgba(0, 0, 0, 0.08);
    --border-light:     rgba(255, 255, 255, 0.1);

    --danger-color:     #EF4444;
    --warning-color:    #F59E0B;
    --info-color:       #3B82F6;
    --success-color:    #10B981;

    --radius-sm:        8px;
    --radius-md:        12px;
    --radius-lg:        16px;
    --radius-xl:        24px;

    --shadow-sm:        0 1px 3px rgba(0,0,0,0.08);
    --shadow-md:        0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg:        0 8px 32px rgba(0,0,0,0.1);
    --shadow-deep:      0 16px 48px rgba(0,0,0,0.14);

    --transition:       all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── RESET & BASE ──────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Inter', 'Noto Sans', sans-serif;
    background: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── DASHBOARD LAYOUT ──────────────────────────────── */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 28px 32px;
    min-height: 100vh;
    background: var(--bg-color);
    transition: margin-left 0.3s ease;
}

/* ── SIDEBAR ───────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    transition: width 0.3s ease;
}

.sidebar-logo {
    padding: 24px 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-logo img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
}

.sidebar-logo-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.sidebar-logo-text span {
    color: var(--primary-color);
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-md);
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.95);
}

.sidebar-nav a.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
}

.sidebar-nav a i {
    width: 18px;
    font-size: 0.95rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-nav .nav-label { font-size: 0.67rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.25); padding: 14px 14px 6px; font-weight: 600; }

.sidebar-footer {
    padding: 12px 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.05);
    margin-bottom: 6px;
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
}

.sidebar-user-info strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #ffffff;
}

.sidebar-user-info small {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
}

.sidebar-footer a.logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: var(--radius-md);
    color: rgba(255,255,255,0.4);
    font-size: 0.82rem;
    transition: var(--transition);
}

.sidebar-footer a.logout:hover {
    background: rgba(239,68,68,0.12);
    color: #EF4444;
}

.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    width: 100%;
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    font-size: 0.78rem;
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius-sm);
}

.sidebar-collapse-btn:hover { color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.04); }

/* ── DASHBOARD HEADER ──────────────────────────────── */
.dashboard-header {
    margin-bottom: 28px;
}

.header-info h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.header-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 3px;
}

/* ── STATS CARDS GRID ──────────────────────────────── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stats-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stats-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stats-card.glass {
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(12px);
    border-color: var(--glass-border);
}

.stats-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stats-info h3 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-info .value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.sub-metric {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.sub-metric strong { color: var(--text-secondary); }

.trend-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.trend-badge.up { background: rgba(16,185,129,0.1); color: #10B981; }
.trend-badge.down { background: rgba(239,68,68,0.1); color: #EF4444; }
.trend-badge.neutral { background: rgba(107,114,128,0.1); color: #6B7280; }

/* ── OPERATIONAL LISTS ─────────────────────────────── */
.management-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.op-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.op-card h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.op-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; }

.op-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    transition: var(--transition);
}

.op-item:hover { background: var(--primary-light); }

.op-user { display: flex; align-items: center; gap: 10px; }

.op-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 700;
}

.op-info span { font-size: 0.83rem; font-weight: 600; color: var(--text-primary); display: block; }
.op-info small { font-size: 0.73rem; color: var(--text-muted); }

.op-action {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    font-size: 0.85rem;
}

.op-action:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); }

.stock-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
}
.stock-badge.empty { background: rgba(239,68,68,0.1); color: #EF4444; }
.stock-badge.low { background: rgba(245,158,11,0.1); color: #F59E0B; }

.birthday-item { background: rgba(16,185,129,0.06) !important; }

/* ── CHARTS SECTION ────────────────────────────────── */
.charts-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.chart-container {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.chart-container h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.chart-container canvas { max-height: 240px; }
.heatmap-container canvas { max-height: 200px; }

.activity-feed {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.activity-feed h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.feed-items { display: flex; flex-direction: column; max-height: 280px; overflow-y: auto; }

/* ── GLASS EFFECT ──────────────────────────────────── */
.glass {
    background: rgba(255,255,255,0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(16,185,129,0.12) !important;
}

/* ── PAGE HEADER (MÓDULOS) ─────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.page-header .subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 2px;
}

/* ── DATA TABLES ───────────────────────────────────── */
.table-wrapper {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr:hover { background: rgba(16,185,129,0.03); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ── BADGES & PILLS ────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success { background: rgba(16,185,129,0.1); color: #059669; }
.badge-danger  { background: rgba(239,68,68,0.1);  color: #DC2626; }
.badge-warning { background: rgba(245,158,11,0.1); color: #D97706; }
.badge-info    { background: rgba(59,130,246,0.1);  color: #2563EB; }
.badge-default { background: rgba(107,114,128,0.1); color: var(--text-muted); }
.badge-primary { background: var(--primary-light); color: var(--primary-dark); }

/* ── BUTTONS ───────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16,185,129,0.4);
}

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

.btn-secondary:hover { background: var(--surface-2); }

.btn-danger { background: #EF4444; color: white; }
.btn-danger:hover { background: #DC2626; }

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline:hover { background: var(--primary-light); }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

/* ── FORMS ─────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}

.form-control::placeholder { color: var(--text-light); }

select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 90px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── MODALS ────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.2s;
}

.modal-overlay.active { opacity: 1; }

.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 100%;
    max-width: 560px;
    box-shadow: var(--shadow-deep);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.active .modal { transform: scale(1); }

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-header h2 { font-size: 1.2rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: var(--radius-sm); transition: var(--transition); }
.modal-close:hover { background: var(--surface-2); color: var(--text-primary); }

/* ── ALERT / TOAST ─────────────────────────────────── */
.alert {
    padding: 13px 18px;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
}

.alert-success { background: rgba(16,185,129,0.08); border-color: rgba(16,185,129,0.2); color: #065F46; }
.alert-danger   { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); color: #991B1B; }
.alert-warning  { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.2); color: #92400E; }
.alert-info     { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.2); color: #1E40AF; }

/* ── CARDS ─────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

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

.card-header h2 { font-size: 1rem; font-weight: 700; }
.card-header h3 { font-size: 0.95rem; font-weight: 700; }

/* ── SEARCH & FILTERS ──────────────────────────────── */
.search-bar {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.search-bar input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition);
    color: var(--text-primary);
}

.search-bar input:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
.search-bar i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; }

.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* ── PAGINATION ────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    padding: 20px 0 8px;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    transition: var(--transition);
}

.pagination a:hover { background: var(--primary-light); color: var(--primary-color); border-color: var(--primary-color); }
.pagination .active { background: var(--primary-gradient); color: white; border-color: transparent; }

/* ── AVATAR ────────────────────────────────────────── */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--primary-light);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
    border: 2px solid var(--surface);
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.78rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.2rem; }

/* ── EMPTY STATE ───────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i { font-size: 2.5rem; margin-bottom: 14px; opacity: 0.4; }
.empty-state p { font-size: 0.9rem; }

/* ── TRIAL BANNER ──────────────────────────────────── */
.trial-banner {
    background: var(--primary-gradient);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-deep);
    font-size: 0.875rem;
}

/* ── PROFILE PAGE ──────────────────────────────────── */
.profile-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.profile-cover {
    height: 120px;
    background: var(--primary-gradient);
}

.profile-body {
    padding: 0 28px 28px;
}

.profile-avatar-wrap {
    margin-top: -40px;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* ── ANIMATIONS ────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-16px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.95); }
}

.reveal { opacity: 0; animation: fadeUp 0.6s ease forwards; }
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }

/* ── SCROLLBAR ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

/* ── TEXT UTILITIES ────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary-color { color: var(--primary-color); }
.text-danger { color: var(--danger-color); }
.text-success { color: var(--success-color); }
.text-warning { color: var(--warning-color); }
.text-sm { font-size: 0.82rem; }
.text-xs { font-size: 0.72rem; }
.fw-700 { font-weight: 700; }
.fw-600 { font-weight: 600; }

/* ── SPACING ───────────────────────────────────────── */
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }

/* ── FLEX / GRID UTILS ─────────────────────────────── */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* ── GRADIENTE SECTION TITLE ───────────────────────── */
.grad-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── LOGIN PAGE ────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F0F4F0;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    border: 1px solid rgba(16,185,129,0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo img { width: 56px; height: 56px; border-radius: 14px; }
.login-logo h2 { font-size: 1.3rem; font-weight: 800; margin-top: 12px; letter-spacing: -0.5px; }
.login-logo p { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

.login-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px rgba(16,185,129,0.35);
    margin-top: 8px;
}

.login-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16,185,129,0.45); }

/* ── ACADEMIAS MODULE ──────────────────────────────── */
.academia-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.academia-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ── HEALTH INDEX ──────────────────────────────────── */
.health-bar {
    height: 6px;
    background: rgba(0,0,0,0.06);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.health-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--primary-gradient);
    transition: width 1s ease;
}

.health-bar-fill.low { background: linear-gradient(90deg, #EF4444, #F97316); }
.health-bar-fill.mid { background: linear-gradient(90deg, #F59E0B, #FBBF24); }

/* ── GRADUAÇÕES / FAIXAS ───────────────────────────── */
.faixa-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* ── FINANCEIRO ────────────────────────────────────── */
.fin-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.fin-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.fin-card .label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.fin-card .amount { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); letter-spacing: -0.5px; margin-top: 4px; }
.fin-card .amount.green { color: var(--primary-dark); }
.fin-card .amount.red { color: var(--danger-color); }

/* ── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 1024px) {
    .sidebar { width: 200px; }
    .main-content { margin-left: 200px; }
    .charts-section { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    :root { --sidebar-width: 0px; }

    .sidebar {
        transform: translateX(-100%);
        width: 240px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .management-section { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }

    .page-header { flex-direction: column; align-items: flex-start; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .search-bar { max-width: 100%; }

    .header-info h1 { font-size: 1.3rem; }
}

@media (max-width: 480px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .fin-summary { grid-template-columns: 1fr; }
}

/* ── LOGIN PAGE SPECIFIC ───────────────────────────── */
body.login-page {
    background: linear-gradient(135deg, #F0F4F0 0%, #E8F5EE 100%);
}

/* ── TOGGLE MOBILE MENU ────────────────────────────── */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--sidebar-bg);
    border: none;
    color: white;
    font-size: 1.1rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: flex; }
}

/* ── TOTEM / CHECKIN ───────────────────────────────── */
.totem-body {
    min-height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ── PRINT UTILS ───────────────────────────────────── */
@media print {
    .sidebar, .mobile-menu-btn, .btn, .filter-bar { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 0; }
    .card, .table-wrapper { box-shadow: none; border: 1px solid #ddd; }
}
