
/* ============================================================
   EBC COLLEGE MANAGEMENT SYSTEM
   GLOBAL DESIGN SYSTEM
   Version: 3.3.0
   Design: Emerald Enterprise
   Developed by CHIPEGO TECHWORKS

   PURPOSE:
   Refine the existing working application's visual experience.

   PRESERVES:
   - Existing application layout
   - Existing HTML class names and IDs
   - Sidebar drawer states
   - Existing buttons and forms
   - Existing module integration
   - Existing table wrappers
   - Existing platform and institution workspaces

   FIX:
   - Profile and notification floating panels now display
     correctly when JavaScript removes their hidden attribute.

   No Firebase or application logic is changed.
============================================================ */


/* ============================================================
   01. DESIGN TOKENS
============================================================ */

:root {
    color-scheme: light;

    --emerald-dark: #123C35;
    --emerald: #18765B;
    --emerald-deep: #125E49;
    --emerald-light: #2C8B6D;
    --emerald-pale: #E8F3EE;
    --emerald-soft: #F1F8F4;

    --page: #F5F7F5;
    --surface: #FFFFFF;
    --surface-soft: #F9FBF9;
    --surface-muted: #F1F4F1;

    --ink: #202923;
    --ink-soft: #35443B;
    --muted: #6F7D74;
    --muted-light: #8C9990;
    --white: #FFFFFF;

    --line: #E3EAE4;
    --line-dark: #D2DDD4;

    --success: #16845B;
    --success-bg: #EAF6EF;

    --warning: #A66A12;
    --warning-bg: #FFF5E4;

    --danger: #C43D42;
    --danger-bg: #FCEEEF;

    --info: #286B8C;
    --info-bg: #EAF3F8;

    --sidebar-width: 270px;
    --sidebar-collapsed-width: 82px;
    --topbar-height: 68px;
    --content-max-width: 1600px;

    --radius-xs: 4px;
    --radius-sm: 7px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    --shadow-xs: 0 1px 2px rgba(20, 40, 28, .035);
    --shadow-sm: 0 2px 7px rgba(20, 40, 28, .045);
    --shadow-md: 0 5px 16px rgba(20, 40, 28, .065);
    --shadow-lg: 0 12px 32px rgba(20, 40, 28, .11);

    --font-primary: "DM Sans", sans-serif;
    --font-heading: "Manrope", sans-serif;

    --transition-fast: 150ms ease;
    --transition-normal: 220ms ease;

    --z-sidebar: 100;
    --z-overlay: 90;
    --z-topbar: 70;
    --z-dropdown: 120;
    --z-toast: 200;
}


/* ============================================================
   02. RESET
============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-width: 320px;
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    width: 100%;
    min-width: 320px;
    min-height: 100vh;
    margin: 0;

    background: var(--page);
    color: var(--ink);

    font-family: var(--font-primary);
    font-size: 14px;
    line-height: 1.55;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: .6;
}

img,
svg {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    margin: 0;
    padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    color: var(--ink);
    font-family: var(--font-heading);
    font-weight: 750;
    line-height: 1.3;
}

p {
    margin: 0;
}

[hidden] {
    display: none !important;
}

::selection {
    background: var(--emerald-pale);
    color: var(--emerald-dark);
}


/* ============================================================
   03. SCROLLBARS
============================================================ */

* {
    scrollbar-width: thin;
    scrollbar-color: #C9D5CC transparent;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: #C9D5CC;
    border-radius: 20px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #AABBAF;
}


/* ============================================================
   04. ACCESSIBILITY
============================================================ */

