/* ============================================================
   EDUCREST ERP
   GREATENANT SCHOOL CONNECT
   COMPONENT DESIGN SYSTEM
   ------------------------------------------------------------
   Depends on:
   assets/css/core.css
   ============================================================ */


/* ============================================================
   01. COMPONENT BASE
   ============================================================ */

.ec-component {
    position: relative;
}

.ec-component-reset {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}


/* ============================================================
   02. TOP NAVIGATION
   ============================================================ */

.ec-nav {
    position: relative;
    z-index: var(--ec-z-header);

    display: flex;
    align-items: center;

    width: 100%;
    min-height: 70px;

    background: var(--ec-white);
    border-bottom: 1px solid var(--ec-border);

    box-shadow: var(--ec-shadow-xs);
}

.ec-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: min(
        calc(100% - 2rem),
        var(--ec-container-2xl)
    );

    min-height: inherit;
    margin-inline: auto;
}

.ec-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;

    flex-shrink: 0;
}

.ec-nav-brand img {
    max-width: 180px;
    max-height: 52px;
    object-fit: contain;
}

.ec-nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ec-nav-link {
    position: relative;

    display: inline-flex;
    align-items: center;

    min-height: 70px;
    padding: 0 0.8rem;

    color: var(--ec-navy-900);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-semibold);

    transition:
        color var(--ec-transition),
        background var(--ec-transition);
}

.ec-nav-link::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 0;

    width: 0;
    height: 3px;

    background: var(--ec-gold);

    border-radius:
        var(--ec-radius-full)
        var(--ec-radius-full)
        0 0;

    transform: translateX(-50%);

    transition: width var(--ec-transition);
}

.ec-nav-link:hover,
.ec-nav-link.active {
    color: var(--ec-blue-700);
}

.ec-nav-link:hover::after,
.ec-nav-link.active::after {
    width: 65%;
}

.ec-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}


/* ============================================================
   03. NAVIGATION ICON BUTTON
   ============================================================ */

.ec-icon-btn {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    color: var(--ec-navy-800);
    background: transparent;

    border: 1px solid transparent;
    border-radius: var(--ec-radius-md);

    transition:
        color var(--ec-transition),
        background var(--ec-transition),
        border-color var(--ec-transition),
        transform var(--ec-transition);
}

.ec-icon-btn:hover {
    color: var(--ec-blue-700);
    background: var(--ec-blue-50);
    border-color: var(--ec-blue-100);

    transform: translateY(-1px);
}

.ec-icon-btn:active {
    transform: translateY(0);
}

.ec-icon-btn-sm {
    width: 34px;
    height: 34px;
}

.ec-icon-btn-lg {
    width: 50px;
    height: 50px;
}

.ec-icon-btn-primary {
    color: var(--ec-white);
    background: var(--ec-blue-700);
}

.ec-icon-btn-primary:hover {
    color: var(--ec-white);
    background: var(--ec-blue-800);
}

.ec-icon-btn-gold {
    color: var(--ec-navy-950);
    background: var(--ec-gold);
}

.ec-icon-btn-gold:hover {
    color: var(--ec-navy-950);
    background: var(--ec-yellow-600);
}


/* ============================================================
   04. NOTIFICATION DOT
   ============================================================ */

.ec-notification-dot {
    position: absolute;

    top: 5px;
    right: 5px;

    width: 9px;
    height: 9px;

    background: var(--ec-danger-500);

    border: 2px solid var(--ec-white);
    border-radius: 50%;
}

.ec-notification-count {
    position: absolute;

    top: -5px;
    right: -5px;

    min-width: 19px;
    height: 19px;

    padding: 0 4px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--ec-white);
    background: var(--ec-danger-600);

    border: 2px solid var(--ec-white);
    border-radius: var(--ec-radius-full);

    font-size: 9px;
    font-weight: var(--ec-weight-bold);
}


/* ============================================================
   05. DROPDOWN
   ============================================================ */

.ec-dropdown {
    position: relative;
    display: inline-block;
}

.ec-dropdown-menu {
    position: absolute;

    top: calc(100% + 8px);
    right: 0;

    z-index: var(--ec-z-dropdown);

    min-width: 220px;

    padding: 0.45rem;

    background: var(--ec-white);

    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius-lg);

    box-shadow: var(--ec-shadow-xl);

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(-6px)
        scale(0.98);

    transform-origin: top right;

    transition:
        opacity var(--ec-transition),
        visibility var(--ec-transition),
        transform var(--ec-transition);
}

.ec-dropdown.open .ec-dropdown-menu,
.ec-dropdown.is-open .ec-dropdown-menu {
    opacity: 1;
    visibility: visible;

    transform:
        translateY(0)
        scale(1);
}

.ec-dropdown-menu-left {
    left: 0;
    right: auto;

    transform-origin: top left;
}

.ec-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;

    width: 100%;

    min-height: 40px;

    padding: 0.6rem 0.7rem;

    color: var(--ec-text);

    background: transparent;

    border-radius: var(--ec-radius-sm);

    font-size: var(--ec-font-size-sm);
    text-align: left;

    transition:
        color var(--ec-transition-fast),
        background var(--ec-transition-fast);
}

.ec-dropdown-item:hover {
    color: var(--ec-blue-700);
    background: var(--ec-blue-50);
}

.ec-dropdown-item.danger:hover {
    color: var(--ec-danger-600);
    background: var(--ec-danger-50);
}

.ec-dropdown-divider {
    height: 1px;

    margin: 0.4rem 0;

    background: var(--ec-border);
}

.ec-dropdown-label {
    display: block;

    padding: 0.5rem 0.7rem;

    color: var(--ec-text-light);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-bold);

    text-transform: uppercase;
    letter-spacing: 0.04em;
}


/* ============================================================
   06. USER MENU
   ============================================================ */

.ec-user-menu {
    display: flex;
    align-items: center;
    gap: 0.65rem;

    padding: 0.35rem 0.55rem;

    background: var(--ec-gray-50);

    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius-full);

    transition:
        background var(--ec-transition),
        border-color var(--ec-transition);
}

.ec-user-menu:hover {
    background: var(--ec-blue-50);
    border-color: var(--ec-blue-200);
}

.ec-user-info {
    min-width: 0;
}

.ec-user-name {
    overflow: hidden;

    color: var(--ec-navy-900);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-bold);

    text-overflow: ellipsis;
    white-space: nowrap;
}

.ec-user-role {
    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-xs);
}


