/* ============================================================
   GlowUp Academy Portal — Stylesheet (Redesigned)
   ============================================================ */

:root {
    /* Brand */
    --gua-primary:      #3B82F6;
    --gua-primary-dark: #2563EB;
    --gua-success:      #10B981;
    --gua-warning:      #F59E0B;
    --gua-danger:       #EF4444;
    --gua-info:         #3B82F6;

    /* Sidebar */
    --gua-sidebar-bg:   #0D1117;
    --gua-sidebar-text: #9CA3AF;
    --gua-sidebar-w:    240px;

    /* Content */
    --gua-bg:           #F9FAFB;
    --gua-white:        #ffffff;
    --gua-border:       #E5E7EB;
    --gua-text:         #111827;
    --gua-text-muted:   #6B7280;

    /* Misc */
    --gua-radius:       8px;
    --gua-radius-lg:    12px;
    --gua-shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
    --gua-shadow-md:    0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
}

[x-cloak] { display: none !important; }

/* ================================================================
   FULL-VIEWPORT OVERRIDE
   Hide WordPress theme chrome on portal pages
   ================================================================ */
body.gua-portal-page {
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

body.gua-portal-page #wpadminbar         { display: none !important; }
body.gua-portal-page .site-header,
body.gua-portal-page header.entry-header,
body.gua-portal-page .site-footer,
body.gua-portal-page footer,
body.gua-portal-page #masthead,
body.gua-portal-page #colophon           { display: none !important; }

/* Make any WP content wrapper full-width */
body.gua-portal-page .entry-content,
body.gua-portal-page .wp-block-post-content,
body.gua-portal-page .site-content,
body.gua-portal-page #page,
body.gua-portal-page #content,
body.gua-portal-page .site-inner,
body.gua-portal-page main.site-main      {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* ================================================================
   PORTAL LAYOUT
   ================================================================ */
.gua-portal-wrap {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
    color: var(--gua-text);
    background: var(--gua-bg);
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.gua-sidebar {
    width: var(--gua-sidebar-w);
    min-width: var(--gua-sidebar-w);
    background: var(--gua-sidebar-bg);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
}

/* Header: GU monogram + STUDENT label + bell */
.gua-sidebar-header {
    display: flex;
    align-items: center;
    padding: 20px 16px;
    gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}

.gua-sidebar-monogram {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    flex-shrink: 0;
}

.gua-sidebar-brand {
    flex: 1;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.gua-sidebar-bell {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    color: var(--gua-sidebar-text);
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.gua-sidebar-bell:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

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

.gua-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: none;
    border: none;
    text-align: left;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--gua-sidebar-text);
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s, color .15s;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.4;
}

.gua-nav-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .7;
}

.gua-nav-item:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
}

.gua-nav-item:hover svg { opacity: 1; }

.gua-nav-item.active {
    background: #fff;
    color: #111827;
}

.gua-nav-item.active svg { opacity: 1; stroke: #111827; }

/* Logout */
.gua-sidebar-footer {
    padding: 10px 10px 16px;
    border-top: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}

.gua-nav-item.gua-logout {
    color: #9CA3AF;
}

.gua-nav-item.gua-logout:hover {
    background: rgba(239,68,68,.15);
    color: #EF4444;
}

/* ================================================================
   MAIN CONTENT
   ================================================================ */
.gua-main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    background: var(--gua-bg);
    padding: 32px 36px;
}

/* Page heading */
.gua-page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gua-text);
    margin: 0 0 4px;
    line-height: 1.3;
}

.gua-page-subtitle {
    font-size: 13.5px;
    color: var(--gua-text-muted);
    margin: 0 0 28px;
}

/* ================================================================
   STAT CARDS (Overview 4-up row)
   ================================================================ */
.gua-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.gua-stat-card {
    background: var(--gua-white);
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius-lg);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    box-shadow: var(--gua-shadow);
}

.gua-stat-card-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gua-stat-card-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gua-text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.gua-stat-card-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--gua-text);
    line-height: 1;
    margin-top: 4px;
}