:focus-visible {
    outline: 3px solid rgba(24, 118, 91, .28);
    outline-offset: 3px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

@media (prefers-contrast: more) {
    :root {
        --line: #BFCBC1;
        --line-dark: #A9B8AC;
        --muted: #526158;
    }
}


/* ============================================================
   05. ICON SYSTEM
============================================================ */

.nav-icon,
.stat-icon,
.quick-action-icon,
.empty-state-icon,
.system-status-icon,
.support-icon,
.brand-symbol,
.icon-button,
.menu-toggle,
.sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-icon svg,
.stat-icon svg,
.quick-action-icon svg,
.empty-state-icon svg,
.system-status-icon svg,
.support-icon svg,
.brand-symbol svg,
.icon-button svg,
.menu-toggle svg,
.sidebar-close svg,
.profile-arrow svg,
.notification-dot svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;

    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.nav-icon svg {
    width: 19px;
    height: 19px;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

.quick-action-icon svg {
    width: 21px;
    height: 21px;
}

.empty-state-icon svg {
    width: 28px;
    height: 28px;
}

.brand-symbol svg {
    width: 25px;
    height: 25px;
}

.icon-button svg,
.menu-toggle svg,
.sidebar-close svg {
    width: 20px;
    height: 20px;
}

.text-button svg,
.button-primary svg,
.button-secondary svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}


/* ============================================================
   06. APPLICATION LOADER
============================================================ */

.app-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;

    padding: 24px;
    background: var(--surface);
}

.loader-brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.loader-brand .brand-symbol {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--emerald-dark);
    color: var(--white);
}

.loader-brand > div:last-child {
    display: flex;
    flex-direction: column;
}

.loader-brand strong,
.loader-brand h1 {
    color: var(--emerald-dark);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.loader-brand span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.loader-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid var(--emerald-pale);
    border-top-color: var(--emerald);
    border-radius: 50%;
    animation: ebc-spin .8s linear infinite;
}

.app-loader p {
    color: var(--muted);
    font-size: 12px;
}

@keyframes ebc-spin {
    to {
        transform: rotate(360deg);
    }
}


/* ============================================================
   07. APPLICATION LAYOUT
============================================================ */

.app-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
    overflow: clip;
    background: var(--page);
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: var(--z-sidebar);

    display: flex;
    flex-direction: column;

    width: var(--sidebar-width);
    overflow: hidden;

    background: var(--surface);
    border-right: 1px solid var(--line);

    transition: transform var(--transition-normal);
}

.sidebar-close {
    display: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;

    min-height: 76px;
    padding: 15px 20px;

    border-bottom: 1px solid var(--line);
}

.brand-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;
    flex-shrink: 0;

    border-radius: 10px;
    background: var(--emerald-dark);
    color: var(--white);
}

.brand-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand-details h1,
.brand-details strong {
    color: var(--emerald-dark);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.4px;
}

.brand-details span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .7px;
    text-transform: uppercase;
}


/* ============================================================
   08. INSTITUTION IDENTITY
============================================================ */

.institution-mini {
    display: flex;
    align-items: center;
    gap: 11px;

    margin: 16px 13px 10px;
    padding: 11px;

    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.institution-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;
    flex-shrink: 0;

    border-radius: 9px;
    background: var(--emerald-pale);
    color: var(--emerald-dark);

    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
}

.institution-mini > div:last-child {
    min-width: 0;
    flex: 1;
}

.institution-mini strong {
    display: block;
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.institution-mini span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}


/* ============================================================
   09. SIDEBAR NAVIGATION
============================================================ */

.sidebar-navigation {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 12px 18px;
}

.nav-section-label {
    display: block;
    padding: 16px 10px 7px;

    color: var(--muted-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .9px;
    text-transform: uppercase;
}

.sidebar-navigation nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-link {
    position: relative;

    display: flex;
    align-items: center;
    gap: 11px;

    min-height: 42px;
    padding: 9px 11px;

    border: 1px solid transparent;
    border-radius: 7px;

    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;

    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast);
}

.nav-link:hover {
    background: var(--surface-soft);
    color: var(--emerald-dark);
}

.nav-link.active,
.nav-link[aria-current="page"] {
    background: var(--emerald-pale);
    border-color: #D8E9DE;
    color: var(--emerald-dark);
    font-weight: 700;
}

.nav-link.active::before,
.nav-link[aria-current="page"]::before {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: -1px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: var(--emerald);
    content: "";
}

.nav-icon {
    width: 22px;
    height: 22px;
    color: var(--muted);
}

.nav-link.active .nav-icon,
.nav-link[aria-current="page"] .nav-icon {
    color: var(--emerald);
}

.nav-link > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ============================================================
   10. SIDEBAR FOOTER
============================================================ */

.sidebar-footer {
    flex-shrink: 0;
    padding: 12px 13px;
    border-top: 1px solid var(--line);
}

