/* ==========================================================
   S'gelaHub Dashboard Core
   Complete Replacement — Consolidated Foundation + Components
   DB&B Engineering Standards
========================================================== */


/* ==========================================================
   GLOBAL DASHBOARD FOUNDATION
========================================================== */

html,
body {
    margin: 0;
    padding: 0;
}

body.sgh-dashboard-template {
    position: relative;
    min-width: 0;
    min-height: 100vh;
    overflow-x: hidden;
    box-sizing: border-box;
}

body.sgh-dashboard-template *,
body.sgh-dashboard-template *::before,
body.sgh-dashboard-template *::after {
    box-sizing: border-box;
}


/* ==========================================================
   PARTICLE BACKGROUND
========================================================== */

#sgh-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: block;
    pointer-events: none;
    z-index: 0;
}


/* ==========================================================
   APP HEADER — GLASS BLUE
========================================================== */

.sgh-appbar {
    position: relative;
    z-index: 9000;

    width: 100%;
    min-height: 94px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 14px 24px;

    background:
        linear-gradient(
            135deg,
            rgba(8, 29, 55, 0.94),
            rgba(15, 55, 91, 0.88)
        );

    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);

    border-bottom:
        1px solid rgba(95, 190, 255, 0.20);

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.16),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.sgh-brand {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 14px;

    color: #fff;

    text-decoration: none;
}

.sgh-brand:hover {
    color: #fff;
    text-decoration: none;
}

.sgh-brand img {
    width: 58px;
    height: 58px;

    min-width: 58px;
    min-height: 58px;

    max-width: 58px;
    max-height: 58px;

    flex: 0 0 58px;

    object-fit: contain;
    display: block;

    padding: 5px;

    border-radius: 16px;

    background:
        rgba(255, 255, 255, 0.08);

    border:
        1px solid rgba(130, 215, 255, 0.25);

    box-shadow:
        0 0 18px rgba(65, 180, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.sgh-brand > div {
    min-width: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sgh-brand .sgh-glow-text {
    display: block;

    font-size: 25px;
    line-height: 1.05;

    font-weight: 800;
    letter-spacing: -0.3px;

    white-space: nowrap;

    color: #fff;

    text-shadow:
        0 0 14px rgba(80, 190, 255, 0.35);
}

.sgh-brand small {
    display: block;

    margin-top: 5px;

    font-size: 12px;
    line-height: 1.2;

    font-weight: 500;
    letter-spacing: 0.2px;

    color:
        rgba(210, 238, 255, 0.72);
}

.sgh-appbar > .sgh-btn {
    flex: 0 0 auto;

    padding: 9px 16px;

    border-radius: 12px;

    border:
        1px solid rgba(120, 205, 255, 0.22);

    background:
        rgba(255, 255, 255, 0.07);

    color: #fff;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    transition:
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.sgh-appbar > .sgh-btn:hover {
    background:
        rgba(70, 175, 255, 0.18);

    transform: translateY(-1px);

    color: #fff;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.15);
}


/* ==========================================================
   MAIN WRAPPERS
========================================================== */

.sgh-wrap {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    padding:
        24px
        clamp(16px, 3vw, 32px)
        135px;

    position: relative;
    z-index: 1;
}

.sgh-container {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;

    padding:
        20px
        clamp(16px, 3vw, 20px);

    position: relative;
    z-index: 1;
}


/* ==========================================================
   DASHBOARD LAYOUT
========================================================== */

.sgh-dashboard {
    display: grid;
    gap: 24px;
}

.sgh-dashboard-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.sgh-main-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) 320px;
    gap: 24px;
}

.sgh-left-column,
.sgh-right-column {
    display: grid;
    gap: 20px;
}


/* ==========================================================
   GRID SYSTEM
========================================================== */

.sgh-grid {
    display: grid;
    gap: 20px;
}

.sgh-grid-2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.sgh-grid-3 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.sgh-grid-4 {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}


/* ==========================================================
   FLEX HELPERS
========================================================== */

.sgh-flex {
    display: flex;
}

.sgh-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sgh-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* ==========================================================
   DASHBOARD CARDS
========================================================== */

.sgh-card {
    position: relative;

    padding: 22px;

    border-radius: 18px;

    background:
        rgba(15, 23, 42, .72);

    border:
        1px solid rgba(255, 255, 255, .06);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .45),
        0 0 18px rgba(56, 189, 248, .08);

    transition:
        transform .25s ease,
        box-shadow .25s ease,
        border-color .25s ease;
}

.sgh-card:hover {
    transform: translateY(-2px);

    border-color:
        rgba(56, 189, 248, .18);

    box-shadow:
        0 16px 38px rgba(0, 0, 0, .55),
        0 0 26px rgba(56, 189, 248, .18);
}

.sgh-card-header {
    margin-bottom: 18px;
}

.sgh-card-title {
    margin: 0;

    font-size: 20px;
    font-weight: 700;

    color: #fff;
}

.sgh-card-body {
    display: block;
}

.sgh-card-footer {
    margin-top: 20px;
}

.sgh-card h1,
.sgh-card h2,
.sgh-card h3,
.sgh-card h4 {
    margin-top: 0;
    color: #fff;
}

.sgh-card p,
.sgh-card li,
.sgh-card small {
    color: #cbd5e1;
}


/* ==========================================================
   SECTION HEADERS
========================================================== */

.sgh-header-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 16px;

    flex-wrap: wrap;

    margin-bottom: 20px;
}