/* ============================================================
   07. MOBILE MENU BUTTON
   ============================================================ */

.ec-menu-toggle {
    display: none;

    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    color: var(--ec-navy-900);
    background: var(--ec-white);

    border: 1px solid var(--ec-border);
    border-radius: var(--ec-radius-md);
}

.ec-menu-toggle:hover {
    color: var(--ec-blue-700);
    background: var(--ec-blue-50);
}


/* ============================================================
   08. MODAL SYSTEM
   ============================================================ */

.ec-modal {
    position: fixed;

    inset: 0;

    z-index: var(--ec-z-modal);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: var(--ec-space-5);

    background: rgba(3, 19, 47, 0.68);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity var(--ec-transition),
        visibility var(--ec-transition);
}

.ec-modal.open,
.ec-modal.is-open,
.ec-modal.active {
    opacity: 1;
    visibility: visible;
}

.ec-modal-dialog {
    position: relative;

    width: min(
        100%,
        560px
    );

    max-height: calc(100vh - 2rem);

    overflow-y: auto;

    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-xl);

    box-shadow: var(--ec-shadow-xl);

    transform:
        translateY(20px)
        scale(0.98);

    transition:
        transform var(--ec-transition-spring);
}

.ec-modal.open .ec-modal-dialog,
.ec-modal.is-open .ec-modal-dialog,
.ec-modal.active .ec-modal-dialog {
    transform:
        translateY(0)
        scale(1);
}

.ec-modal-sm .ec-modal-dialog {
    max-width: 400px;
}

.ec-modal-lg .ec-modal-dialog {
    max-width: 760px;
}

.ec-modal-xl .ec-modal-dialog {
    max-width: 1100px;
}

.ec-modal-full .ec-modal-dialog {
    width: calc(100% - 2rem);
    max-width: 1400px;
}

.ec-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: var(--ec-space-4);

    padding: var(--ec-space-5) var(--ec-space-6);

    border-bottom: 1px solid var(--ec-border);
}

.ec-modal-title {
    margin: 0;

    color: var(--ec-navy-900);

    font-size: var(--ec-font-size-xl);
    font-weight: var(--ec-weight-bold);
}

.ec-modal-body {
    padding: var(--ec-space-6);
}

.ec-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: var(--ec-space-3);

    padding: var(--ec-space-5) var(--ec-space-6);

    border-top: 1px solid var(--ec-border);
}


/* ============================================================
   09. ALERTS
   ============================================================ */

.ec-alert {
    display: flex;
    align-items: flex-start;

    gap: 0.75rem;

    padding: 0.9rem 1rem;

    border: 1px solid transparent;
    border-radius: var(--ec-radius-md);

    font-size: var(--ec-font-size-sm);
}

.ec-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 28px;
    height: 28px;
}

.ec-alert-content {
    flex: 1;
    min-width: 0;
}

.ec-alert-title {
    margin-bottom: 0.2rem;

    font-weight: var(--ec-weight-bold);
}

.ec-alert-text {
    margin: 0;

    color: inherit;
    opacity: 0.88;
}

.ec-alert-close {
    flex: 0 0 auto;

    padding: 0;

    color: inherit;
    background: transparent;

    border: 0;

    opacity: 0.7;
}

.ec-alert-close:hover {
    opacity: 1;
}

.ec-alert-primary {
    color: var(--ec-blue-800);
    background: var(--ec-blue-50);
    border-color: var(--ec-blue-200);
}

.ec-alert-success {
    color: var(--ec-success-700);
    background: var(--ec-success-50);
    border-color: var(--ec-success-100);
}

.ec-alert-warning {
    color: var(--ec-warning-700);
    background: var(--ec-warning-50);
    border-color: var(--ec-warning-100);
}

.ec-alert-danger {
    color: var(--ec-danger-700);
    background: var(--ec-danger-50);
    border-color: var(--ec-danger-100);
}

.ec-alert-info {
    color: var(--ec-info-700);
    background: var(--ec-info-50);
    border-color: var(--ec-info-100);
}


/* ============================================================
   10. TOAST NOTIFICATIONS
   ============================================================ */

.ec-toast-container {
    position: fixed;

    right: 1.25rem;
    bottom: 1.25rem;

    z-index: var(--ec-z-toast);

    display: flex;
    flex-direction: column;
    gap: 0.75rem;

    width: min(
        calc(100% - 2rem),
        390px
    );

    pointer-events: none;
}

.ec-toast {
    display: flex;
    align-items: flex-start;

    gap: 0.75rem;

    padding: 0.85rem 1rem;

    color: var(--ec-text);

    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-left: 4px solid var(--ec-blue-700);

    border-radius: var(--ec-radius-lg);

    box-shadow: var(--ec-shadow-xl);

    pointer-events: auto;

    animation:
        ec-toast-in 0.3s ease both;
}

.ec-toast-success {
    border-left-color: var(--ec-success-500);
}

.ec-toast-warning {
    border-left-color: var(--ec-warning-500);
}

.ec-toast-danger {
    border-left-color: var(--ec-danger-500);
}

.ec-toast-info {
    border-left-color: var(--ec-info-500);
}

.ec-toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 32px;
    height: 32px;

    flex: 0 0 auto;

    border-radius: 50%;
}

.ec-toast-success .ec-toast-icon {
    color: var(--ec-success-700);
    background: var(--ec-success-100);
}

.ec-toast-warning .ec-toast-icon {
    color: var(--ec-warning-700);
    background: var(--ec-warning-100);
}

.ec-toast-danger .ec-toast-icon {
    color: var(--ec-danger-700);
    background: var(--ec-danger-100);
}

.ec-toast-info .ec-toast-icon {
    color: var(--ec-info-700);
    background: var(--ec-info-100);
}

.ec-toast-content {
    flex: 1;
    min-width: 0;
}

.ec-toast-title {
    margin-bottom: 0.2rem;

    color: var(--ec-text-dark);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-bold);
}

.ec-toast-message {
    margin: 0;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-xs);
}

.ec-toast-close {
    padding: 0;

    color: var(--ec-text-light);
    background: transparent;

    border: 0;
}

.ec-toast-close:hover {
    color: var(--ec-text-dark);
}

.ec-toast-progress {
    position: absolute;

    left: 0;
    bottom: 0;

    width: 100%;
    height: 3px;

    background: var(--ec-blue-600);

    transform-origin: left;

    animation:
        ec-toast-progress linear forwards;
}

@keyframes ec-toast-in {

    from {
        opacity: 0;
        transform:
            translateY(12px)
            translateX(10px);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            translateX(0);
    }

}