.support-card {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
    padding: 10px;

    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.support-icon {
    width: 33px;
    height: 33px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--emerald-pale);
    color: var(--emerald-dark);
}

.support-card-content {
    min-width: 0;
    flex: 1;
}

.support-card strong {
    display: block;
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
}

.support-card span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.developer-brand {
    padding: 11px 4px 2px;
    color: var(--muted-light);
    font-size: 10px;
    text-align: center;
}

.developer-brand strong {
    color: var(--muted);
    font-weight: 700;
}


/* ============================================================
   11. MAIN AREA
============================================================ */

.main-area {
    display: flex;
    flex: 1;
    flex-direction: column;

    min-width: 0;
    min-height: 100vh;

    margin-left: var(--sidebar-width);
    transition: margin var(--transition-normal);
}


/* ============================================================
   12. TOPBAR
============================================================ */

.topbar {
    position: sticky;
    top: 0;
    z-index: var(--z-topbar);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    min-height: var(--topbar-height);
    padding: 0 26px;

    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--line);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.topbar-left,
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.menu-toggle {
    display: none;

    width: 40px;
    height: 40px;
    flex-shrink: 0;

    border: 1px solid var(--line);
    border-radius: 8px;

    background: var(--surface);
    color: var(--ink);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
}

.breadcrumb-divider {
    color: var(--line-dark);
}

#breadcrumbCurrent {
    overflow: hidden;
    color: var(--ink);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-date {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.icon-button {
    position: relative;

    width: 40px;
    height: 40px;
    flex-shrink: 0;

    border: 1px solid var(--line);
    border-radius: 9px;

    background: var(--surface);
    color: var(--ink-soft);

    transition: all var(--transition-fast);
}

.icon-button:hover {
    background: var(--emerald-soft);
    border-color: #C8DED0;
    color: var(--emerald-dark);
}

.notification-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--surface);
    border-radius: 50%;
    background: var(--danger);
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 9px;

    min-height: 43px;
    padding: 4px 8px 4px 4px;

    border: 1px solid transparent;
    border-radius: 9px;

    background: transparent;
    color: var(--ink);
    text-align: left;

    transition: background var(--transition-fast);
}

.profile-trigger:hover {
    background: var(--surface-soft);
    border-color: var(--line);
}

.profile-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 35px;
    height: 35px;
    flex-shrink: 0;
    overflow: hidden;

    border-radius: 50%;
    background: var(--emerald-pale);
    color: var(--emerald-dark);

    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 800;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-trigger-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.profile-trigger-info strong {
    max-width: 150px;
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-trigger-info span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.profile-arrow {
    color: var(--muted);
}

.profile-arrow svg {
    width: 15px;
    height: 15px;
}


/* ============================================================
   13. PAGE CONTENT
============================================================ */

.page-content {
    flex: 1;
    width: 100%;
    max-width: var(--content-max-width);
    min-width: 0;
    margin: 0 auto;
    padding: 28px;
}

.platform-page,
.institution-page,
.platform-workspace,
.institution-workspace {
    width: 100%;
    min-width: 0;
}


/* ============================================================
   14. WELCOME SECTION
============================================================ */

.welcome-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    min-height: 170px;
    padding: 28px 30px;
    margin-bottom: 25px;

    overflow: hidden;

    border: 1px solid #164A3D;
    border-radius: var(--radius-lg);

    background: var(--emerald-dark);
    color: var(--white);
}

.welcome-visual,
.visual-orbit,
.visual-center,
.visual-floating,
.visual-card-one,
.visual-card-two,
.floating-icon {
    display: none !important;
}

.welcome-content {
    max-width: 650px;
    min-width: 0;
}

.welcome-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 11px;

    color: #C2E3D2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.status-indicator {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #79D6A7;
}

.welcome-section h1,
.welcome-section h2 {
    color: var(--white);
    font-family: var(--font-heading);
    font-size: clamp(23px, 3vw, 31px);
    font-weight: 800;
    letter-spacing: -.8px;
}

.welcome-section p {
    max-width: 580px;
    margin-top: 8px;
    color: #D2E4DA;
    font-size: 13px;
    line-height: 1.7;
}

.welcome-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    flex-shrink: 0;
}


/* ============================================================
   15. BUTTONS
============================================================ */