/* ==========================================================
   HERO
========================================================== */

.sgh-dashboard-hero,
.sgh-lesson-hero {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;

    flex-wrap: wrap;

    padding: 28px;

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            rgba(37, 99, 235, .22),
            rgba(124, 58, 237, .22)
        );

    border:
        1px solid rgba(255, 255, 255, .08);
}


/* ==========================================================
   LESSON PREVIEW CAROUSEL
========================================================== */

.sgh-carousel-track {
    display: flex;

    gap: 20px;

    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;

    padding:
        8px 4px 18px;

    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    -webkit-overflow-scrolling: touch;

    scrollbar-width: thin;
}

.sgh-carousel-track::-webkit-scrollbar {
    height: 8px;
}

.sgh-carousel-track::-webkit-scrollbar-track {
    background:
        rgba(0, 0, 0, 0.06);

    border-radius: 20px;
}

.sgh-carousel-track::-webkit-scrollbar-thumb {
    background:
        rgba(0, 0, 0, 0.22);

    border-radius: 20px;
}

.sgh-carousel-track::-webkit-scrollbar-thumb:hover {
    background:
        rgba(0, 0, 0, 0.35);
}


/* ==========================================================
   CAROUSEL LESSON CARD
========================================================== */

.sgh-carousel-track .sgh-lesson-card {
    flex: 0 0 290px;

    min-height: 220px;

    padding: 22px;

    background: linear-gradient(135deg, #0a0f2c, #0d1b4d);
    color: #fff;

    border:
        1px solid rgba(0, 0, 0, 0.08);

    border-radius: 16px;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.06);

    scroll-snap-align: start;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

.sgh-carousel-track .sgh-lesson-card:hover {
    transform: translateY(-4px);

    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.10);
}

.sgh-carousel-track .card-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;

    margin-bottom: 14px;

    border-radius: 14px;

    background:
        rgba(0, 0, 0, 0.05);

    font-size: 28px;
}

.sgh-carousel-track .sgh-lesson-card h3 {
    margin: 0 0 10px;

    font-size: 18px;
    line-height: 1.3;

    font-weight: 700;

    color: #fff;
}