.gua-stat-card-icon {
    width: 40px;
    height: 40px;
    background: #F3F4F6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gua-stat-card-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--gua-text-muted);
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ================================================================
   CARDS (generic)
   ================================================================ */
.gua-card {
    background: var(--gua-white);
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius-lg);
    padding: 20px;
    box-shadow: var(--gua-shadow);
    margin-bottom: 16px;
}

.gua-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gua-text);
    margin: 0 0 4px;
}

.gua-card-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 15px;
    font-weight: 600;
    color: var(--gua-text);
}

.gua-card-section-header svg {
    width: 18px;
    height: 18px;
    stroke: var(--gua-text-muted);
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ================================================================
   NOTICES CARD
   ================================================================ */
.gua-notices-card {
    background: var(--gua-white);
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius-lg);
    padding: 20px;
    box-shadow: var(--gua-shadow);
    margin-bottom: 16px;
}

.gua-notices-empty {
    text-align: center;
    padding: 24px 0 8px;
    color: var(--gua-text-muted);
    font-size: 13.5px;
}

/* ================================================================
   PROFILE CARD (2-column grid)
   ================================================================ */
.gua-profile-card {
    background: var(--gua-white);
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius-lg);
    padding: 20px;
    box-shadow: var(--gua-shadow);
}

.gua-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 32px;
    margin-top: 16px;
}

.gua-profile-field {}

.gua-profile-field-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--gua-text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
}

.gua-profile-field-value {
    font-size: 14px;
    color: var(--gua-text);
    font-weight: 500;
}

/* Status badge in profile */
.gua-badge-active {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #111827;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.gua-badge-active::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
}

/* Progress bar in profile */
.gua-progress-wrap {
    margin-top: 4px;
}

.gua-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--gua-text-muted);
    margin-bottom: 6px;
}

.gua-progress-bar {
    background: var(--gua-border);
    border-radius: 4px;
    height: 6px;
    overflow: hidden;
}

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

/* ================================================================
   HORIZONTAL ITEM CARDS (Assignments, Notes, Reports)
   ================================================================ */
.gua-item-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gua-item-card {
    background: var(--gua-white);
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: var(--gua-shadow);
}

.gua-item-card-left {
    flex: 1;
    min-width: 0;
}

.gua-item-card-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.gua-item-card-name strong {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--gua-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gua-item-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12.5px;
    color: var(--gua-text-muted);
}

.gua-item-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.gua-item-card-meta svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.gua-item-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* ================================================================
   BADGES
   ================================================================ */
.gua-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.gua-badge-submitted {
    background: #EFF6FF;
    color: #3B82F6;
    border: 1px solid #BFDBFE;
}

.gua-badge-pending {
    background: transparent;
    color: var(--gua-text-muted);
    border: 1px solid var(--gua-border);
}

.gua-badge-completed {
    background: #F3F4F6;
    color: #374151;
    border: 1px solid #E5E7EB;
}

.gua-badge-upcoming {
    background: #EFF6FF;
    color: #3B82F6;
    border: 1px solid #BFDBFE;
}

