/* ═══════════════════════════════════════════════════
   SEAES Accounts — Main Stylesheet
   Brand: Inter font, #1a5eb4 blue, #dc2626 red
   Framework: Bootstrap 5.3.3
   ═══════════════════════════════════════════════════ */

:root {
    --seaes-blue: #1a5eb4;
    --seaes-blue-hover: #15508a;
    --seaes-blue-light: #e8f0fb;
    --seaes-red: #dc2626;
    --seaes-red-hover: #b91c1c;
    --seaes-gray-50: #f8f9fa;
    --seaes-gray-100: #f3f4f6;
    --seaes-gray-200: #e5e7eb;
    --seaes-gray-300: #d1d5db;
    --seaes-gray-500: #6b7280;
    --seaes-gray-700: #374151;
    --seaes-gray-900: #111827;
}

/* ── Global ───────────────────────────────────────── */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--seaes-gray-700);
    background-color: var(--seaes-gray-50);
}

/* ── Bootstrap overrides ──────────────────────────── */

.btn-primary {
    background-color: var(--seaes-blue);
    border-color: var(--seaes-blue);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: var(--seaes-blue-hover);
    border-color: var(--seaes-blue-hover);
}
.btn-outline-primary {
    color: var(--seaes-blue);
    border-color: var(--seaes-blue);
}
.btn-outline-primary:hover {
    background-color: var(--seaes-blue);
    border-color: var(--seaes-blue);
}
.text-primary { color: var(--seaes-blue) !important; }
a { color: var(--seaes-blue); }
a:hover { color: var(--seaes-blue-hover); }
.form-control:focus, .form-select:focus {
    border-color: var(--seaes-blue);
    box-shadow: 0 0 0 0.2rem rgba(26, 94, 180, 0.15);
}

/* ── Top logo (auth pages) ────────────────────────── */

.seaes-top-logo {
    position: fixed; top: 16px; left: 24px; z-index: 1000;
    text-decoration: none; opacity: 0.9; transition: opacity 0.15s;
}
.seaes-top-logo:hover { opacity: 1; }
.seaes-top-logo img { height: 22px; width: auto; }

/* ── Auth layout ──────────────────────────────────── */

.auth-layout { background: linear-gradient(135deg, var(--seaes-gray-50) 0%, var(--seaes-blue-light) 100%); }
.auth-wrapper { min-height: 100vh; padding: 2rem 1rem; }
.auth-card { width: 100%; max-width: 440px; border-radius: 12px; overflow: visible; }
.auth-logo { height: 36px; max-width: 200px; width: auto; display: block; margin: 0 auto; }

/* ── Divider ──────────────────────────────────────── */

.divider-text { display: flex; align-items: center; color: var(--seaes-gray-500); font-size: 0.8rem; }
.divider-text::before, .divider-text::after { content: ''; flex: 1; border-bottom: 1px solid var(--seaes-gray-200); }
.divider-text span { padding: 0 12px; }

/* ═══════════════════════════════════════════════════
   HUB LAYOUT — Premium SaaS Dashboard
   ═══════════════════════════════════════════════════ */

.hub-layout { background-color: var(--seaes-gray-50); }

/* ── Topbar ───────────────────────────────────────── */

.hub-topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 200;
}
.hub-search {
    background: #f3f4f6;
    border: 1px solid transparent;
    border-radius: 20px;
    padding: 7px 16px 7px 36px;
    font-size: 0.85rem;
    width: 280px;
    transition: all 0.2s;
    color: var(--seaes-gray-700);
}
.hub-search:focus {
    background: #fff;
    border-color: var(--seaes-blue);
    box-shadow: 0 0 0 3px rgba(26,94,180,0.08);
    outline: none;
    width: 340px;
}
.hub-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--seaes-gray-500);
    font-size: 0.85rem;
}

/* ── Sidebar ──────────────────────────────────────── */