@keyframes ec-toast-progress {

    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }

}


/* ============================================================
   11. TABS
   ============================================================ */

.ec-tabs {
    width: 100%;
}

.ec-tab-list {
    display: flex;
    align-items: center;

    gap: 0.2rem;

    overflow-x: auto;

    border-bottom: 1px solid var(--ec-border);

    scrollbar-width: none;
}

.ec-tab-list::-webkit-scrollbar {
    display: none;
}

.ec-tab {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;

    padding: 0.65rem 1rem;

    color: var(--ec-text-muted);

    background: transparent;

    border: 0;

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-semibold);

    white-space: nowrap;

    transition:
        color var(--ec-transition),
        background var(--ec-transition);
}

.ec-tab::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: -1px;

    width: 0;
    height: 3px;

    background: var(--ec-blue-700);

    border-radius:
        var(--ec-radius-full)
        var(--ec-radius-full)
        0 0;

    transform: translateX(-50%);

    transition: width var(--ec-transition);
}

.ec-tab:hover {
    color: var(--ec-blue-700);
    background: var(--ec-blue-50);
}

.ec-tab.active,
.ec-tab[aria-selected="true"] {
    color: var(--ec-blue-700);
}

.ec-tab.active::after,
.ec-tab[aria-selected="true"]::after {
    width: 70%;
}

.ec-tab-panel {
    display: none;

    padding-top: var(--ec-space-6);
}

.ec-tab-panel.active {
    display: block;
}


/* ============================================================
   12. PILLS / SEGMENTED CONTROLS
   ============================================================ */

.ec-segmented {
    display: inline-flex;
    align-items: center;

    padding: 0.25rem;

    background: var(--ec-gray-100);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-md);
}

.ec-segment {
    min-height: 36px;

    padding: 0.45rem 0.8rem;

    color: var(--ec-text-muted);

    background: transparent;

    border: 0;
    border-radius: var(--ec-radius-sm);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-semibold);

    transition:
        color var(--ec-transition),
        background var(--ec-transition),
        box-shadow var(--ec-transition);
}

.ec-segment:hover {
    color: var(--ec-blue-700);
}

.ec-segment.active {
    color: var(--ec-navy-900);
    background: var(--ec-white);
    box-shadow: var(--ec-shadow-sm);
}


/* ============================================================
   13. PROGRESS BAR
   ============================================================ */

.ec-progress {
    position: relative;

    width: 100%;
    height: 8px;

    overflow: hidden;

    background: var(--ec-gray-200);

    border-radius: var(--ec-radius-full);
}

.ec-progress-bar {
    height: 100%;

    background: var(--ec-blue-700);

    border-radius: inherit;

    transition:
        width 500ms ease;
}

.ec-progress-gold .ec-progress-bar {
    background: var(--ec-gold);
}

.ec-progress-success .ec-progress-bar {
    background: var(--ec-success-500);
}

.ec-progress-warning .ec-progress-bar {
    background: var(--ec-warning-500);
}

.ec-progress-danger .ec-progress-bar {
    background: var(--ec-danger-500);
}

.ec-progress-lg {
    height: 12px;
}

.ec-progress-sm {
    height: 5px;
}

.ec-progress-label {
    display: flex;
    justify-content: space-between;

    margin-bottom: 0.4rem;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-semibold);
}


/* ============================================================
   14. CIRCULAR PROGRESS
   ============================================================ */

.ec-progress-circle {
    --progress: 0;

    position: relative;

    width: 90px;
    height: 90px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        conic-gradient(
            var(--ec-blue-700)
            calc(var(--progress) * 1%),
            var(--ec-gray-200)
            0
        );
}

.ec-progress-circle::before {
    content: "";

    position: absolute;

    width: 70px;
    height: 70px;

    background: var(--ec-white);

    border-radius: 50%;
}

.ec-progress-circle-value {
    position: relative;
    z-index: 1;

    color: var(--ec-navy-900);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-bold);
}


/* ============================================================
   15. ACCORDION
   ============================================================ */

.ec-accordion {
    width: 100%;

    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-lg);

    overflow: hidden;
}

.ec-accordion-item + .ec-accordion-item {
    border-top: 1px solid var(--ec-border);
}

.ec-accordion-header {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    padding: 1rem;

    color: var(--ec-navy-900);

    background: var(--ec-white);

    border: 0;

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-semibold);

    text-align: left;

    transition:
        color var(--ec-transition),
        background var(--ec-transition);
}

.ec-accordion-header:hover {
    color: var(--ec-blue-700);
    background: var(--ec-blue-50);
}

.ec-accordion-icon {
    transition:
        transform var(--ec-transition);
}

.ec-accordion-item.active .ec-accordion-icon {
    transform: rotate(180deg);
}

.ec-accordion-body {
    display: none;

    padding: 0 1rem 1rem;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-sm);
}

.ec-accordion-item.active .ec-accordion-body {
    display: block;
}


/* ============================================================
   16. TOOLTIP
   ============================================================ */

.ec-tooltip {
    position: relative;
}

.ec-tooltip::after {
    content: attr(data-tooltip);

    position: absolute;

    left: 50%;
    bottom: calc(100% + 8px);

    z-index: var(--ec-z-tooltip);

    width: max-content;
    max-width: 240px;

    padding: 0.45rem 0.65rem;

    color: var(--ec-white);
    background: var(--ec-navy-950);

    border-radius: var(--ec-radius-sm);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-medium);

    pointer-events: none;

    opacity: 0;
    visibility: hidden;

    transform:
        translateX(-50%)
        translateY(4px);

    transition:
        opacity var(--ec-transition-fast),
        visibility var(--ec-transition-fast),
        transform var(--ec-transition-fast);
}

.ec-tooltip:hover::after,
.ec-tooltip:focus-visible::after {
    opacity: 1;
    visibility: visible;

    transform:
        translateX(-50%)
        translateY(0);
}


/* ============================================================
   17. UPLOAD ZONE
   ============================================================ */

.ec-upload-zone {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;

    min-height: 190px;

    padding: var(--ec-space-6);

    color: var(--ec-text-muted);

    background: var(--ec-blue-50);

    border: 2px dashed var(--ec-blue-200);
    border-radius: var(--ec-radius-xl);

    text-align: center;

    transition:
        border-color var(--ec-transition),
        background var(--ec-transition),
        transform var(--ec-transition);
}