.gua-badge-success  { background: #D1FAE5; color: #065F46; }
.gua-badge-warning  { background: #FEF3C7; color: #92400E; }
.gua-badge-danger   { background: #FEE2E2; color: #991B1B; }
.gua-badge-info     { background: #DBEAFE; color: #1E40AF; }

/* ================================================================
   BUTTONS
   ================================================================ */
.gua-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: var(--gua-text);
    color: var(--gua-white);
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, opacity .15s;
    font-family: inherit;
    white-space: nowrap;
}

.gua-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.gua-btn:hover    { background: #1F2937; color: #fff; }
.gua-btn:disabled { opacity: .5; cursor: not-allowed; }
.gua-btn-full     { width: 100%; justify-content: center; }

.gua-btn-secondary {
    background: var(--gua-white);
    color: var(--gua-text);
    border: 1px solid var(--gua-border);
}

.gua-btn-secondary:hover { background: var(--gua-bg); color: var(--gua-text); }

.gua-btn-primary  { background: var(--gua-primary); }
.gua-btn-primary:hover { background: var(--gua-primary-dark); }

.gua-btn-danger   { background: #FEE2E2; color: #991B1B; border: none; }
.gua-btn-danger:hover { background: #FECACA; color: #7F1D1D; }

.gua-btn-sm { padding: 5px 12px; font-size: 12.5px; }
.gua-btn-icon {
    padding: 6px;
    background: #FEE2E2;
    color: #EF4444;
    border: none;
    border-radius: 8px;
}
.gua-btn-icon:hover { background: #FECACA; color: #B91C1C; }
.gua-btn-icon svg { width: 15px; height: 15px; }

/* ================================================================
   EMPTY STATE
   ================================================================ */
.gua-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 24px;
    text-align: center;
}

.gua-empty-state-icon {
    width: 64px;
    height: 64px;
    color: #D1D5DB;
    margin-bottom: 16px;
}

.gua-empty-state-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gua-empty-state-text {
    font-size: 14px;
    color: var(--gua-text-muted);
    font-weight: 500;
}

/* ================================================================
   SESSION / TIMETABLE SECTIONS
   ================================================================ */
.gua-sessions-section {
    margin-bottom: 28px;
}

.gua-sessions-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gua-text-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gua-border);
}

.gua-session-card {
    background: var(--gua-white);
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: var(--gua-shadow);
    margin-bottom: 10px;
}

.gua-session-card-left { flex: 1; min-width: 0; }

.gua-session-card-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.gua-session-card-name strong {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--gua-text);
}

.gua-session-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12.5px;
    color: var(--gua-text-muted);
}

.gua-session-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.gua-session-card-meta svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ================================================================
   LOADING
   ================================================================ */
.gua-loading {
    padding: 40px;
    text-align: center;
    color: var(--gua-text-muted);
    font-size: 14px;
}

/* ================================================================
   AUTH PAGES
   ================================================================ */
.gua-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gua-bg);
    padding: 1rem;
}

.gua-auth-card {
    background: var(--gua-white);
    border-radius: var(--gua-radius-lg);
    box-shadow: var(--gua-shadow-md);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--gua-border);
}

.gua-auth-logo { text-align: center; margin-bottom: 1.5rem; }
.gua-auth-logo h2 { margin: .5rem 0 .25rem; font-size: 1.25rem; }
.gua-auth-logo p  { color: var(--gua-text-muted); font-size: .875rem; margin: 0; }
.gua-auth-switch  { text-align: center; margin-top: 1rem; font-size: .875rem; }
.gua-auth-switch a { color: var(--gua-primary); }

/* ================================================================
   FORMS
   ================================================================ */
.gua-form-row { margin-bottom: 1rem; }

.gua-form-row label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: .35rem;
    color: var(--gua-text);
}

.gua-form-row input[type="text"],
.gua-form-row input[type="email"],
.gua-form-row input[type="password"],
.gua-form-row input[type="date"],
.gua-form-row input[type="time"],
.gua-form-row input[type="datetime-local"],
.gua-form-row textarea,
.gua-form-row select {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius);
    font-size: .875rem;
    color: var(--gua-text);
    background: var(--gua-white);
    transition: border-color .15s;
    box-sizing: border-box;
    font-family: inherit;
}

