/* ===========================
   CSS CUSTOM PROPERTIES
   =========================== */

:root {
    --sidebar-width: 260px;
    --navbar-height: 56px;
    --cg-primary: #2563eb;
    --cg-primary-light: #eff6ff;
    --cg-primary-dark: #1d4ed8;
    --cg-surface: #ffffff;
    --cg-surface-secondary: #f8fafc;
    --cg-border: #e2e8f0;
    --cg-text-primary: #0f172a;
    --cg-text-secondary: #64748b;
    --cg-text-muted: #94a3b8;
    --cg-success: #16a34a;
    --cg-success-light: #f0fdf4;
    --cg-warning: #d97706;
    --cg-warning-light: #fffbeb;
    --cg-danger: #dc2626;
    --cg-danger-light: #fef2f2;
    --cg-info: #0891b2;
    --cg-info-light: #ecfeff;
    --cg-purple: #7c3aed;
    --cg-purple-light: #f5f3ff;
    --cg-radius-sm: 0.375rem;
    --cg-radius-md: 0.5rem;
    --cg-radius-lg: 0.75rem;
    --cg-radius-xl: 1rem;
    --cg-shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --cg-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --cg-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --cg-transition: 0.2s ease;
}

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--cg-surface-secondary);
    color: var(--cg-text-primary);
    margin: 0;
}

/* Authenticated layout uses flexbox for sticky footer */
body.authenticated-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-bottom: 0;
}