.ec-upload-zone:hover,
.ec-upload-zone.dragover,
.ec-upload-zone.is-dragover {
    background: var(--ec-blue-100);
    border-color: var(--ec-blue-600);

    transform: translateY(-1px);
}

.ec-upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    margin-bottom: var(--ec-space-4);

    color: var(--ec-blue-700);
    background: var(--ec-white);

    border-radius: 50%;

    box-shadow: var(--ec-shadow-sm);

    font-size: 1.5rem;
}

.ec-upload-title {
    margin-bottom: 0.3rem;

    color: var(--ec-navy-900);

    font-size: var(--ec-font-size-md);
    font-weight: var(--ec-weight-bold);
}

.ec-upload-text {
    max-width: 430px;

    margin: 0;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-xs);
}

.ec-upload-input {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    opacity: 0;

    cursor: pointer;
}


/* ============================================================
   18. FILE CARD
   ============================================================ */

.ec-file-card {
    display: flex;
    align-items: center;

    gap: 0.85rem;

    padding: 0.8rem;

    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-lg);

    transition:
        border-color var(--ec-transition),
        box-shadow var(--ec-transition);
}

.ec-file-card:hover {
    border-color: var(--ec-blue-200);
    box-shadow: var(--ec-shadow-sm);
}

.ec-file-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    flex: 0 0 auto;

    color: var(--ec-blue-700);
    background: var(--ec-blue-50);

    border-radius: var(--ec-radius-md);
}

.ec-file-info {
    flex: 1;
    min-width: 0;
}

.ec-file-name {
    overflow: hidden;

    margin-bottom: 0.2rem;

    color: var(--ec-text-dark);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-semibold);

    text-overflow: ellipsis;
    white-space: nowrap;
}

.ec-file-meta {
    color: var(--ec-text-light);

    font-size: var(--ec-font-size-xs);
}

.ec-file-actions {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}


/* ============================================================
   19. PAYMENT PROVIDER CARD
   ============================================================ */

.ec-payment-card {
    position: relative;

    padding: var(--ec-space-5);

    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-xl);

    box-shadow: var(--ec-shadow-xs);

    transition:
        border-color var(--ec-transition),
        box-shadow var(--ec-transition),
        transform var(--ec-transition);
}

.ec-payment-card:hover {
    border-color: var(--ec-blue-200);
    box-shadow: var(--ec-shadow-md);

    transform: translateY(-2px);
}

.ec-payment-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 1rem;

    margin-bottom: var(--ec-space-4);
}

.ec-payment-provider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ec-payment-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    background: var(--ec-gray-50);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-md);

    overflow: hidden;
}

.ec-payment-logo img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.ec-payment-name {
    color: var(--ec-navy-900);

    font-size: var(--ec-font-size-md);
    font-weight: var(--ec-weight-bold);
}

.ec-payment-status {
    margin-top: 0.15rem;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-xs);
}

.ec-payment-card-body {
    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-sm);
}

.ec-payment-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 0.75rem;

    margin-top: var(--ec-space-5);
    padding-top: var(--ec-space-4);

    border-top: 1px solid var(--ec-border);
}


/* ============================================================
   20. SWITCH
   ============================================================ */

.ec-switch {
    position: relative;

    display: inline-flex;

    width: 48px;
    height: 27px;

    flex: 0 0 auto;
}

.ec-switch input {
    position: absolute;

    width: 1px;
    height: 1px;

    opacity: 0;
}

.ec-switch-track {
    position: absolute;

    inset: 0;

    background: var(--ec-gray-300);

    border-radius: var(--ec-radius-full);

    cursor: pointer;

    transition:
        background var(--ec-transition);
}

.ec-switch-track::before {
    content: "";

    position: absolute;

    top: 3px;
    left: 3px;

    width: 21px;
    height: 21px;

    background: var(--ec-white);

    border-radius: 50%;

    box-shadow: var(--ec-shadow-xs);

    transition:
        transform var(--ec-transition-spring);
}

.ec-switch input:checked + .ec-switch-track {
    background: var(--ec-blue-700);
}

.ec-switch input:checked + .ec-switch-track::before {
    transform: translateX(21px);
}

.ec-switch input:focus-visible + .ec-switch-track {
    outline: 3px solid rgba(8, 117, 209, 0.2);
    outline-offset: 2px;
}

.ec-switch-gold input:checked + .ec-switch-track {
    background: var(--ec-gold-dark);
}


/* ============================================================
   21. CHECKBOX
   ============================================================ */

.ec-checkbox,
.ec-radio {
    display: inline-flex;
    align-items: center;

    gap: 0.55rem;

    cursor: pointer;

    color: var(--ec-text);

    font-size: var(--ec-font-size-sm);
}

.ec-checkbox input,
.ec-radio input {
    width: 17px;
    height: 17px;

    accent-color: var(--ec-blue-700);

    cursor: pointer;
}


/* ============================================================
   22. LOADER OVERLAY
   ============================================================ */

.ec-loader-overlay {
    position: fixed;

    inset: 0;

    z-index: var(--ec-z-overlay);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 1rem;

    background:
        rgba(3, 19, 47, 0.55);

    backdrop-filter: blur(4px);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity var(--ec-transition),
        visibility var(--ec-transition);
}

.ec-loader-overlay.active,
.ec-loader-overlay.open {
    opacity: 1;
    visibility: visible;
}

.ec-loader-box {
    display: flex;
    align-items: center;
    flex-direction: column;

    gap: 1rem;

    min-width: 190px;

    padding: var(--ec-space-6);

    color: var(--ec-white);

    background: var(--ec-navy-900);

    border: 1px solid rgba(255,255,255,0.1);

    border-radius: var(--ec-radius-xl);

    box-shadow: var(--ec-shadow-xl);

    text-align: center;
}

.ec-loader-text {
    margin: 0;

    color: rgba(255,255,255,0.82);

    font-size: var(--ec-font-size-sm);
}


/* ============================================================
   23. SKELETON COMPONENTS
   ============================================================ */

.ec-skeleton-text {
    height: 12px;

    margin-bottom: 8px;

    border-radius: var(--ec-radius-sm);
}

.ec-skeleton-title {
    width: 55%;
    height: 20px;

    margin-bottom: 12px;

    border-radius: var(--ec-radius-sm);
}

.ec-skeleton-avatar {
    width: 44px;
    height: 44px;

    border-radius: 50%;
}

.ec-skeleton-card {
    height: 160px;

    border-radius: var(--ec-radius-xl);
}


/* ============================================================
   24. PAGINATION
   ============================================================ */