.gua-form-row input:focus,
.gua-form-row textarea:focus,
.gua-form-row select:focus {
    outline: none;
    border-color: var(--gua-primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

.gua-form-row-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.gua-form-actions {
    display: flex;
    gap: .75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.gua-form-error { color: var(--gua-danger); font-size: .875rem; margin: .5rem 0; }
.required { color: var(--gua-danger); }

.gua-search-input {
    padding: .45rem .75rem;
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius);
    font-size: .875rem;
    width: 240px;
    font-family: inherit;
}

/* ================================================================
   MODAL
   ================================================================ */
.gua-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.gua-modal {
    background: var(--gua-white);
    border-radius: var(--gua-radius-lg);
    padding: 1.5rem;
    max-width: 480px;
    width: 100%;
    box-shadow: var(--gua-shadow-md);
}

.gua-modal h3 { margin: 0 0 1rem; font-size: 16px; }

/* ================================================================
   FEEDBACK BANNERS
   ================================================================ */
.gua-feedback {
    padding: .75rem 1rem;
    border-radius: var(--gua-radius);
    font-size: .875rem;
    margin-top: 1rem;
}

.gua-feedback-success { background: #D1FAE5; color: #065F46; }
.gua-feedback-error   { background: #FEE2E2; color: #991B1B; }

.gua-feedback-box {
    background: #EFF6FF;
    border-left: 3px solid var(--gua-primary);
    padding: .5rem .75rem;
    font-size: .8rem;
    border-radius: 0 var(--gua-radius) var(--gua-radius) 0;
    margin-top: .75rem;
}

/* ================================================================
   PROGRESS BAR (modal upload)
   ================================================================ */
.gua-upload-progress {
    background: var(--gua-border);
    border-radius: 4px;
    height: 6px;
    margin: .75rem 0;
    overflow: hidden;
}

.gua-upload-progress div {
    height: 100%;
    background: var(--gua-primary);
    transition: width .3s;
}

/* ================================================================
   TAGS
   ================================================================ */
.gua-tag {
    display: inline-block;
    background: #EFF6FF;
    color: var(--gua-primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 500;
}

/* ================================================================
   OVERVIEW PANEL ROW
   ================================================================ */
.gua-overview-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* ================================================================
   ADMIN WRAP
   ================================================================ */
.gua-admin-wrap { max-width: 1200px; }
.gua-admin-wrap h1 { margin-bottom: 1.5rem; }

/* Keep old layout helpers for admin-side templates */
.gua-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gua-list { list-style: none; margin: 0; padding: 0; }

.gua-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--gua-border);
    font-size: .875rem;
}

.gua-list-item:last-child { border-bottom: none; }

/* Tables (admin) */
.gua-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--gua-white);
    border-radius: var(--gua-radius);
    overflow: hidden;
    box-shadow: var(--gua-shadow);
    font-size: .875rem;
}

.gua-table th {
    background: var(--gua-bg);
    border-bottom: 1px solid var(--gua-border);
    padding: .65rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gua-text-muted);
}

.gua-table td {
    padding: .65rem 1rem;
    border-bottom: 1px solid var(--gua-border);
    vertical-align: middle;
}

.gua-table tr:last-child td { border-bottom: none; }
.gua-table tr:hover td      { background: #fafafa; }

/* Tabs */
.gua-tabs {
    display: flex;
    gap: .5rem;
    border-bottom: 1px solid var(--gua-border);
    margin-bottom: 1rem;
}

.gua-tab-btn {
    padding: .5rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: .875rem;
    cursor: pointer;
    color: var(--gua-text-muted);
    transition: color .15s, border-color .15s;
    font-family: inherit;
}

.gua-tab-btn.active,
.gua-tab-btn:hover {
    color: var(--gua-primary);
    border-bottom-color: var(--gua-primary);
}

/* Checkbox list */
.gua-checkbox-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: .35rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius);
    padding: .5rem;
}

.gua-checkbox-list label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 400;
    cursor: pointer;
    font-size: .875rem;
}

/* Messages (unchanged) */
.gua-messages-layout  { display: flex; gap: 1rem; height: calc(100vh - 200px); }
.gua-messages-sidebar { width: 220px; border: 1px solid var(--gua-border); border-radius: var(--gua-radius); background: var(--gua-white); overflow-y: auto; padding: .5rem; }
.gua-messages-sidebar h3 { padding: .5rem; margin: 0 0 .5rem; font-size: .875rem; }
.gua-messages-thread  { flex: 1; display: flex; flex-direction: column; border: 1px solid var(--gua-border); border-radius: var(--gua-radius); overflow: hidden; background: var(--gua-white); }
.gua-messages-list    { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; padding: 1rem; }

.gua-message { max-width: 70%; padding: .65rem 1rem; border-radius: 12px; font-size: .875rem; }
.gua-message small { display: block; font-size: .7rem; margin-top: .25rem; opacity: .6; }