.sgh-carousel-track .sgh-lesson-card p {
    margin: 0 0 14px;

    font-size: 14px;
    line-height: 1.6;

    color: #fff;

    display: -webkit-box;

    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

.sgh-carousel-track .sgh-lesson-card small {
    display: block;

    margin-top: auto;

    font-size: 13px;
    font-weight: 600;

    color: #fff;
}


/* ==========================================================
   STATUS
========================================================== */

.sgh-status-pill,
.sgh-status {
    display: inline-flex;

    align-items: center;

    font-size: 12px;
    font-weight: 700;
}

.sgh-status-pill {
    padding: 8px 14px;
    border-radius: 999px;
}

.sgh-status {
    padding: 6px 12px;
    border-radius: 999px;
}

.sgh-status-live {
    background: #16a34a;
    color: #fff;
}

.sgh-status-upcoming {
    background: #f59e0b;
    color: #fff;
}

.sgh-status-completed {
    background: #2563eb;
    color: #fff;
}

.sgh-status-danger {
    background: #dc2626;
    color: #fff;
}


/* ==========================================================
   META / EMPTY / SPACING
========================================================== */

.sgh-meta-row {
    display: flex;

    gap: 14px;

    flex-wrap: wrap;

    margin-top: 14px;

    opacity: .9;
}

.sgh-empty {
    padding: 22px;

    border-radius: 16px;

    text-align: center;

    border:
        1px dashed rgba(255, 255, 255, .10);

    background:
        linear-gradient(
            135deg,
            rgba(20, 43, 72, 0.88),
            rgba(8, 27, 52, 0.78)
        );

    backdrop-filter:
        blur(22px) saturate(150%);

    -webkit-backdrop-filter:
        blur(22px) saturate(150%);

    border:
        1px solid rgba(105, 190, 255, 0.28);

    color:
        rgba(255, 255, 255, .82);
}

.sgh-mt-10 {
    margin-top: 10px;
}

.sgh-mt-15 {
    margin-top: 15px;
}

.sgh-mt-20 {
    margin-top: 20px;
}

.sgh-mt-25 {
    margin-top: 25px;
}

.sgh-mb-10 {
    margin-bottom: 10px;
}

.sgh-mb-15 {
    margin-bottom: 15px;
}

.sgh-mb-20 {
    margin-bottom: 20px;
}

.sgh-full-width {
    width: 100%;
}

.sgh-text-center {
    text-align: center;
}


/* ==========================================================
   BUTTONS
========================================================== */

.sgh-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 12px 18px;

    border: none;

    border-radius: 14px;

    cursor: pointer;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #38bdf8,
            #6366f1
        );

    transition:
        all .25s ease;

    box-shadow:
        0 6px 20px rgba(56, 189, 248, .25);
}

.sgh-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 28px rgba(56, 189, 248, .35);
}

.sgh-btn-primary {
    background:
        linear-gradient(
            135deg,
            #38bdf8,
            #2563eb
        );
}

.sgh-btn-success {
    background:
        linear-gradient(
            135deg,
            #22c55e,
            #15803d
        );
}

.sgh-btn-warning {
    background:
        linear-gradient(
            135deg,
            #f59e0b,
            #d97706
        );
}

.sgh-btn-danger {
    background:
        linear-gradient(
            135deg,
            #ef4444,
            #b91c1c
        );
}

.sgh-btn-outline {
    background: transparent;

    border:
        1px solid rgba(255, 255, 255, .15);
}

.sgh-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 12px 18px;

    border: none;

    border-radius: 14px;

    cursor: pointer;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #38bdf8,
            #6366f1
        );

    transition:
        all .25s ease;

    box-shadow:
        0 6px 20px rgba(56, 189, 248, .25);
}

.sgh-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 28px rgba(56, 189, 248, .35);
}


/* ==========================================================
   FORMS
========================================================== */

.sgh-card input,
.sgh-card textarea,
.sgh-card select {
    width: 100%;

    padding: 14px 16px;

    margin-top: 8px;

    border-radius: 14px;

    background:
        rgba(255, 255, 255, .05);

    color: #fff;

    border:
        1px solid rgba(255, 255, 255, .08);

    outline: none;

    transition: .25s;
}

.sgh-card input:focus,
.sgh-card textarea:focus,
.sgh-card select:focus {
    border-color: #38bdf8;

    box-shadow:
        0 0 0 3px rgba(56, 189, 248, .15);
}

.sgh-card textarea {
    resize: vertical;
    min-height: 180px;
}

.sgh-card label {
    display: block;

    margin-top: 15px;
    margin-bottom: 6px;

    font-weight: 600;

    color: #fff;
}

.sgh-action-row {
    display: flex;

    flex-wrap: wrap;

    gap: 14px;

    margin-top: 20px;
}


/* ==========================================================
   STAT / LESSON / SUMMARY / MESSAGE COMPONENTS
========================================================== */

.sgh-stat-card {
    text-align: center;
}

.sgh-stat-card h2 {
    font-size: 34px;
    margin: 8px 0;
}

.sgh-stat-card h3 {
    font-size: 16px;
    margin: 0;
}

.sgh-lesson-card {
    padding: 20px;

    border-radius: 18px;

    border:
        1px solid rgba(255, 255, 255, .08);

    background:
        rgba(255, 255, 255, .03);

    margin-bottom: 16px;
}

.sgh-lesson-top {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;

    flex-wrap: wrap;
}

.sgh-summary-item {
    padding: 14px 0;

    border-bottom:
        1px solid rgba(255, 255, 255, .06);
}

.sgh-summary-item:last-child {
    border-bottom: none;
}

.sgh-message-item {
    padding: 12px 0;

    border-bottom:
        1px solid rgba(255, 255, 255, .06);
}

.sgh-message-item:last-child {
    border-bottom: none;
}