.ec-pagination {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 0.35rem;

    flex-wrap: wrap;
}

.ec-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 38px;
    height: 38px;

    padding: 0 0.65rem;

    color: var(--ec-text-muted);
    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-md);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-semibold);

    transition:
        color var(--ec-transition),
        background var(--ec-transition),
        border-color var(--ec-transition);
}

.ec-page-btn:hover {
    color: var(--ec-blue-700);
    background: var(--ec-blue-50);
    border-color: var(--ec-blue-200);
}

.ec-page-btn.active {
    color: var(--ec-white);
    background: var(--ec-blue-700);
    border-color: var(--ec-blue-700);
}

.ec-page-btn:disabled {
    opacity: 0.45;
}


/* ============================================================
   25. BREADCRUMBS
   ============================================================ */

.ec-breadcrumbs {
    display: flex;
    align-items: center;

    gap: 0.4rem;

    flex-wrap: wrap;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-xs);
}

.ec-breadcrumb {
    display: inline-flex;
    align-items: center;

    gap: 0.4rem;
}

.ec-breadcrumb a {
    color: var(--ec-blue-700);
    font-weight: var(--ec-weight-medium);
}

.ec-breadcrumb a:hover {
    color: var(--ec-blue-900);
}

.ec-breadcrumb-current {
    color: var(--ec-text-dark);
    font-weight: var(--ec-weight-semibold);
}

.ec-breadcrumb-separator {
    color: var(--ec-text-light);
}


/* ============================================================
   26. SEARCH BOX
   ============================================================ */

.ec-search {
    position: relative;

    width: 100%;
}

.ec-search-input {
    width: 100%;

    min-height: 44px;

    padding:
        0.65rem
        2.7rem
        0.65rem
        2.7rem;

    color: var(--ec-text);

    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-full);

    outline: none;

    font-size: var(--ec-font-size-sm);

    transition:
        border-color var(--ec-transition),
        box-shadow var(--ec-transition);
}

.ec-search-input:focus {
    border-color: var(--ec-blue-600);

    box-shadow:
        0 0 0 3px rgba(8,117,209,0.1);
}

.ec-search-icon {
    position: absolute;

    left: 0.9rem;
    top: 50%;

    color: var(--ec-text-light);

    transform: translateY(-50%);

    pointer-events: none;
}

.ec-search-clear {
    position: absolute;

    right: 0.65rem;
    top: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;

    color: var(--ec-text-muted);
    background: transparent;

    border: 0;
    border-radius: 50%;

    transform: translateY(-50%);
}

.ec-search-clear:hover {
    color: var(--ec-danger-600);
    background: var(--ec-danger-50);
}


/* ============================================================
   27. FILTER BAR
   ============================================================ */

.ec-filter-bar {
    display: flex;
    align-items: center;

    gap: 0.75rem;

    flex-wrap: wrap;

    padding: 0.8rem;

    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-lg);
}

.ec-filter-item {
    flex: 0 1 auto;
}

.ec-filter-label {
    display: block;

    margin-bottom: 0.3rem;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-semibold);
}


/* ============================================================
   28. TAGS
   ============================================================ */

.ec-tag-list {
    display: flex;
    align-items: center;

    gap: 0.4rem;

    flex-wrap: wrap;
}

.ec-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;

    padding: 0.35rem 0.6rem;

    color: var(--ec-blue-800);
    background: var(--ec-blue-50);

    border: 1px solid var(--ec-blue-100);

    border-radius: var(--ec-radius-full);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-medium);
}

.ec-tag-remove {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 16px;
    height: 16px;

    padding: 0;

    color: inherit;
    background: transparent;

    border: 0;
}


/* ============================================================
   29. TIMELINE
   ============================================================ */

.ec-timeline {
    position: relative;

    padding-left: 28px;
}

.ec-timeline::before {
    content: "";

    position: absolute;

    left: 8px;
    top: 6px;
    bottom: 6px;

    width: 2px;

    background: var(--ec-border);
}

.ec-timeline-item {
    position: relative;

    padding-bottom: var(--ec-space-6);
}

.ec-timeline-item:last-child {
    padding-bottom: 0;
}

.ec-timeline-dot {
    position: absolute;

    left: -26px;
    top: 4px;

    width: 14px;
    height: 14px;

    background: var(--ec-blue-700);

    border: 3px solid var(--ec-blue-100);

    border-radius: 50%;
}

.ec-timeline-title {
    margin-bottom: 0.2rem;

    color: var(--ec-text-dark);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-bold);
}

.ec-timeline-meta {
    color: var(--ec-text-light);

    font-size: var(--ec-font-size-xs);
}

.ec-timeline-text {
    margin-top: 0.4rem;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-sm);
}


/* ============================================================
   30. STAT CARD
   ============================================================ */

.ec-stat-card {
    position: relative;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 1rem;

    padding: var(--ec-space-5);

    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-xl);

    box-shadow: var(--ec-shadow-sm);

    overflow: hidden;

    transition:
        transform var(--ec-transition),
        box-shadow var(--ec-transition),
        border-color var(--ec-transition);
}

.ec-stat-card:hover {
    transform: translateY(-2px);

    border-color: var(--ec-blue-200);

    box-shadow: var(--ec-shadow-md);
}

.ec-stat-card-content {
    min-width: 0;
}

.ec-stat-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 50px;
    height: 50px;

    flex: 0 0 auto;

    color: var(--ec-blue-700);
    background: var(--ec-blue-50);

    border-radius: var(--ec-radius-lg);
}

.ec-stat-card.gold .ec-stat-card-icon {
    color: var(--ec-yellow-900);
    background: var(--ec-yellow-100);
}

.ec-stat-card.green .ec-stat-card-icon {
    color: var(--ec-success-700);
    background: var(--ec-success-100);
}

.ec-stat-card.red .ec-stat-card-icon {
    color: var(--ec-danger-700);
    background: var(--ec-danger-100);
}

.ec-stat-card.purple .ec-stat-card-icon {
    color: var(--ec-purple-600);
    background: var(--ec-purple-100);
}


/* ============================================================
   31. FEATURE CARD
   ============================================================ */

.ec-feature-card {
    padding: var(--ec-space-6);

    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-xl);

    box-shadow: var(--ec-shadow-sm);

    transition:
        transform var(--ec-transition),
        box-shadow var(--ec-transition),
        border-color var(--ec-transition);
}