.gua-message-sent     { align-self: flex-end; background: var(--gua-primary); color: var(--gua-white); }
.gua-message-received { align-self: flex-start; background: var(--gua-white); border: 1px solid var(--gua-border); }

.gua-message-input {
    display: flex;
    gap: .75rem;
    padding: 1rem;
    border-top: 1px solid var(--gua-border);
    background: var(--gua-white);
}

.gua-message-input textarea {
    flex: 1;
    resize: none;
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius);
    padding: .5rem .75rem;
    font-size: .875rem;
    font-family: inherit;
}

.gua-msg-contact {
    display: block; width: 100%; text-align: left;
    padding: .5rem .75rem; border: none; background: none;
    border-radius: var(--gua-radius); cursor: pointer; font-size: .875rem;
    color: var(--gua-text); transition: background .15s; font-family: inherit;
}

.gua-msg-contact:hover, .gua-msg-contact.active {
    background: #EFF6FF;
    color: var(--gua-primary);
}

/* ================================================================
   HAMBURGER BUTTON
   ================================================================ */
.gua-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: none;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    cursor: pointer;
    color: #fff;
    flex-shrink: 0;
    transition: background .15s;
}
.gua-hamburger:hover { background: rgba(255,255,255,.1); }
.gua-hamburger svg {
    width: 18px; height: 18px;
    stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round;
}

/* Topbar hamburger (open button) — dark icon on white background */
.gua-mobile-topbar .gua-hamburger {
    color: #111827;
    border-color: #E5E7EB;
    background: none;
}
.gua-mobile-topbar .gua-hamburger:hover {
    background: #F3F4F6;
}

/* Mobile top bar (shown only on mobile, inside .gua-main) */
.gua-mobile-topbar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gua-white);
    border-bottom: 1px solid var(--gua-border);
    position: sticky;
    top: 0;
    z-index: 100;
    margin: 0;
}
.gua-mobile-topbar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gua-text);
}

/* Sidebar overlay (mobile) */
.gua-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99998;
}

/* ================================================================
   LIVE NOW BADGE
   ================================================================ */
.gua-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #10B981;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.gua-badge-live::before {
    content: '';
    display: inline-block;
    width: 7px; height: 7px;
    background: #fff;
    border-radius: 50%;
    animation: gua-pulse 1.4s ease-in-out infinite;
}
@keyframes gua-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(1.3); }
}

/* Live session card highlight */
.gua-session-live {
    border-color: #6EE7B7 !important;
    background: #F0FDF4 !important;
}