/* ==========================================================
   GLOBAL FLOATING AI GUIDE
========================================================== */

#sgh-ai-bubble {
    position: fixed;

    right: 24px;
    bottom: 90px;

    width: 58px;
    height: 58px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        rgba(15, 23, 42, .96);

    border:
        1px solid rgba(56, 189, 248, .55);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .30),
        0 0 20px rgba(56, 189, 248, .18);

    color: #fff;

    font-size: 25px;

    cursor: pointer;

    z-index: 9998;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

#sgh-ai-bubble:hover {
    transform:
        translateY(-3px) scale(1.04);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, .35),
        0 0 26px rgba(56, 189, 248, .25);
}

#sgh-ai-panel {
    position: fixed;

    right: 24px;
    bottom: 158px;

    width:
        min(380px, calc(100vw - 32px));

    max-height:
        min(620px, calc(100vh - 190px));

    display: none;

    flex-direction: column;

    overflow: hidden;

    background:
        rgba(15, 23, 42, .98);

    border:
        1px solid rgba(56, 189, 248, .24);

    border-radius: 18px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, .45),
        0 0 30px rgba(56, 189, 248, .10);

    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);

    z-index: 9999;
}

#sgh-ai-panel .sgh-ai-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 12px;

    padding: 16px 18px;

    border-bottom:
        1px solid rgba(255, 255, 255, .08);
}

#sgh-ai-close {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    border-radius: 50%;

    cursor: pointer;

    color:
        rgba(255, 255, 255, .75);

    transition:
        background .2s ease,
        color .2s ease;
}

#sgh-ai-close:hover {
    background:
        rgba(255, 255, 255, .08);

    color: #fff;
}

#sgh-ai-messages {
    flex: 1;

    min-height: 180px;

    max-height: 430px;

    overflow-y: auto;

    padding: 16px;
}

#sgh-ai-panel .sgh-ai-help {
    line-height: 1.6;

    color:
        rgba(255, 255, 255, .82);
}

#sgh-ai-panel .sgh-ai-input {
    display: flex;

    gap: 8px;

    padding: 14px;

    border-top:
        1px solid rgba(255, 255, 255, .08);
}

#sgh-ai-text {
    flex: 1;

    min-width: 0;

    padding: 11px 13px;

    border-radius: 10px;

    border:
        1px solid rgba(255, 255, 255, .12);

    background:
        rgba(255, 255, 255, .05);

    color: #fff;
}

#sgh-ai-text::placeholder {
    color:
        rgba(255, 255, 255, .45);
}

#sgh-ai-send {
    flex: 0 0 auto;

    width: 44px;

    border: none;

    border-radius: 10px;

    cursor: pointer;

    background:
        rgba(56, 189, 248, .18);

    color: #fff;
}


/* ==========================================================
   AI COMPONENTS
========================================================== */

.sgh-ai-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sgh-ai-actions {
    display: flex;

    flex-wrap: wrap;

    gap: 10px;
}

.sgh-ai-output-wrapper {
    margin-top: 15px;
}

.sgh-ai-output-header {
    margin-bottom: 10px;

    font-weight: 600;
}

.sgh-ai-output {
    width: 100%;
    min-height: 300px;
}


/* ==========================================================
   AUDIO
========================================================== */

.sgh-audio-player {
    width: 100%;
    margin-top: 10px;
}


/* ==========================================================
   PROFILE
========================================================== */

.sgh-profile-page {
    max-width: 900px;

    margin: 0 auto;
}

.sgh-profile-header {
    text-align: center;

    margin-bottom: 25px;
}

.sgh-profile-avatar,
.sgh-profile-avatar-placeholder {
    width: 120px;
    height: 120px;

    border-radius: 50%;
}

.sgh-profile-avatar {
    object-fit: cover;
}

.sgh-profile-avatar-placeholder {
    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 42px;
}


/* ==========================================================
   NOTICE
========================================================== */

.sgh-notice {
    padding: 14px;

    border-radius: 12px;

    margin-bottom: 18px;
}

.sgh-notice-success {
    background:
        rgba(34, 197, 94, .15);

    border:
        1px solid rgba(34, 197, 94, .35);
}

.sgh-notice-error {
    background:
        rgba(239, 68, 68, .15);

    border:
        1px solid rgba(239, 68, 68, .35);
}


/* ==========================================================
   S'GELAHUB — GLASS BLUE BOTTOM NAVIGATION
========================================================== */