.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 41px;
    padding: 9px 16px;

    border: 1px solid transparent;
    border-radius: 7px;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;

    transition:
        background var(--transition-fast),
        border-color var(--transition-fast),
        color var(--transition-fast),
        transform var(--transition-fast);
}

.button-primary {
    background: var(--emerald);
    border-color: var(--emerald);
    color: var(--white);
}

.button-primary:hover {
    background: var(--emerald-deep);
    border-color: var(--emerald-deep);
}

.button-secondary {
    background: var(--surface);
    border-color: var(--line-dark);
    color: var(--ink-soft);
}

.button-secondary:hover {
    background: var(--surface-soft);
    border-color: #B8CDBF;
    color: var(--emerald-dark);
}

.button-primary:active,
.button-secondary:active {
    transform: translateY(1px);
}

.welcome-section .button-primary {
    background: var(--white);
    border-color: var(--white);
    color: var(--emerald-dark);
}

.welcome-section .button-primary:hover {
    background: #EAF4EE;
    border-color: #EAF4EE;
}

.welcome-section .button-secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, .4);
    color: var(--white);
}

.welcome-section .button-secondary:hover {
    background: rgba(255, 255, 255, .1);
    border-color: var(--white);
}


/* ============================================================
   16. SECTION HEADINGS
============================================================ */

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.section-heading > div {
    min-width: 0;
}

.section-heading h2 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.35px;
}

.section-heading p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.section-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--emerald);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .9px;
    text-transform: uppercase;
}


/* ============================================================
   17. STATISTICS
============================================================ */

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.stat-card {
    min-width: 0;
    padding: 17px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);

    box-shadow: var(--shadow-xs);

    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.stat-card:hover {
    border-color: #C9DCCF;
    box-shadow: var(--shadow-sm);
}

.stat-top,
.stat-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
}

.stat-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 37px;
    height: 37px;
    border-radius: 9px;
    background: var(--emerald-pale);
    color: var(--emerald-dark);
}

.stat-card h3 {
    margin: 12px 0 6px;
    color: var(--ink);
    font-size: clamp(23px, 2.5vw, 28px);
    font-weight: 800;
    letter-spacing: -.8px;
    line-height: 1.2;
}

.stat-bottom {
    color: var(--muted);
    font-size: 10px;
}

.stat-blue,
.stat-purple,
.stat-green,
.stat-orange {
    background: var(--emerald-pale);
    color: var(--emerald-dark);
}


/* ============================================================
   18. DASHBOARD PANELS
============================================================ */

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(270px, .85fr);
    gap: 17px;
    margin-bottom: 25px;
}

.dashboard-panel {
    min-width: 0;
    padding: 20px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);

    box-shadow: var(--shadow-xs);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 11px;
    margin-bottom: 17px;
}

.panel-heading > div {
    min-width: 0;
}

.panel-heading h2,
.panel-heading h3 {
    color: var(--ink);
    font-size: 14px;
    font-weight: 800;
}

.panel-heading p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
}

.panel-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    flex-shrink: 0;

    border: 1px solid var(--line);
    border-radius: 7px;

    background: var(--surface);
    color: var(--muted);
}

.panel-menu:hover {
    background: var(--surface-soft);
    color: var(--emerald-dark);
}

.text-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    min-height: 32px;
    padding: 5px;

    border: none;
    background: transparent;
    color: var(--emerald);

    font-size: 11px;
    font-weight: 700;
}

.text-button:hover {
    color: var(--emerald-dark);
    text-decoration: underline;
}


/* ============================================================
   19. QUICK ACTIONS
============================================================ */

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 11px;

    min-width: 0;
    min-height: 118px;
    padding: 14px;

    border: 1px solid var(--line);
    border-radius: var(--radius-md);

    background: var(--surface);
    color: var(--ink);
    text-align: left;

    transition:
        border-color var(--transition-fast),
        background var(--transition-fast),
        transform var(--transition-fast);
}

.quick-action:hover {
    background: var(--surface-soft);
    border-color: #BCD5C5;
    transform: translateY(-1px);
}

.quick-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: var(--emerald-pale);
    color: var(--emerald-dark);
}