/* Join Now button */
.gua-btn-join {
    background: #10B981;
    color: #fff;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
    font-family: inherit;
}
.gua-btn-join:hover { background: #059669; color: #fff; }
.gua-btn-join svg {
    width: 15px; height: 15px;
    stroke: currentColor; fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.gua-btn-join-muted { background: #374151; }
.gua-btn-join-muted:hover { background: #1F2937; }

/* ================================================================
   NOTICE FEED
   ================================================================ */
.gua-notice-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gua-border);
}
.gua-notice-item:last-child { border-bottom: none; }
.gua-notice-icon {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.gua-notice-icon svg {
    width: 16px; height: 16px;
    stroke: currentColor; fill: none;
    stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}
.gua-notice-body { flex: 1; min-width: 0; }
.gua-notice-title {
    font-size: 13.5px; font-weight: 600; color: var(--gua-text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gua-notice-sub {
    font-size: 12px; color: var(--gua-text-muted); margin-top: 2px;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
    .gua-stats-grid    { grid-template-columns: 1fr 1fr; }
    .gua-overview-row  { grid-template-columns: 1fr; }
    .gua-overview-panels { grid-column: 1fr; }
}

@media (max-width: 768px) {
    body.gua-portal-page { overflow: hidden; }

    /* Sidebar becomes an off-canvas drawer */
    .gua-sidebar {
        position: absolute;
        top: 0; left: 0; bottom: 0;
        z-index: 99999;
        transform: translateX(-100%);
        transition: transform .25s ease;
        width: 260px !important;
        min-width: 260px !important;
    }

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

    /* Show overlay when sidebar open on mobile */
    .gua-sidebar-overlay { display: block; }

    /* Main takes full width */
    .gua-main { padding: 0; overflow-y: auto; }

    /* Show mobile topbar */
    .gua-mobile-topbar { display: flex; }

    /* Hamburger visible */
    .gua-hamburger { display: flex; }

    .gua-stats-grid         { grid-template-columns: 1fr 1fr; gap: 10px; }
    .gua-profile-grid       { grid-template-columns: 1fr; }
    .gua-item-card          { flex-direction: column; align-items: flex-start; gap: 10px; }
    .gua-item-card-actions  { width: 100%; justify-content: flex-start; }
    .gua-form-row-inline    { grid-template-columns: 1fr; }
    .gua-messages-layout    { flex-direction: column; }
    .gua-messages-sidebar   { width: 100%; height: auto; }
    .gua-messages-wrap      { height: auto; min-height: 400px; }
    .gua-tab-bar            { flex-wrap: wrap; }
    .gua-overview-panels    { grid-template-columns: 1fr; }
    .gua-upload-row         { flex-direction: column; align-items: flex-start; }
    .gua-upload-row-actions { width: 100%; }
    .gua-form-card          { padding: 16px; }
    .gua-main > *:not(.gua-mobile-topbar) { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 480px) {
    .gua-stats-grid { grid-template-columns: 1fr 1fr; }
    .gua-item-card-name { flex-wrap: wrap; }
}

/* ================================================================
   SESSIONS / TIMETABLE
   ================================================================ */
.gua-sessions-section { margin-bottom: 28px; }

.gua-sessions-section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 12px;
}

.gua-sessions-section-title.upcoming { color: var(--gua-primary); }
.gua-sessions-section-title.past     { color: var(--gua-text-muted); }

/* ================================================================
   EXTRA BADGES
   ================================================================ */
.gua-badge-upcoming {
    background: #EFF6FF;
    color: #1D4ED8;
    border: 1px solid #BFDBFE;
}

.gua-badge-completed {
    background: #F3F4F6;
    color: #374151;
    border: 1px solid #E5E7EB;
}

.gua-badge-subject {
    background: #F0FDF4;
    color: #166534;
    border: 1px solid #BBF7D0;
}

/* ================================================================
   TEACHER AVATAR (in student teachers list)
   ================================================================ */
.gua-teacher-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gua-sidebar-bg);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ================================================================
   SIDEBAR — LOGO / BRAND (teacher variant, also works for student)
   ================================================================ */
.gua-sidebar-logo {
    display: flex;
    align-items: center;
    padding: 20px 16px;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
}

/* ================================================================
   SIDEBAR — USER FOOTER (teacher dashboard)
   ================================================================ */
.gua-sidebar-footer {
    padding: 10px 10px 14px;
    border-top: 1px solid rgba(255,255,255,.06);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gua-sidebar-user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.gua-sidebar-user-avatar {
    width: 34px;
    height: 34px;
    background: rgba(255,255,255,.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.gua-sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.gua-sidebar-user-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gua-sidebar-user-role {
    font-size: 11px;
    color: var(--gua-sidebar-text);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.gua-sidebar-signout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    color: var(--gua-sidebar-text);
    text-decoration: none;
    flex-shrink: 0;
    transition: background .15s, color .15s;
}

.gua-sidebar-signout svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gua-sidebar-signout:hover {
    background: rgba(239,68,68,.15);
    color: #EF4444;
}

/* ================================================================
   FORM CARD (teacher forms wrapper)
   ================================================================ */
.gua-form-card {
    background: var(--gua-white);
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius-lg);
    padding: 24px;
    box-shadow: var(--gua-shadow);
    margin-bottom: 28px;
}

.gua-form-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gua-text);
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gua-border);
}

/* ================================================================
   SECTION TITLE (sub-headings like "My Sessions")
   ================================================================ */
.gua-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gua-text);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 14px;
}

/* ================================================================
   TAB BAR (styled pill tabs for Manage Uploads)
   ================================================================ */
.gua-tab-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.gua-tab-bar .gua-tab-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: var(--gua-white);
    border: 1px solid var(--gua-border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gua-text-muted);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    font-family: inherit;
}