.sgh-bottom-tabs {
    position: fixed;

    left: 50%;
    bottom: 16px;

    transform: translateX(-50%);

    width:
        min(
            calc(100% - 24px),
            660px
        );

    min-height: 72px;

    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    align-items: stretch;

    padding: 7px;

    background:
        linear-gradient(
            135deg,
            rgba(20, 43, 72, 0.88),
            rgba(8, 27, 52, 0.78)
        );

    backdrop-filter:
        blur(22px) saturate(150%);

    -webkit-backdrop-filter:
        blur(22px) saturate(150%);

    border:
        1px solid rgba(105, 190, 255, 0.28);

    border-radius: 24px;

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.28),
        0 0 25px rgba(55, 170, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);

    overflow: hidden;

    z-index: 9990;
}

.sgh-bottom-tabs::before {
    content: "";

    position: absolute;

    top: 0;
    left: 8%;

    width: 84%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(150, 220, 255, 0.65),
            transparent
        );

    pointer-events: none;
}

.sgh-tabbtn {
    position: relative;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 4px;

    min-width: 0;

    padding: 7px 4px;

    color:
        rgba(220, 240, 255, 0.72);

    text-decoration: none;

    border-radius: 17px;

    transition:
        color .2s ease,
        background .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.sgh-tabbtn:hover {
    color: #fff;

    text-decoration: none;

    transform:
        translateY(-2px);
}

.sgh-tab-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    font-size: 21px;

    line-height: 1;

    filter:
        drop-shadow(
            0 2px 5px rgba(0, 0, 0, 0.25)
        );
}

.sgh-tab-label {
    font-size: 10px;

    line-height: 1.1;

    font-weight: 600;

    letter-spacing: .2px;

    white-space: nowrap;
}

.sgh-tabbtn.is-active {
    color: #fff;

    background:
        linear-gradient(
            135deg,
            rgba(52, 160, 255, 0.30),
            rgba(42, 103, 190, 0.18)
        );

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        0 0 18px rgba(52, 170, 255, 0.10);
}

.sgh-tabbtn.is-active::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 4px;

    width: 18px;
    height: 2px;

    transform:
        translateX(-50%);

    border-radius: 10px;

    background:
        linear-gradient(
            90deg,
            rgba(77, 190, 255, 0),
            rgba(77, 190, 255, 1),
            rgba(77, 190, 255, 0)
        );

    box-shadow:
        0 0 8px rgba(77, 190, 255, 0.75);
}

.sgh-tab-icon-wrap {
    position: relative;

    display: flex;

    align-items: center;
    justify-content: center;
}

.sgh-tab-messages.has-unread
.sgh-tab-icon-wrap::after {
    content: "";

    position: absolute;

    top: -2px;
    right: -5px;

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #55c8ff;

    border:
        2px solid rgba(13, 38, 67, 0.95);

    box-shadow:
        0 0 8px rgba(85, 200, 255, 0.85);
}

/* ==========================================================
   S'gelaHub — Card Action Groups
   Standard spacing for buttons/actions inside cards
========================================================== */

.sgh-card-actions,
.sgh-actions,
.sgh-action-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.sgh-card-actions--stacked,
.sgh-actions--stacked,
.sgh-action-group--stacked {
    flex-direction: column;
    align-items: stretch;
}

.sgh-card-actions--center,
.sgh-actions--center,
.sgh-action-group--center {
    justify-content: center;
}

.sgh-card-actions--end,
.sgh-actions--end,
.sgh-action-group--end {
    justify-content: flex-end;
}

/*
 * When actions are stacked, make buttons comfortably usable.
 */
.sgh-card-actions--stacked .sgh-btn,
.sgh-actions--stacked .sgh-btn,
.sgh-action-group--stacked .sgh-btn {
    width: 100%;
}

/*
 * Mobile: horizontally arranged actions may need to stack.
 */
@media (max-width: 600px) {
    .sgh-card-actions,
    .sgh-actions,
    .sgh-action-group {
        gap: 10px;
    }

    .sgh-card-actions:not(.sgh-card-actions--inline-mobile),
    .sgh-actions:not(.sgh-actions--inline-mobile),
    .sgh-action-group:not(.sgh-action-group--inline-mobile) {
        flex-direction: column;
        align-items: stretch;
    }

    .sgh-card-actions:not(.sgh-card-actions--inline-mobile) .sgh-btn,
    .sgh-actions:not(.sgh-actions--inline-mobile) .sgh-btn,
    .sgh-action-group:not(.sgh-action-group--inline-mobile) .sgh-btn {
        width: 100%;
    }
}