.ec-feature-card:hover {
    transform: translateY(-5px);

    border-color: var(--ec-blue-200);

    box-shadow: var(--ec-shadow-lg);
}

.ec-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 58px;
    height: 58px;

    margin-bottom: var(--ec-space-5);

    color: var(--ec-blue-700);
    background: var(--ec-blue-50);

    border-radius: var(--ec-radius-lg);

    font-size: 1.4rem;
}

.ec-feature-title {
    margin-bottom: 0.5rem;

    color: var(--ec-navy-900);

    font-size: var(--ec-font-size-lg);
    font-weight: var(--ec-weight-bold);
}

.ec-feature-text {
    margin: 0;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-sm);
    line-height: var(--ec-line-relaxed);
}


/* ============================================================
   32. QUICK ACTION CARD
   ============================================================ */

.ec-quick-action {
    position: relative;

    display: flex;
    align-items: center;

    gap: 0.8rem;

    min-height: 82px;

    padding: 0.9rem 1rem;

    color: var(--ec-white);

    background: var(--ec-blue-700);

    border-radius: var(--ec-radius-lg);

    overflow: hidden;

    box-shadow: var(--ec-shadow-sm);

    transition:
        transform var(--ec-transition),
        box-shadow var(--ec-transition);
}

.ec-quick-action::after {
    content: "";

    position: absolute;

    width: 90px;
    height: 90px;

    right: -30px;
    bottom: -35px;

    background: rgba(255,255,255,0.12);

    border-radius: 50%;
}

.ec-quick-action:hover {
    color: var(--ec-white);

    transform: translateY(-3px);

    box-shadow: var(--ec-shadow-blue);
}

.ec-quick-action.gold {
    color: var(--ec-navy-950);
    background: var(--ec-gold);
}

.ec-quick-action.green {
    background: var(--ec-success-600);
}

.ec-quick-action.orange {
    background: var(--ec-orange-600);
}

.ec-quick-action.purple {
    background: var(--ec-purple-600);
}

.ec-quick-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    flex: 0 0 auto;

    background: rgba(255,255,255,0.16);

    border-radius: var(--ec-radius-md);
}

.ec-quick-action-content {
    position: relative;
    z-index: 1;

    min-width: 0;
}

.ec-quick-action-title {
    margin-bottom: 0.15rem;

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-bold);
}

.ec-quick-action-text {
    margin: 0;

    opacity: 0.82;

    font-size: var(--ec-font-size-xs);
}


/* ============================================================
   33. PROFILE CARD
   ============================================================ */

.ec-profile-card {
    display: flex;
    align-items: center;

    gap: var(--ec-space-5);

    padding: var(--ec-space-5);

    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-xl);

    box-shadow: var(--ec-shadow-sm);
}

.ec-profile-details {
    flex: 1;
    min-width: 0;
}

.ec-profile-name {
    margin-bottom: 0.25rem;

    color: var(--ec-navy-900);

    font-size: var(--ec-font-size-lg);
    font-weight: var(--ec-weight-bold);
}

.ec-profile-role {
    margin-bottom: 0.25rem;

    color: var(--ec-blue-700);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-semibold);
}

.ec-profile-meta {
    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-xs);
}


/* ============================================================
   34. RATING
   ============================================================ */

.ec-rating {
    display: inline-flex;
    align-items: center;

    gap: 0.15rem;

    color: var(--ec-gold);
}

.ec-rating-value {
    margin-left: 0.4rem;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-semibold);
}


/* ============================================================
   35. QUOTE / TESTIMONIAL
   ============================================================ */

.ec-testimonial {
    position: relative;

    padding: var(--ec-space-6);

    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-radius: var(--ec-radius-xl);

    box-shadow: var(--ec-shadow-sm);
}

.ec-testimonial::before {
    content: "“";

    position: absolute;

    top: 8px;
    left: 18px;

    color: var(--ec-blue-200);

    font-family: Georgia, serif;
    font-size: 4rem;
    line-height: 1;
}

.ec-testimonial-text {
    position: relative;
    z-index: 1;

    margin-bottom: var(--ec-space-5);
    padding-top: 1rem;

    color: var(--ec-text);

    font-size: var(--ec-font-size-sm);
    line-height: var(--ec-line-relaxed);
}

.ec-testimonial-user {
    display: flex;
    align-items: center;

    gap: 0.7rem;
}

.ec-testimonial-name {
    color: var(--ec-navy-900);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-bold);
}

.ec-testimonial-role {
    color: var(--ec-text-light);

    font-size: var(--ec-font-size-xs);
}


/* ============================================================
   36. CAROUSEL
   ============================================================ */

.ec-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.ec-carousel-track {
    display: flex;

    transition:
        transform 500ms cubic-bezier(.2,.8,.2,1);
}

.ec-carousel-slide {
    min-width: 100%;
    flex: 0 0 100%;
}

.ec-carousel-control {
    position: absolute;

    top: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    color: var(--ec-navy-900);
    background: rgba(255,255,255,0.94);

    border: 1px solid var(--ec-border);

    border-radius: 50%;

    box-shadow: var(--ec-shadow-md);

    transform: translateY(-50%);

    z-index: 2;

    transition:
        background var(--ec-transition),
        color var(--ec-transition),
        transform var(--ec-transition);
}

.ec-carousel-control:hover {
    color: var(--ec-white);
    background: var(--ec-blue-700);

    transform:
        translateY(-50%)
        scale(1.05);
}

.ec-carousel-prev {
    left: 1rem;
}

.ec-carousel-next {
    right: 1rem;
}

.ec-carousel-dots {
    position: absolute;

    left: 50%;
    bottom: 1rem;

    display: flex;
    gap: 0.4rem;

    transform: translateX(-50%);

    z-index: 2;
}

.ec-carousel-dot {
    width: 8px;
    height: 8px;

    padding: 0;

    background: rgba(255,255,255,0.55);

    border: 0;
    border-radius: 50%;

    transition:
        width var(--ec-transition),
        background var(--ec-transition);
}

.ec-carousel-dot.active {
    width: 24px;

    background: var(--ec-gold);

    border-radius: var(--ec-radius-full);
}


/* ============================================================
   37. NEWS TICKER
   ============================================================ */

.ec-news-ticker {
    display: flex;
    align-items: center;

    min-height: 42px;

    color: var(--ec-white);

    background: var(--ec-navy-950);

    overflow: hidden;
}

.ec-news-label {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;

    min-height: 42px;

    padding: 0 1rem;

    flex: 0 0 auto;

    color: var(--ec-navy-950);

    background: var(--ec-gold);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-extrabold);

    text-transform: uppercase;
}