/* Guest layout keeps simple centered style */
body.guest-layout {
    margin-bottom: 60px;
    background: #fff;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ===========================
   VALIDATION STYLES
   =========================== */

.required-field::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #198754;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.valid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #198754;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

.form-control.is-valid ~ .valid-feedback,
.form-control.is-invalid ~ .invalid-feedback,
.form-select.is-valid ~ .valid-feedback,
.form-select.is-invalid ~ .invalid-feedback {
    display: block;
}

.password-strength-meter {
    height: 4px;
    background-color: #e9ecef;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-meter-fill {
    height: 100%;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0%;
}

.password-strength-meter-fill.strength-weak { width: 33%; background-color: #dc3545; }
.password-strength-meter-fill.strength-medium { width: 66%; background-color: #ffc107; }
.password-strength-meter-fill.strength-strong { width: 100%; background-color: #198754; }

.password-strength-text {
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.password-strength-text.strength-weak { color: #dc3545; }
.password-strength-text.strength-medium { color: #fd7e14; }
.password-strength-text.strength-strong { color: #198754; }

.field-validation-error {
    color: #dc3545;
    font-size: 0.875em;
    display: block;
    margin-top: 0.25rem;
}

.field-validation-valid {
    display: none;
}

.input-validation-error {
    border-color: #dc3545 !important;
    background-color: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
}

.input-validation-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25) !important;
}

.form-control.is-valid:focus,
.form-select.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.validation-summary-errors {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 1.5rem;
    color: #842029;
}

.validation-summary-valid {
    display: none;
}

/* ===========================
   SIDEBAR NAVIGATION
   =========================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--cg-surface);
    border-right: 1px solid var(--cg-border);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: transform var(--cg-transition);
}

.sidebar-brand {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--cg-border);
    min-height: var(--navbar-height);
    text-decoration: none;
    color: inherit;
}

.sidebar-brand:hover {
    color: inherit;
    text-decoration: none;
}

.sidebar-brand-icon {
    width: 32px;
    height: 32px;
    background: var(--cg-primary);
    border-radius: var(--cg-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-brand-icon img {
    max-height: 28px;
    max-width: 28px;
    object-fit: contain;
}

.sidebar-brand-text {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--cg-text-primary);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
}

.sidebar-section {
    padding: 0 0.75rem;
    margin-bottom: 0.25rem;
}

.sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--cg-text-muted);
    padding: 0.75rem 0.75rem 0.375rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--cg-radius-md);
    color: var(--cg-text-secondary);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--cg-transition);
    margin-bottom: 1px;
}

.sidebar-link:hover {
    background: var(--cg-surface-secondary);
    color: var(--cg-text-primary);
    text-decoration: none;
}

.sidebar-link.active {
    background: var(--cg-primary-light);
    color: var(--cg-primary);
}

.sidebar-link i {
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-link .badge {
    margin-left: auto;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.2em 0.5em;
}

.sidebar-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--cg-border);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem;
    border-radius: var(--cg-radius-md);
    cursor: pointer;
    transition: background var(--cg-transition);
    text-decoration: none;
    color: inherit;
}

.sidebar-user:hover {
    background: var(--cg-surface-secondary);
    text-decoration: none;
    color: inherit;
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--cg-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--cg-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: var(--cg-text-muted);
}

.sidebar-logout-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--cg-text-muted);
    transition: color var(--cg-transition);
}

.sidebar-logout-btn:hover {
    color: var(--cg-danger);
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1035;
    display: none;
}

.sidebar-overlay.show {
    display: block;
}

/* ===========================
   MAIN CONTENT AREA
   =========================== */

.main-wrapper {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top bar */
.topbar {
    background: var(--cg-surface);
    border-bottom: 1px solid var(--cg-border);
    padding: 0 1.5rem;
    height: var(--navbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.topbar .breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
    font-size: 0.8125rem;
}

.topbar .breadcrumb-item a {
    color: var(--cg-text-secondary);
    text-decoration: none;
}

.topbar .breadcrumb-item a:hover {
    color: var(--cg-primary);
}

.topbar .breadcrumb-item.active {
    color: var(--cg-text-primary);
    font-weight: 500;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--cg-radius-md);
    border: 1px solid var(--cg-border);
    background: var(--cg-surface);
    color: var(--cg-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--cg-transition);
    position: relative;
}

.topbar-btn:hover {
    background: var(--cg-surface-secondary);
    color: var(--cg-text-primary);
}

.topbar-search {
    position: relative;
}

.topbar-search i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cg-text-muted);
    font-size: 0.875rem;
    pointer-events: none;
}

.topbar-search input {
    padding-left: 2.25rem;
    font-size: 0.8125rem;
    border: 1px solid var(--cg-border);
    border-radius: var(--cg-radius-md);
    height: 36px;
    background: var(--cg-surface);
    width: 240px;
}

.topbar-search input:focus {
    border-color: var(--cg-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    outline: none;
}

.sidebar-toggle {
    display: none;
}

.content-area {
    flex: 1;
    padding: 1.5rem;
}

/* ===========================
   PAGE HEADER
   =========================== */

.page-header {
    margin-bottom: 1.5rem;
}

.page-header-greeting {
    font-size: 0.8125rem;
    color: var(--cg-text-muted);
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cg-text-primary);
    margin: 0;
    line-height: 1.3;
}

.page-header p {
    color: var(--cg-text-secondary);
    font-size: 0.875rem;
    margin: 0.25rem 0 0;
}

/* ===========================
   STAT CARDS
   =========================== */

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--cg-surface);
    border: 1px solid var(--cg-border);
    border-radius: var(--cg-radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    transition: box-shadow var(--cg-transition);
}

.stat-card:hover {
    box-shadow: var(--cg-shadow-md);
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--cg-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.stat-icon.primary { background: var(--cg-primary-light); color: var(--cg-primary); }
.stat-icon.success { background: var(--cg-success-light); color: var(--cg-success); }
.stat-icon.warning { background: var(--cg-warning-light); color: var(--cg-warning); }
.stat-icon.info    { background: var(--cg-info-light);    color: var(--cg-info); }
.stat-icon.purple  { background: var(--cg-purple-light);  color: var(--cg-purple); }

.stat-content { flex: 1; }

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cg-text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--cg-text-muted);
    font-weight: 500;
    margin-top: 0.125rem;
}

.stat-change {
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.25rem;
    color: var(--cg-text-muted);
}

.stat-change.up { color: var(--cg-success); }
.stat-change.down { color: var(--cg-danger); }

/* ===========================
   QUICK ACTION CARDS
   =========================== */

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.action-card {
    background: var(--cg-surface);
    border: 1px solid var(--cg-border);
    border-radius: var(--cg-radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    color: inherit;
    transition: all var(--cg-transition);
    cursor: pointer;
}

.action-card:hover {
    border-color: var(--cg-primary);
    box-shadow: var(--cg-shadow-md);
    color: inherit;
    transform: translateY(-2px);
    text-decoration: none;
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--cg-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.action-card-body {
    flex: 1;
    min-width: 0;
}

.action-card-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--cg-text-primary);
    margin-bottom: 0.125rem;
}

.action-card-desc {
    font-size: 0.75rem;
    color: var(--cg-text-muted);
}

.action-card-arrow {
    color: var(--cg-text-muted);
    font-size: 0.875rem;
    transition: transform var(--cg-transition);
}

.action-card:hover .action-card-arrow {
    transform: translateX(3px);
    color: var(--cg-primary);
}

/* ===========================
   CONTENT CARDS
   =========================== */

.content-card {
    background: var(--cg-surface);
    border: 1px solid var(--cg-border);
    border-radius: var(--cg-radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
}

.content-card-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--cg-border);
}

.content-card-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.content-card-body {
    padding: 1.25rem;
}

.content-card-body.flush {
    padding: 0;
}

/* ===========================
   ACTIVITY FEED
   =========================== */

.activity-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--cg-border);
    transition: background var(--cg-transition);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: var(--cg-surface-secondary);
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 0.375rem;
    flex-shrink: 0;
}

.activity-dot.blue { background: var(--cg-primary); }
.activity-dot.green { background: var(--cg-success); }
.activity-dot.orange { background: var(--cg-warning); }
.activity-dot.purple { background: var(--cg-purple); }

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 0.8125rem;
    color: var(--cg-text-primary);
    line-height: 1.4;
}

.activity-text strong {
    font-weight: 600;
}

.activity-time {
    font-size: 0.7rem;
    color: var(--cg-text-muted);
    margin-top: 0.125rem;
}

/* ===========================
   UPCOMING COURSES
   =========================== */