.gua-tab-bar .gua-tab-btn.active,
.gua-tab-bar .gua-tab-btn:hover {
    background: var(--gua-text);
    color: #fff;
    border-color: var(--gua-text);
}

.gua-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: rgba(0,0,0,.08);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
}

.gua-tab-bar .gua-tab-btn.active .gua-tab-count { background: rgba(255,255,255,.2); }

/* ================================================================
   FILTER BAR
   ================================================================ */
.gua-filter-bar {
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.gua-select {
    padding: 7px 12px;
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius);
    font-size: 13px;
    color: var(--gua-text);
    background: var(--gua-white);
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s;
}

.gua-select:focus {
    outline: none;
    border-color: var(--gua-primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* ================================================================
   CHECKBOX ITEM (styled checkbox label)
   ================================================================ */
.gua-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 13.5px;
    color: var(--gua-text);
    cursor: pointer;
    font-weight: 400 !important;
}

/* ================================================================
   MESSAGES (teacher dashboard)
   ================================================================ */
.gua-messages-wrap {
    background: var(--gua-white);
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius-lg);
    overflow: hidden;
    box-shadow: var(--gua-shadow);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
}

.gua-messages-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gua-text-muted);
    font-size: 13.5px;
}

/* ================================================================
   UPLOAD PROGRESS BAR
   ================================================================ */
.gua-progress-bar {
    background: var(--gua-border);
    border-radius: 4px;
    height: 6px;
    margin: 12px 0;
    overflow: hidden;
}

.gua-progress-bar > div {
    height: 100%;
    background: var(--gua-primary);
    border-radius: 4px;
    transition: width .3s ease;
}

/* ================================================================
   OVERVIEW PANELS (2-col grid for overview cards)
   ================================================================ */
.gua-overview-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.gua-notices-card-header {
    font-size: 14px;
    font-weight: 600;
    color: var(--gua-text);
    margin: -20px -20px 0;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gua-border);
}

@media (max-width: 900px) {
    .gua-overview-panels { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .gua-messages-wrap  { height: auto; min-height: 400px; }
    .gua-tab-bar        { flex-wrap: wrap; }
}

/* ================================================================
   FILE INPUT
   ================================================================ */
.gua-file-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gua-file-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    background: var(--gua-white);
    border: 1px solid var(--gua-border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gua-text);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}

.gua-file-btn:hover { background: var(--gua-bg); }

.gua-file-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.gua-file-name {
    font-size: 13px;
    color: var(--gua-text-muted);
}

/* ================================================================
   UPLOADS LIST (Manage Uploads)
   ================================================================ */
.gua-uploads-list {
    background: var(--gua-white);
    border: 1px solid var(--gua-border);
    border-radius: var(--gua-radius-lg);
    overflow: hidden;
    box-shadow: var(--gua-shadow);
}

.gua-upload-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--gua-border);
}

.gua-upload-row:last-child { border-bottom: none; }

.gua-upload-row-info {
    flex: 1;
    min-width: 0;
}

.gua-upload-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gua-text);
    margin-bottom: 5px;
}

.gua-upload-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 12px;
    color: var(--gua-text-muted);
}

.gua-upload-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gua-upload-meta svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.gua-upload-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.gua-upload-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--gua-bg);
    border: 1px solid var(--gua-border);
    cursor: pointer;
    color: var(--gua-text);
    text-decoration: none;
    transition: background .15s, color .15s;
}

.gua-upload-action-btn svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gua-upload-action-btn:hover { background: #E5E7EB; }

.gua-upload-action-delete {
    background: #FEF2F2;
    border-color: #FCA5A5;
    color: #EF4444;
}

.gua-upload-action-delete:hover { background: #FEE2E2; }

@media (max-width: 600px) {
    .gua-upload-row  { flex-direction: column; align-items: flex-start; }
    .gua-upload-row-actions { width: 100%; }
}