.ec-news-track-wrap {
    flex: 1;

    overflow: hidden;
}

.ec-news-track {
    display: inline-flex;
    align-items: center;

    gap: 2rem;

    white-space: nowrap;

    animation:
        ec-news-scroll 30s linear infinite;
}

.ec-news-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;

    color: rgba(255,255,255,0.86);

    font-size: var(--ec-font-size-xs);
}

.ec-news-item::before {
    content: "•";

    color: var(--ec-gold);

    font-size: 1.1rem;
}

.ec-news-track:hover {
    animation-play-state: paused;
}

@keyframes ec-news-scroll {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }

}


/* ============================================================
   38. COUNTDOWN
   ============================================================ */

.ec-countdown {
    display: flex;
    align-items: center;

    gap: 0.5rem;

    flex-wrap: wrap;
}

.ec-countdown-item {
    display: flex;
    align-items: center;
    flex-direction: column;

    min-width: 60px;

    padding: 0.55rem;

    color: var(--ec-white);
    background: var(--ec-navy-900);

    border-radius: var(--ec-radius-md);
}

.ec-countdown-value {
    font-size: var(--ec-font-size-xl);
    font-weight: var(--ec-weight-extrabold);
    line-height: 1;
}

.ec-countdown-label {
    margin-top: 0.25rem;

    color: rgba(255,255,255,0.65);

    font-size: 9px;

    text-transform: uppercase;
}


/* ============================================================
   39. FORM INPUT GROUP
   ============================================================ */

.ec-input-group {
    display: flex;
    align-items: stretch;

    width: 100%;
}

.ec-input-group .ec-input {
    min-width: 0;

    border-radius: var(--ec-radius-md) 0 0 var(--ec-radius-md);
}

.ec-input-addon {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 44px;

    padding: 0 0.75rem;

    color: var(--ec-text-muted);
    background: var(--ec-gray-50);

    border: 1px solid var(--ec-border);

    font-size: var(--ec-font-size-sm);
}

.ec-input-group .ec-input-addon:first-child {
    border-right: 0;

    border-radius:
        var(--ec-radius-md)
        0
        0
        var(--ec-radius-md);
}

.ec-input-group .ec-input-addon:last-child {
    border-left: 0;

    border-radius:
        0
        var(--ec-radius-md)
        var(--ec-radius-md)
        0;
}


/* ============================================================
   40. PASSWORD TOGGLE
   ============================================================ */

.ec-password-field {
    position: relative;
}

.ec-password-field .ec-input {
    padding-right: 3rem;
}

.ec-password-toggle {
    position: absolute;

    top: 50%;
    right: 0.65rem;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    color: var(--ec-text-light);

    background: transparent;

    border: 0;
    border-radius: 50%;

    transform: translateY(-50%);
}

.ec-password-toggle:hover {
    color: var(--ec-blue-700);
    background: var(--ec-blue-50);
}


/* ============================================================
   41. FORM VALIDATION INDICATORS
   ============================================================ */

.ec-validation {
    display: flex;
    align-items: center;

    gap: 0.4rem;

    margin-top: 0.4rem;

    font-size: var(--ec-font-size-xs);
}

.ec-validation.valid {
    color: var(--ec-success-600);
}

.ec-validation.invalid {
    color: var(--ec-danger-600);
}

.ec-validation.pending {
    color: var(--ec-text-muted);
}


/* ============================================================
   42. STATUS INDICATOR
   ============================================================ */

.ec-status {
    display: inline-flex;
    align-items: center;

    gap: 0.4rem;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-medium);
}

.ec-status-dot {
    width: 8px;
    height: 8px;

    flex: 0 0 auto;

    background: var(--ec-gray-400);

    border-radius: 50%;
}

.ec-status.online .ec-status-dot,
.ec-status.active .ec-status-dot {
    background: var(--ec-success-500);

    box-shadow:
        0 0 0 4px rgba(18,183,106,0.12);
}

.ec-status.offline .ec-status-dot {
    background: var(--ec-gray-400);
}

.ec-status.busy .ec-status-dot {
    background: var(--ec-warning-500);
}

.ec-status.error .ec-status-dot {
    background: var(--ec-danger-500);
}


/* ============================================================
   43. ROLE CHIP
   ============================================================ */

.ec-role-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;

    padding: 0.4rem 0.7rem;

    color: var(--ec-blue-800);
    background: var(--ec-blue-50);

    border: 1px solid var(--ec-blue-100);

    border-radius: var(--ec-radius-full);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-bold);
}

.ec-role-chip.owner {
    color: var(--ec-yellow-900);
    background: var(--ec-yellow-100);
    border-color: var(--ec-yellow-200);
}

.ec-role-chip.teacher {
    color: var(--ec-purple-600);
    background: var(--ec-purple-100);
}

.ec-role-chip.student {
    color: var(--ec-success-700);
    background: var(--ec-success-100);
}

.ec-role-chip.parent {
    color: var(--ec-info-700);
    background: var(--ec-info-100);
}


/* ============================================================
   44. ONLINE/OFFLINE BANNER
   ============================================================ */

.ec-connection-banner {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 0.5rem;

    min-height: 34px;

    padding: 0.4rem 1rem;

    color: var(--ec-white);

    background: var(--ec-success-600);

    font-size: var(--ec-font-size-xs);
    font-weight: var(--ec-weight-semibold);
}

.ec-connection-banner.offline {
    background: var(--ec-warning-600);
}

.ec-connection-banner.error {
    background: var(--ec-danger-600);
}


/* ============================================================
   45. CONFIRMATION CARD
   ============================================================ */

.ec-confirm {
    padding: var(--ec-space-6);

    text-align: center;
}

.ec-confirm-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 72px;
    height: 72px;

    margin: 0 auto var(--ec-space-5);

    color: var(--ec-warning-700);
    background: var(--ec-warning-100);

    border-radius: 50%;

    font-size: 1.6rem;
}

.ec-confirm-icon.success {
    color: var(--ec-success-700);
    background: var(--ec-success-100);
}

.ec-confirm-icon.danger {
    color: var(--ec-danger-700);
    background: var(--ec-danger-100);
}

.ec-confirm-title {
    margin-bottom: 0.5rem;

    color: var(--ec-navy-900);

    font-size: var(--ec-font-size-xl);
    font-weight: var(--ec-weight-bold);
}

.ec-confirm-text {
    max-width: 430px;

    margin: 0 auto var(--ec-space-6);

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-sm);
}