.quick-action strong {
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.quick-action span:last-child {
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.blue-icon,
.purple-icon,
.green-icon,
.orange-icon {
    background: var(--emerald-pale);
    color: var(--emerald-dark);
}


/* ============================================================
   20. EMPTY STATES
============================================================ */

.activity-empty,
.platform-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 180px;
    padding: 24px;

    color: var(--muted);
    text-align: center;
}

.empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 52px;
    height: 52px;
    margin-bottom: 13px;

    border-radius: 12px;
    background: var(--emerald-soft);
    color: var(--emerald);
}

.activity-empty h3,
.platform-empty-state h3,
.activity-empty strong,
.platform-empty-state strong {
    margin-bottom: 6px;
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 750;
}

.activity-empty p,
.platform-empty-state p {
    max-width: 340px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
}

.platform-module-placeholder {
    padding: 32px 22px;
    border: 1px dashed var(--line-dark);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    text-align: center;
}

.platform-module-placeholder h3 {
    margin-bottom: 7px;
    font-size: 16px;
}

.platform-module-placeholder p {
    color: var(--muted);
    font-size: 12px;
}


/* ============================================================
   21. SYSTEM STATUS
============================================================ */

.system-status-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    padding: 15px 18px;

    border: 1px solid var(--line);
    border-radius: var(--radius-md);

    background: var(--surface);
}

.system-status-content {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.system-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 37px;
    height: 37px;
    flex-shrink: 0;
    border-radius: 9px;
    background: var(--success-bg);
    color: var(--success);
}

.system-status-content > div {
    min-width: 0;
}

.system-status-content strong {
    display: block;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.system-status-content span,
.system-status-content p {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.system-version {
    color: var(--muted);
    font-size: 10px;
    white-space: nowrap;
}


/* ============================================================
   22. PLATFORM WORKSPACE
============================================================ */

.platform-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding: 21px 0;
    margin-bottom: 24px;

    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;

    background: transparent;
    color: var(--ink);
}

.platform-welcome .welcome-content {
    max-width: 700px;
}

.platform-welcome .welcome-eyebrow {
    color: var(--emerald);
}

.platform-welcome h1,
.platform-welcome h2 {
    color: var(--ink);
    font-size: clamp(23px, 3vw, 30px);
    font-weight: 800;
    letter-spacing: -.7px;
}

.platform-welcome p {
    max-width: 650px;
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
}

.platform-welcome .welcome-actions {
    flex-shrink: 0;
}


/* ============================================================
   23. MAIN FOOTER
============================================================ */

.main-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding: 17px 28px;

    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 10px;
}

.main-footer strong {
    color: var(--ink-soft);
    font-weight: 700;
}


/* ============================================================
   24. FLOATING PANELS
============================================================ */

.floating-panel {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: var(--z-dropdown);

    display: none;

    width: 340px;
    max-width: calc(100vw - 24px);
    padding: 17px;

    border: 1px solid var(--line);
    border-radius: var(--radius-md);

    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.floating-panel.show,
.floating-panel.active,
.floating-panel[aria-hidden="false"] {
    display: block;
}

.floating-panel[hidden] {
    display: none !important;
}

/* FIX v3.3.0:
   The profile-panel JavaScript toggles the HTML hidden property.
   When hidden is removed, this rule makes the panel visible even
   if the JavaScript does not add .show/.active or update aria-hidden.
   The [hidden] rule above still takes priority while it is present.
*/
.floating-panel:not([hidden]) {
    display: block;
}

.floating-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding-bottom: 12px;
    margin-bottom: 12px;

    border-bottom: 1px solid var(--line);
}

.floating-panel-heading h2,
.floating-panel-heading h3 {
    color: var(--ink);
    font-size: 14px;
}

.floating-panel-empty {
    padding: 21px 8px;
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.profile-panel {
    width: 280px;
}

.profile-panel-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px 0 15px;
    border-bottom: 1px solid var(--line);
}

.profile-panel-user > div:last-child {
    min-width: 0;
}

.profile-panel-user strong {
    display: block;
    color: var(--ink);
    font-size: 12px;
}

.profile-panel-user span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    overflow-wrap: anywhere;
}

.profile-panel button:not(.logout-button) {
    color: var(--ink-soft);
}

.profile-panel button:not(.logout-button):hover {
    background: var(--surface-soft);
}