.sidebar {
    position: fixed;
    top: 60px;
    bottom: 0;
    z-index: 100;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border-right: 1px solid #f1f3f5;
    background-color: #fff;
    width: 220px;
}
.sidebar .nav-link {
    color: #4b5563;
    padding: 0.6rem 1rem;
    margin: 2px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar .nav-link i { font-size: 1rem; width: 20px; text-align: center; }
.sidebar .nav-link:hover {
    color: var(--seaes-blue);
    background-color: #e8f0fe;
}
.sidebar .nav-link.active {
    color: var(--seaes-blue);
    background-color: #e8f0fe;
    font-weight: 600;
}

/* ── Avatars ──────────────────────────────────────── */

.avatar-sm {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--seaes-blue-light); color: var(--seaes-blue);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.85rem;
}
.avatar-lg {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--seaes-blue-light); color: var(--seaes-blue);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1.5rem;
}

/* ── Welcome card ─────────────────────────────────── */

.welcome-card {
    background: linear-gradient(135deg, #e8f0fb 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 28px 32px;
}
.welcome-stats {
    display: flex;
    gap: 24px;
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--seaes-gray-500);
    font-weight: 500;
}
.welcome-stats span { display: flex; align-items: center; gap: 4px; }

/* ── App cards (horizontal scroll) ────────────────── */

.apps-scroll-container {
    position: relative;
}
.apps-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 4px 2px 12px;
}
.apps-scroll::-webkit-scrollbar { display: none; }

.app-card {
    flex: 0 0 280px;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}
.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.app-icon-circle {
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.15rem; flex-shrink: 0;
}
.app-card-name { font-size: 1rem; font-weight: 600; color: var(--seaes-gray-900); margin-bottom: 2px; }
.app-card-desc { font-size: 0.8rem; color: var(--seaes-gray-500); line-height: 1.4; margin-bottom: 12px; min-height: 34px; }
.app-status-pill {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    background: #ecfdf5;
    color: #059669;
}
.app-open-link {
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}
.app-open-link:hover { opacity: 0.8; }

/* Scroll arrows */
.scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--seaes-gray-700);
    transition: all 0.2s;
    font-size: 0.85rem;
}
.scroll-arrow:hover { background: var(--seaes-gray-50); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.scroll-arrow.left { left: -12px; }
.scroll-arrow.right { right: -12px; }

/* ── Explore section (smaller tiles) ──────────────── */

.explore-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 14px;
}
.explore-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.explore-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
}

/* ── Section heading ──────────────────────────────── */

.section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--seaes-gray-900);
    margin-bottom: 16px;
}

/* ── Hub page cards ───────────────────────────────── */

.hub-card {
    border: 1px solid var(--seaes-gray-200);
    border-radius: 12px;
    background: #fff;
}

/* ── Stat cards ───────────────────────────────────── */

.stat-card {
    border: 1px solid var(--seaes-gray-200);
    border-radius: 12px;
    background: #fff;
}
.stat-card .stat-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}

/* ── Sidebar back link ────────────────────────────── */

.sidebar-back-link {
    color: var(--seaes-gray-500);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}
.sidebar-back-link:hover { color: var(--seaes-blue); }

/* ── Footer ───────────────────────────────────────── */

.hub-footer {
    text-align: center;
    padding: 24px 0;
    font-size: 0.75rem;
    color: var(--seaes-gray-500);
    margin-top: 40px;
}
.hub-footer a { color: var(--seaes-gray-500); text-decoration: none; }
.hub-footer a:hover { color: var(--seaes-blue); }

/* ── Cards ────────────────────────────────────────── */

.card { border-radius: 12px; }

/* ── Sessions ─────────────────────────────────────── */

.session-item { padding: 1rem; border: 1px solid var(--seaes-gray-200); border-radius: 8px; margin-bottom: 0.75rem; }
.session-item.current { border-color: var(--seaes-blue); background-color: var(--seaes-blue-light); }

/* ── Letter spacing for OTP inputs ────────────────── */

.letter-spacing-wide { letter-spacing: 0.3em; }

/* ── All-products tile ────────────────────────────── */

.app-tile {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
    border: 1px solid var(--seaes-gray-200) !important;
    background: #fff;
}
.app-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08) !important; }
.app-tile.coming-soon { opacity: 0.6; }

/* ── Responsive ───────────────────────────────────── */

@media (max-width: 991.98px) {
    .sidebar { display: none; }
    .hub-main { margin-left: 0 !important; }
}
@media (max-width: 767.98px) {
    .hub-search { width: 160px; }
    .hub-search:focus { width: 200px; }
    .app-card { flex: 0 0 260px; }
    .welcome-stats { flex-wrap: wrap; gap: 12px; }
}