.upcoming-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--cg-border);
    transition: background var(--cg-transition);
    text-decoration: none;
    color: inherit;
}

.upcoming-item:last-child {
    border-bottom: none;
}

.upcoming-item:hover {
    background: var(--cg-surface-secondary);
    color: inherit;
    text-decoration: none;
}

.upcoming-date {
    width: 44px;
    height: 44px;
    background: var(--cg-primary-light);
    border-radius: var(--cg-radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upcoming-date-month {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--cg-primary);
    line-height: 1;
}

.upcoming-date-day {
    font-size: 1rem;
    font-weight: 700;
    color: var(--cg-primary-dark);
    line-height: 1.1;
}

.upcoming-info {
    flex: 1;
    min-width: 0;
}

.upcoming-title {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--cg-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upcoming-meta {
    font-size: 0.7rem;
    color: var(--cg-text-muted);
}

.upcoming-enrollment {
    text-align: right;
    flex-shrink: 0;
}

.enrollment-bar {
    width: 60px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-left: auto;
}

.enrollment-fill {
    height: 100%;
    border-radius: 2px;
}

.enrollment-fill.low { background: var(--cg-success); }
.enrollment-fill.mid { background: var(--cg-warning); }
.enrollment-fill.full { background: var(--cg-danger); }

.enrollment-text {
    font-size: 0.65rem;
    color: var(--cg-text-muted);
    margin-top: 0.125rem;
    text-align: right;
}

/* ===========================
   DASHBOARD GRID
   =========================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ===========================
   SECTION LABEL
   =========================== */

.section-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cg-text-muted);
    margin-bottom: 0.75rem;
}

/* ===========================
   HOMEPAGE HERO (guest landing page)
   =========================== */

.hero-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 50%, #f5f0ff 100%);
    border-radius: 1rem;
    padding: 3rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(13, 110, 253, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-section .display-5 {
    font-weight: 700;
    color: #1a1a2e;
}

.hero-section .lead {
    color: #5a6275;
    font-size: 1.15rem;
    max-width: 600px;
}

.hero-greeting {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

/* ===========================
   DASHBOARD CARDS (kept for backwards compat)
   =========================== */

.dash-card {
    border: none;
    border-radius: 0.875rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.dash-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
}

.dash-card .card-body {
    padding: 1.75rem 1.5rem;
}

.dash-card .card-icon {
    width: 52px;
    height: 52px;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.dash-card .card-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: #1a1a2e;
    margin-bottom: 0.5rem;
}

.dash-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    min-height: 2.7em;
}

.dash-card .btn {
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
}

/* Card icon color variants */
.card-icon-primary   { background: rgba(13, 110, 253, 0.1);  color: #0d6efd; }
.card-icon-success   { background: rgba(25, 135, 84, 0.1);   color: #198754; }
.card-icon-info      { background: rgba(13, 202, 240, 0.1);  color: #0891b2; }
.card-icon-warning   { background: rgba(255, 193, 7, 0.1);   color: #ca8a04; }
.card-icon-secondary { background: rgba(108, 117, 125, 0.1); color: #6c757d; }
.card-icon-purple    { background: rgba(111, 66, 193, 0.1);  color: #6f42c1; }

/* Landing page cards */
.landing-card {
    border: none;
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.landing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.landing-card .landing-icon {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

/* Features list on landing page */
.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.feature-item i {
    font-size: 1.25rem;
    color: #0d6efd;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.feature-item div strong {
    color: #1a1a2e;
    font-size: 0.95rem;
}

.feature-item div span {
    color: #6c757d;
    font-size: 0.875rem;
}

/* ===========================
   NAVBAR (kept for guest layout)
   =========================== */

.navbar .nav-link i {
    margin-right: 0.25rem;
    font-size: 0.95em;
}

/* ===========================
   FOOTER
   =========================== */

.footer {
    background-color: #f8f9fa;
}

.footer a {
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Authenticated sticky footer */
.footer-sticky {
    background: var(--cg-surface);
    border-top: 1px solid var(--cg-border);
    padding: 1rem 1.5rem;
    font-size: 0.75rem;
    color: var(--cg-text-muted);
    margin-top: auto;
}

.footer-sticky a {
    color: var(--cg-text-muted);
    text-decoration: none;
}

.footer-sticky a:hover {
    color: var(--cg-primary);
    text-decoration: underline;
}

/* ===========================
   VIEW TABS
   =========================== */

.view-tabs {
    display: flex;
    gap: 0.25rem;
    background: var(--cg-surface-secondary);
    border-radius: var(--cg-radius-md);
    padding: 0.25rem;
    border: 1px solid var(--cg-border);
}

.view-tab {
    padding: 0.375rem 0.75rem;
    border-radius: var(--cg-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--cg-text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--cg-transition);
}

.view-tab.active {
    background: var(--cg-surface);
    color: var(--cg-text-primary);
    box-shadow: var(--cg-shadow-sm);
}

.view-tab:hover:not(.active) {
    color: var(--cg-text-primary);
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
        box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .content-area {
        padding: 1rem;
    }

    .topbar {
        padding: 0 1rem;
    }
}