.logout-button {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    min-height: 41px;
    padding: 10px;
    margin-top: 11px;

    border: 1px solid transparent;
    border-radius: 7px;

    background: transparent;
    color: var(--danger);

    font-size: 12px;
    font-weight: 700;
    text-align: left;
}

.logout-button:hover {
    background: var(--danger-bg);
}


/* ============================================================
   25. TOAST NOTIFICATIONS
============================================================ */

.toast-container {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: var(--z-toast);

    display: flex;
    flex-direction: column;
    gap: 9px;

    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 13px 15px;

    border: 1px solid var(--line);
    border-left: 4px solid var(--info);
    border-radius: 8px;

    background: var(--surface);
    box-shadow: var(--shadow-lg);

    color: var(--ink);
    font-size: 12px;

    pointer-events: auto;
    animation: ebc-toast-in 180ms ease;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.info {
    border-left-color: var(--info);
}

@keyframes ebc-toast-in {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   26. SIDEBAR OVERLAY
============================================================ */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-overlay);

    display: none;

    background: rgba(13, 30, 23, .48);

    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sidebar-overlay.active,
.sidebar-overlay.show {
    display: block;
}


/* ============================================================
   27. FORMS
============================================================ */

label {
    display: block;
    margin-bottom: 6px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    min-height: 43px;
    padding: 10px 12px;

    border: 1px solid var(--line-dark);
    border-radius: 7px;

    outline: none;

    background: var(--surface);
    color: var(--ink);
    font-size: 13px;

    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
    color: #9AA69E;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #AFC3B5;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--emerald);
    box-shadow: 0 0 0 3px rgba(24, 118, 91, .10);
}

textarea {
    min-height: 105px;
    resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
    width: 17px;
    min-width: 17px;
    min-height: 17px;
    height: 17px;
    accent-color: var(--emerald);
}

input[type="file"] {
    min-height: auto;
    padding: 9px;
    background: var(--surface-soft);
}

input:disabled,
select:disabled,
textarea:disabled {
    background: var(--surface-muted);
    color: var(--muted);
    cursor: not-allowed;
}


/* ============================================================
   28. TABLES
============================================================ */

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    text-align: left;
}

thead {
    background: var(--surface-soft);
}

th {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);

    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .4px;
    text-transform: uppercase;
    white-space: nowrap;
}

td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);

    color: var(--ink-soft);
    font-size: 12px;
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--surface-soft);
}

.table-wrapper,
.table-container,
.data-table-container {
    width: 100%;
    min-width: 0;
    max-width: 100%;

    overflow-x: auto;

    border: 1px solid var(--line);
    border-radius: var(--radius-md);

    background: var(--surface);
    -webkit-overflow-scrolling: touch;
}

.table-wrapper table,
.table-container table,
.data-table-container table {
    min-width: 620px;
}


/* ============================================================
   29. STATUS BADGES
============================================================ */

.status-badge,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    min-height: 22px;
    padding: 4px 9px;

    border-radius: 20px;

    background: var(--surface-muted);
    color: var(--ink-soft);

    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge.success,
.badge.success,
.status-badge.active {
    background: var(--success-bg);
    color: var(--success);
}

.status-badge.warning,
.badge.warning,
.status-badge.pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-badge.danger,
.badge.danger,
.status-badge.rejected {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-badge.info,
.badge.info {
    background: var(--info-bg);
    color: var(--info);
}


/* ============================================================
   30. MODULE CONTENT SAFETY
============================================================ */

.platform-module-placeholder,
.institution-module-placeholder,
.platform-workspace,
.institution-workspace {
    width: 100%;
    min-width: 0;
}

.page-content > *,
.dashboard-panel > *,
.platform-page > * {
    min-width: 0;
}

pre,
code {
    max-width: 100%;
    overflow-x: auto;
}

input,
select,
textarea,
button {
    max-width: 100%;
}


/* ============================================================
   31. SMALL LAPTOPS
============================================================ */

@media (max-width: 1200px) {
    :root {
        --sidebar-width: 245px;
    }

    .page-content {
        padding: 24px;
    }

    .statistics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}


/* ============================================================
   32. TABLET NAVIGATION
============================================================ */

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }

    .sidebar.open,
    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close {
        position: absolute;
        top: 17px;
        right: 14px;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: 35px;
        height: 35px;

        border: 1px solid var(--line);
        border-radius: 7px;

        background: var(--surface);
        color: var(--ink);
    }

    .main-area {
        margin-left: 0;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .topbar {
        padding: 0 20px;
    }
}