/* ==========================================================
   RESPONSIVE — LARGE TABLETS / DESKTOP
========================================================== */

@media (max-width: 1024px) {

    .sgh-main-grid {
        grid-template-columns: 1fr;
    }

    .sgh-grid-4 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* ==========================================================
   RESPONSIVE — TABLETS
========================================================== */

@media (max-width: 768px) {

    .sgh-grid-3,
    .sgh-grid-2 {
        grid-template-columns: 1fr;
    }

    .sgh-card {
        padding: 18px;
    }

    .sgh-dashboard-hero,
    .sgh-lesson-hero {
        padding: 22px;
    }

    .sgh-carousel-track {
        gap: 14px;

        padding-left: 2px;
        padding-right: 2px;
    }

    .sgh-carousel-track .sgh-lesson-card {
        flex: 0 0 82vw;

        min-height: 210px;

        padding: 18px;
    }
}


/* ==========================================================
   RESPONSIVE — MOBILE
========================================================== */

@media (max-width: 600px) {

    .sgh-appbar {
        min-height: 82px;

        padding:
            11px 15px;
    }

    .sgh-brand {
        gap: 11px;
    }

    .sgh-brand img {
        width: 48px;
        height: 48px;

        min-width: 48px;
        min-height: 48px;

        max-width: 48px;
        max-height: 48px;

        flex-basis: 48px;

        border-radius: 13px;
    }

    .sgh-brand .sgh-glow-text {
        font-size: 21px;
    }

    .sgh-brand small {
        font-size: 10px;

        margin-top: 4px;
    }

    .sgh-appbar > .sgh-btn {
        padding:
            8px 12px;

        font-size: 12px;
    }

    .sgh-wrap {
        padding-left: 14px;
        padding-right: 14px;
        padding-bottom: 110px;
    }

    .sgh-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .sgh-grid-4 {
        grid-template-columns: 1fr;
    }

    .sgh-carousel-track .sgh-lesson-card {
        flex: 0 0 82vw;
    }

    .sgh-bottom-tabs {
        bottom:
            max(
                10px,
                env(safe-area-inset-bottom)
            );

        width:
            calc(100% - 16px);

        min-height: 68px;

        border-radius: 21px;
    }

    .sgh-tab-icon {
        font-size: 20px;
    }

    .sgh-tab-label {
        font-size: 9px;
    }

    #sgh-ai-bubble {
        right: 16px;

        /*
         * Keep AI Guide visually above
         * the bottom navigation.
         */
        bottom: 88px;

        width: 54px;
        height: 54px;
    }

    #sgh-ai-panel {
        right: 16px;
        left: 16px;

        bottom: 148px;

        width: auto;

        max-height:
            calc(100vh - 175px);
    }
}


/* ==========================================================
   RESPONSIVE — SMALL MOBILE
========================================================== */

@media (max-width: 480px) {

    .sgh-carousel-track .sgh-lesson-card {
        flex: 0 0 88vw;
    }
}


/* ==========================================================
   RESPONSIVE — VERY SMALL SCREENS
========================================================== */

@media (max-width: 380px) {

    .sgh-appbar {
        min-height: 76px;

        padding:
            9px 11px;
    }

    .sgh-brand {
        gap: 9px;
    }

    .sgh-brand img {
        width: 44px;
        height: 44px;

        min-width: 44px;
        min-height: 44px;

        max-width: 44px;
        max-height: 44px;

        flex-basis: 44px;
    }

    .sgh-brand .sgh-glow-text {
        font-size: 19px;
    }

    .sgh-brand small {
        display: none;
    }

    .sgh-bottom-tabs {
        padding: 5px;
    }

    .sgh-tabbtn {
        padding-left: 2px;
        padding-right: 2px;
    }

    .sgh-tab-label {
        font-size: 8px;
    }

    .sgh-tab-icon {
        font-size: 19px;
    }
}
/* ==========================================================
   DESKTOP DROPDOWN VISIBILITY
   Native desktop option menus otherwise inherit a white
   browser background while our select text remains light.
   Mobile native pickers are left unchanged.
========================================================== */
@media (min-width: 701px) {
    .sgh-card select option,
    .sgh-card select optgroup,
    .sgh-account-page select option,
    .sgh-account-page select optgroup,
    .sgh-subscription-page select option,
    .sgh-subscription-page select optgroup {
        background: #0f172a !important;
        color: #ffffff !important;
    }
}