/* ============================================================
   46. ACTION GROUP
   ============================================================ */

.ec-action-group {
    display: flex;
    align-items: center;

    gap: 0.5rem;

    flex-wrap: wrap;
}

.ec-action-group-right {
    justify-content: flex-end;
}

.ec-action-group-center {
    justify-content: center;
}


/* ============================================================
   47. DIVIDER WITH TEXT
   ============================================================ */

.ec-divider-text {
    display: flex;
    align-items: center;

    gap: 0.8rem;

    color: var(--ec-text-light);

    font-size: var(--ec-font-size-xs);
}

.ec-divider-text::before,
.ec-divider-text::after {
    content: "";

    flex: 1;

    height: 1px;

    background: var(--ec-border);
}


/* ============================================================
   48. INFO PANEL
   ============================================================ */

.ec-info-panel {
    padding: var(--ec-space-5);

    background:
        linear-gradient(
            135deg,
            var(--ec-blue-50),
            var(--ec-white)
        );

    border: 1px solid var(--ec-blue-200);

    border-radius: var(--ec-radius-xl);
}

.ec-info-panel-title {
    display: flex;
    align-items: center;

    gap: 0.5rem;

    margin-bottom: 0.45rem;

    color: var(--ec-navy-900);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-bold);
}

.ec-info-panel-text {
    margin: 0;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-xs);
    line-height: var(--ec-line-relaxed);
}


/* ============================================================
   49. ANNOUNCEMENT CARD
   ============================================================ */

.ec-announcement {
    display: flex;
    align-items: flex-start;

    gap: 0.85rem;

    padding: var(--ec-space-4);

    background: var(--ec-white);

    border: 1px solid var(--ec-border);

    border-left: 4px solid var(--ec-blue-700);

    border-radius: var(--ec-radius-lg);
}

.ec-announcement.important {
    border-left-color: var(--ec-gold);
}

.ec-announcement.warning {
    border-left-color: var(--ec-warning-500);
}

.ec-announcement.danger {
    border-left-color: var(--ec-danger-500);
}

.ec-announcement-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    flex: 0 0 auto;

    color: var(--ec-blue-700);
    background: var(--ec-blue-50);

    border-radius: var(--ec-radius-md);
}

.ec-announcement-title {
    margin-bottom: 0.2rem;

    color: var(--ec-navy-900);

    font-size: var(--ec-font-size-sm);
    font-weight: var(--ec-weight-bold);
}

.ec-announcement-text {
    margin: 0;

    color: var(--ec-text-muted);

    font-size: var(--ec-font-size-xs);
}


/* ============================================================
   50. FLOATING ACTION BUTTON
   ============================================================ */

.ec-fab {
    position: fixed;

    right: 1.25rem;
    bottom: 1.25rem;

    z-index: var(--ec-z-sticky);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 54px;
    height: 54px;

    color: var(--ec-navy-950);
    background: var(--ec-gold);

    border: 0;
    border-radius: 50%;

    box-shadow: var(--ec-shadow-gold);

    transition:
        transform var(--ec-transition),
        box-shadow var(--ec-transition);
}

.ec-fab:hover {
    color: var(--ec-navy-950);

    transform:
        translateY(-3px)
        scale(1.03);

    box-shadow:
        0 14px 32px rgba(255,197,47,0.32);
}


/* ============================================================
   51. BACK TO TOP
   ============================================================ */

.ec-back-to-top {
    position: fixed;

    right: 1rem;
    bottom: 1rem;

    z-index: var(--ec-z-sticky);

    display: flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    height: 44px;

    color: var(--ec-navy-950);
    background: var(--ec-gold);

    border: 0;
    border-radius: 50%;

    box-shadow: var(--ec-shadow-gold);

    opacity: 0;
    visibility: hidden;

    transform: translateY(10px);

    transition:
        opacity var(--ec-transition),
        visibility var(--ec-transition),
        transform var(--ec-transition);
}

.ec-back-to-top.visible,
.ec-back-to-top.show {
    opacity: 1;
    visibility: visible;

    transform: translateY(0);
}

.ec-back-to-top:hover {
    transform:
        translateY(-2px);
}


/* ============================================================
   52. PRINT HELPERS
   ============================================================ */

.ec-print-header {
    display: none;
}

@media print {

    .ec-no-print,
    .ec-nav,
    .ec-sidebar,
    .ec-topbar,
    .ec-fab,
    .ec-back-to-top {
        display: none !important;
    }

    .ec-print-header {
        display: block;
    }

    .ec-card,
    .ec-stat-card,
    .ec-feature-card {
        box-shadow: none !important;
    }

}


/* ============================================================
   53. COMPONENT RESPONSIVE FOUNDATION
   ============================================================ */

@media (max-width: 900px) {

    .ec-nav-menu {
        display: none;
    }

    .ec-menu-toggle {
        display: inline-flex;
    }

    .ec-nav-actions {
        gap: 0.35rem;
    }

    .ec-user-info {
        display: none;
    }

}

@media (max-width: 640px) {

    .ec-modal {
        align-items: flex-end;

        padding: 0;
    }

    .ec-modal-dialog,
    .ec-modal-sm .ec-modal-dialog,
    .ec-modal-lg .ec-modal-dialog,
    .ec-modal-xl .ec-modal-dialog {
        width: 100%;
        max-width: none;

        max-height: 92vh;

        border-radius:
            var(--ec-radius-xl)
            var(--ec-radius-xl)
            0
            0;
    }

    .ec-modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .ec-modal-footer .ec-btn {
        width: 100%;
    }

    .ec-toast-container {
        right: 0.75rem;
        bottom: 0.75rem;

        width: calc(100% - 1.5rem);
    }

    .ec-profile-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .ec-action-group {
        width: 100%;
    }

    .ec-action-group .ec-btn {
        flex: 1;
    }

    .ec-payment-card-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .ec-search {
        width: 100%;
    }

    .ec-filter-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .ec-filter-item {
        width: 100%;
    }

    .ec-segmented {
        width: 100%;
        overflow-x: auto;
    }

    .ec-segment {
        flex: 1;
    }

    .ec-quick-action {
        min-height: 74px;
    }

    .ec-countdown {
        justify-content: center;
    }

}


/* ============================================================
   54. REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    .ec-news-track {
        animation: none;
    }

    .ec-toast,
    .ec-toast-progress {
        animation: none;
    }

    .ec-carousel-track {
        transition: none;
    }

}