/* ============================================================
   33. TABLET CONTENT
============================================================ */

@media (max-width: 768px) {
    :root {
        --topbar-height: 64px;
    }

    .page-content {
        padding: 21px 18px;
    }

    .welcome-section {
        min-height: 155px;
        padding: 23px;
    }

    .welcome-section h1,
    .welcome-section h2 {
        font-size: 24px;
    }

    .statistics-grid {
        gap: 11px;
    }

    .dashboard-panel {
        padding: 17px;
    }

    .platform-welcome {
        padding: 19px 0;
    }

    .main-footer {
        padding: 15px 19px;
    }
}


/* ============================================================
   34. MOBILE LAYOUT
============================================================ */

@media (max-width: 600px) {
    html,
    body {
        width: 100%;
        min-width: 320px;
        overflow-x: hidden;
    }

    .app-layout {
        width: 100%;
        overflow-x: clip;
    }

    .main-area {
        width: 100%;
        min-width: 0;
    }

    .topbar {
        min-height: 60px;
        padding: 0 12px;
        gap: 7px;
    }

    .topbar-left,
    .topbar-actions {
        gap: 7px;
    }

    .topbar-left {
        flex: 1;
        overflow: hidden;
    }

    .topbar-actions {
        flex-shrink: 0;
    }

    .menu-toggle,
    .icon-button {
        width: 37px;
        height: 37px;
        border-radius: 8px;
    }

    .breadcrumb {
        gap: 5px;
        font-size: 11px;
    }

    .breadcrumb-divider,
    .topbar-date,
    .profile-trigger-info,
    .profile-arrow {
        display: none;
    }

    #breadcrumbCurrent {
        max-width: 145px;
    }

    .profile-trigger {
        padding: 3px;
    }

    .profile-avatar {
        width: 34px;
        height: 34px;
    }

    .page-content {
        width: 100%;
        padding: 17px 13px 24px;
    }

    .welcome-section {
        display: block;
        min-height: auto;
        padding: 21px 18px;
        margin-bottom: 21px;
        border-radius: 11px;
    }

    .welcome-eyebrow {
        margin-bottom: 9px;
        font-size: 9px;
        letter-spacing: .9px;
    }

    .welcome-section h1,
    .welcome-section h2 {
        font-size: 22px;
        line-height: 1.3;
        letter-spacing: -.5px;
    }

    .welcome-section p {
        margin-top: 8px;
        font-size: 12px;
        line-height: 1.65;
    }

    .welcome-actions {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        margin-top: 16px;
    }

    .welcome-actions button,
    .welcome-actions a {
        flex: 1 1 auto;
        min-width: 0;
    }

    .section-heading {
        align-items: flex-start;
        margin-bottom: 12px;
    }

    .section-heading h2 {
        font-size: 15px;
    }

    .section-heading p {
        font-size: 11px;
    }

    .statistics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        margin-bottom: 20px;
    }

    .stat-card {
        padding: 13px;
        border-radius: 9px;
    }

    .stat-label {
        max-width: 100px;
        font-size: 10px;
        line-height: 1.4;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }

    .stat-icon svg {
        width: 17px;
        height: 17px;
    }

    .stat-card h3 {
        margin: 10px 0 5px;
        font-size: 23px;
    }

    .stat-bottom {
        font-size: 9px;
    }

    .dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        margin-bottom: 19px;
    }

    .dashboard-panel {
        padding: 15px;
        border-radius: 9px;
    }

    .panel-heading {
        margin-bottom: 13px;
    }

    .panel-heading h2,
    .panel-heading h3 {
        font-size: 13px;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .quick-action {
        min-height: 105px;
        padding: 12px;
        gap: 8px;
    }

    .quick-action-icon {
        width: 35px;
        height: 35px;
        border-radius: 8px;
    }

    .quick-action-icon svg {
        width: 19px;
        height: 19px;
    }

    .quick-action strong {
        font-size: 11px;
    }

    .quick-action span:last-child {
        font-size: 10px;
    }

    .system-status-panel {
        align-items: flex-start;
        padding: 12px;
    }

    .system-status-content {
        gap: 9px;
    }

    .system-version {
        font-size: 9px;
    }

    .main-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
        padding: 14px 13px;
        font-size: 10px;
    }

    .floating-panel {
        position: fixed;
        top: 68px;
        right: 10px;

        width: calc(100vw - 20px);
        max-width: 380px;

        max-height: calc(100dvh - 88px);

        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .profile-panel {
        width: min(280px, calc(100vw - 20px));
    }

    .toast-container {
        right: 11px;
        bottom: calc(11px + env(safe-area-inset-bottom));
        width: calc(100vw - 22px);
    }

    .toast {
        padding: 11px 13px;
    }

    .table-wrapper,
    .table-container,
    .data-table-container {
        max-width: 100%;
    }
}


/* ============================================================
   35. SMALL MOBILE
============================================================ */

@media (max-width: 380px) {
    .topbar {
        padding: 0 9px;
    }

    .topbar-left,
    .topbar-actions {
        gap: 5px;
    }

    .menu-toggle,
    .icon-button {
        width: 35px;
        height: 35px;
    }

    #breadcrumbCurrent {
        max-width: 115px;
    }

    .page-content {
        padding: 15px 10px 21px;
    }

    .welcome-section {
        padding: 19px 15px;
    }

    .welcome-section h1,
    .welcome-section h2 {
        font-size: 20px;
    }

    .welcome-actions {
        gap: 7px;
    }

    .welcome-actions .button-primary,
    .welcome-actions .button-secondary {
        padding: 9px 10px;
        font-size: 11px;
    }

    .stat-card {
        padding: 11px;
    }

    .stat-card h3 {
        font-size: 21px;
    }

    .stat-icon {
        width: 30px;
        height: 30px;
    }

    .quick-action {
        min-height: 100px;
        padding: 10px;
    }

    .dashboard-panel {
        padding: 13px;
    }

    .section-heading h2 {
        font-size: 14px;
    }
}


/* ============================================================
   36. VERY SMALL MOBILE
============================================================ */

@media (max-width: 340px) {
    .page-content {
        padding-right: 8px;
        padding-left: 8px;
    }

    .statistics-grid,
    .quick-actions-grid {
        gap: 7px;
    }

    .stat-card {
        padding: 9px;
    }

    .stat-label {
        font-size: 9px;
    }

    .stat-card h3 {
        font-size: 19px;
    }

    .quick-action {
        padding: 9px;
    }

    .welcome-section {
        padding: 17px 13px;
    }

    .welcome-section h1,
    .welcome-section h2 {
        font-size: 19px;
    }
}


/* ============================================================
   37. WIDE DESKTOP
============================================================ */

@media (min-width: 1600px) {
    .page-content {
        padding: 35px 38px;
    }

    .statistics-grid {
        gap: 18px;
    }

    .dashboard-grid {
        gap: 21px;
    }

    .stat-card {
        padding: 21px;
    }
}


/* ============================================================
   38. MOBILE SAFE AREAS
============================================================ */

@supports (padding: env(safe-area-inset-bottom)) {
    .sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .main-footer {
        padding-bottom: calc(17px + env(safe-area-inset-bottom));
    }

    .toast-container {
        bottom: calc(11px + env(safe-area-inset-bottom));
    }
}


/* ============================================================
   39. REDUCED MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}


/* ============================================================
   40. GLOBAL OVERFLOW PROTECTION
============================================================ */

.page-content,
.dashboard-grid,
.dashboard-panel,
.statistics-grid,
.stat-card,
.quick-actions-grid,
.quick-action,
.platform-page,
.platform-workspace,
.institution-workspace,
.institution-page {
    min-width: 0;
}

pre,
code {
    max-width: 100%;
    overflow-x: auto;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

@media (max-width: 600px) {
    .page-content > *,
    .dashboard-panel > *,
    .platform-page > * {
        max-width: 100%;
    }

    .table-wrapper,
    .table-container,
    .data-table-container {
        max-width: 100%;
    }
}


/* ============================================================
   END OF EBC GLOBAL DESIGN SYSTEM
   Version: 3.3.0
   CHIPEGO TECHWORKS
============================================================ */
