/* ============================================
   Africorp Financial Services Portal - Employee Portal
   Dark Gold Theme - Solid Surfaces
   ============================================  */

/* --- Layout Shell ---  */
.ep-shell {
    min-height: 100vh;
    display: flex;
    background: #141210;
    color: #e2e0dd;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
}

.ep-shell::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('/Images/africorpDash.png') center / cover no-repeat;
    z-index: 0;
}

.ep-shell::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);   /* ← darker, text-safe  */
    z-index: 0;
}

/* --- Sidebar ---  */
.ep-sidebar {
    width: 18rem;
    display: flex;
    flex-direction: column;
    border-right: var(--glass-border-sidebar);
    background: #1d1a15;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
    overflow-y: auto;
}

.ep-sidebar-brand {
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(177, 141, 89, 0.12);
}

.ep-sidebar-brand-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: #b18d59;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 15px rgba(177, 141, 89, 0.2);
    flex-shrink: 0;
}

.ep-sidebar-brand-icon .material-symbols-outlined { font-size: 1.5rem; }

.ep-sidebar-brand-title {
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #fff;
    line-height: 1;
    margin: 0;
}

.ep-sidebar-brand-sub {
    font-size: 0.625rem;
    color: #b18d59;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.2em;
    line-height: 1;
    margin-top: 0.375rem;
}

/* --- Sidebar Nav ---  */
.ep-sidebar-nav {
    flex: 1;
    padding: 0 1rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ep-nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    background: transparent;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.ep-nav-item:hover {
    color: #fff;
    background: #252015;
    border-color: rgba(177, 141, 89, 0.15);
    text-decoration: none;
}

.ep-nav-item.active {
    color: #b18d59;
    background: #252015;
    border-color: rgba(177, 141, 89, 0.22);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ep-nav-item .material-symbols-outlined { font-size: 1.5rem; }

/* Outstanding-work count on the Tasks entry. Pushed to the right of the label so it reads as an
   annotation on the item rather than part of its name.  */
.ep-nav-badge {
    margin-left: auto;
    min-width: 1.25rem;
    padding: 0.0625rem 0.375rem;
    border-radius: 999px;
    background: var(--gold, #b18d59);
    color: #12100d;
    font-size: 0.6875rem;
    font-weight: 800;
    line-height: 1.4;
    text-align: center;
}

/* --- Sidebar Profile ---  */
.ep-sidebar-profile {
    padding: 1.5rem;
    border-top: 1px solid rgba(177, 141, 89, 0.12);
    margin-top: auto;
}

.ep-profile-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 1rem;
    transition: all 0.2s;
}

.ep-profile-card:hover { background: #252015; }

.ep-profile-avatar { position: relative; flex-shrink: 0; }

.ep-profile-avatar-img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(177, 141, 89, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b18d59;
    border: 2px solid rgba(177, 141, 89, 0.2);
}

.ep-profile-avatar-img .material-symbols-outlined { font-size: 1.5rem; }

.ep-profile-online {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 0.75rem;
    height: 0.75rem;
    background: #22c55e;
    border: 2px solid var(--glass-bg-heavy);
    border-radius: 50%;
}

.ep-profile-info { flex: 1; min-width: 0; }
.ep-profile-name { font-size: 0.75rem; font-weight: 700; color: #fff; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-profile-role { font-size: 0.625rem; color: #6b7280; font-weight: 600; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ep-profile-logout { background: none; border: none; color: #6b7280; cursor: pointer; padding: 0.25rem; transition: color 0.2s; display: flex; }
.ep-profile-logout:hover { color: #ef4444; }

/* --- Main Content Area ---  */
.ep-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    z-index: 1;
}

.ep-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(18, 16, 13, 0.55);  /* matches --glass-bg-heavy tint  */
    pointer-events: none;                 /* click-through  */
    z-index: 0;
}

/* --- Top Header Bar ---  */
.ep-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2.5rem;
    border-bottom: var(--glass-border-sidebar);
    background: var(--glass-bg-heavy);
    position: sticky;
    top: 0;
    z-index: 30;
}

.ep-header-left { display: flex; align-items: center; gap: 1rem; }
.ep-header-title { font-size: 1rem; font-weight: 700; color: #fff; margin: 0; outline: none; }
.ep-header-right { display: flex; align-items: center; gap: 1rem; }

.ep-header-signout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-weight: 700;
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.ep-header-signout:hover { color: #b18d59; background: #252015; }
.ep-header-signout .material-symbols-outlined { font-size: 0.875rem; }

/* --- Content ---  */
.ep-content {
    flex: 1;
    padding: 2rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
    background: rgba(18, 16, 13, 0.78);   /* was 0.60  */
    border-radius: 0;
}

/* --- Cards ---  */
.ep-card {
    background: var(--glass-bg-medium);
    border: var(--glass-border-gold);
    border-radius: 1rem;
    box-shadow: var(--glass-shadow-md);
    overflow: hidden;
    position: relative;
}

.ep-card-header {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(177, 141, 89, 0.12);
    background: rgba(35, 34, 31, 3.8);
}

.ep-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ep-card-title .material-symbols-outlined { color: #b18d59; font-size: 1.25rem; }
.ep-card-body { padding: 1.5rem 2rem; }
.ep-card-header-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* --- Welcome Banner ---  */
.ep-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.ep-welcome-text h2 { font-size: 1.5rem; font-weight: 800; color: #fff; margin: 0 0 0.5rem 0; }
.ep-welcome-text p { color: #9ca3af; margin: 0; font-size: 0.875rem; }
.ep-welcome-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.ep-welcome-stat-label { font-size: 0.625rem; font-weight: 700; color: rgba(177, 141, 89, 0.6); text-transform: uppercase; letter-spacing: 0.15em; margin: 0; }
.ep-welcome-stat-value { font-size: 2rem; font-weight: 900; color: #b18d59; line-height: 1; margin: 0; }

.ep-welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: #252015;
    border: 1px solid rgba(177, 141, 89, 0.22);
    border-radius: 9999px;
    color: #b18d59;
    font-size: 0.625rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

/* --- Table ---  */
.ep-table { width: 100%; border-collapse: separate; border-spacing: 0; }

    .ep-table thead th {
        padding: 0.75rem 1rem;
        font-size: 0.625rem;
        font-weight: 900;
        color: rgba(177, 141, 89, 0.85);
        text-transform: uppercase;
        letter-spacing: 0.15em;
        background: var(--glass-bg-table-header);
        border-bottom: 1px solid rgba(177, 141, 89, 0.15);
        text-align: left;
    }

.ep-table tbody td {
    padding: 1rem;
    font-size: 0.875rem;
    color: #e2e0dd;
    border-bottom: 1px solid #2e2b25;
    vertical-align: middle;
}

    .ep-table tbody tr {
        transition: background 0.15s;
        background: rgba(35, 34, 31, 0.6);
    }

        .ep-table tbody tr:nth-child(even) {
            background: var(--glass-bg-table-header);
        }

.ep-table tbody tr:hover {
    background: #2e2a20;
}

.ep-table tbody tr:last-child td { border-bottom: none; }

.ep-table-name { font-weight: 700; color: #fff; }
.ep-table-email { color: #9ca3af; font-size: 0.8125rem; }

.ep-table-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #252015;
    color: #b18d59;
    border: 1px solid rgba(177, 141, 89, 0.22);
}

.ep-table-row-clickable { cursor: pointer; }
.ep-table-row-clickable:hover { background: #2e2a20; }

.ep-table-name-link { color: #fff; font-weight: 700; text-decoration: none; transition: color 0.2s; }
.ep-table-name-link:hover { color: #e2e0dd; text-decoration: underline; }

/* --- Workflow Views ---  */
.ep-workflow-stage-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #252015;
    color: #b18d59;
    border: 1px solid rgba(177, 141, 89, 0.22);
}

.ep-workflow-next {
    font-size: 0.8125rem;
    color: #d1cec7;
}

.ep-workflow-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ep-workflow-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #cbb38d;
    background: rgba(177, 141, 89, 0.1);
    border: 1px solid rgba(177, 141, 89, 0.16);
}

.ep-workflow-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.ep-workflow-stage {
    background: rgba(20, 18, 16, 0.65);
    border: 1px solid rgba(177, 141, 89, 0.16);
    border-radius: 0.85rem;
    overflow: hidden;
}

.ep-workflow-stage-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    border-bottom: 1px solid rgba(177, 141, 89, 0.12);
    background: rgba(35, 34, 31, 0.72);
}

.ep-workflow-stage-index {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 900;
    color: #b18d59;
    border: 1px solid rgba(177, 141, 89, 0.3);
    background: #252015;
}

.ep-workflow-stage-title {
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.ep-workflow-stage-count {
    margin: 0.2rem 0 0 0;
    font-size: 0.6875rem;
    color: #9ca3af;
}

.ep-workflow-stage-list {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 7rem;
}

.ep-workflow-card {
    border-radius: 0.7rem;
    border: 1px solid rgba(177, 141, 89, 0.12);
    background: rgba(35, 34, 31, 0.65);
    padding: 0.75rem;
}

.ep-workflow-client {
    margin: 0 0 0.35rem 0;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #fff;
}

.ep-workflow-empty {
    margin: 0;
    font-size: 0.75rem;
    color: #6b7280;
}

/* --- Buttons ---  */
.ep-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    white-space: nowrap;
}

.ep-btn .material-symbols-outlined { font-size: 1rem; }

/* Primary: dark gold background with gold text  */
.ep-btn-primary {
    background: #252015;
    color: var(--gold);
    border: 1px solid rgba(177, 141, 89, 0.25);
    box-shadow: var(--glass-shadow-sm);
}

.ep-btn-primary:hover {
    background: #2e2a20;
    color: var(--gold-hover);
    border-color: rgba(177, 141, 89, 0.40);
    box-shadow: 0 4px 16px rgba(177, 141, 89, 0.15);
}

.ep-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Outline: slightly lighter dark gold  */
.ep-btn-outline {
    background: #1d1a15;
    color: var(--gold);
    border: 1px solid rgba(177, 141, 89, 0.18);
}

.ep-btn-outline:hover {
    background: #252015;
    border-color: rgba(177, 141, 89, 0.35);
    color: var(--gold-hover);
}

.ep-btn-ghost { background: #1d1a15; color: #9ca3af; border: 1px solid rgba(177, 141, 89, 0.10); }
.ep-btn-ghost:hover { color: var(--gold); background: #252015; border-color: rgba(177, 141, 89, 0.22); }

.ep-btn-sm { padding: 0.5rem 1rem; font-size: 0.625rem; }

/* --- Token Generated Card ---  */
.ep-token-card {
    background: rgba(35, 34, 31, 5.8);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 1rem;
    box-shadow: none;
    overflow: hidden;
    position: relative;
}
    .ep-token-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 3px;
        background: rgba(35, 34, 31, 3.8);
    }
.ep-token-header { padding: 1.25rem 2rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(34, 197, 94, 1.3); }
.ep-token-title { font-size: 0.875rem; font-weight: 700; color: #22c55e; margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.ep-token-body { padding: 1.5rem 2rem; }
.ep-token-body p { color: #9ca3af; font-size: 0.875rem; margin: 0 0 1rem 0; }
.ep-token-body strong { color: #fff; }

.ep-token-url { width: 100%; background: #252015; border: 1px solid #2e2b25; border-radius: 0.5rem; padding: 0.875rem 1rem; color: #b18d59; font-family: 'Consolas', 'Courier New', monospace; font-size: 0.8125rem; outline: none; box-sizing: border-box; }
.ep-token-url:focus { border-color: rgba(177, 141, 89, 0.4); }
.ep-token-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }

/* --- Empty State ---  */
.ep-empty { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 3rem 1.5rem; text-align: center; }
.ep-empty-icon { width: 4rem; height: 4rem; border-radius: 50%; background: #252015; display: flex; align-items: center; justify-content: center; color: #b18d59; }
.ep-empty-icon .material-symbols-outlined { font-size: 2rem; }
.ep-empty-title { font-size: 1rem; font-weight: 700; color: #fff; margin: 0; }
.ep-empty-desc { color: #6b7280; font-size: 0.875rem; margin: 0; max-width: 24rem; }

/* --- Loading State ---  */
.ep-loading { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; padding: 3rem; }
.ep-spinner { width: 3rem; height: 3rem; border: 3px solid rgba(177, 141, 89, 0.2); border-top-color: #b18d59; border-radius: 50%; animation: ep-spin 1s linear infinite; }
@keyframes ep-spin { to { transform: rotate(360deg); } }
.ep-loading-text { color: #b18d59; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.75rem; }

/* --- Footer ---  */
.ep-footer { border-top: 1px solid #2e2b25; padding: 2rem 2.5rem; margin-top: auto; background: var(--glass-bg-heavy); }
.ep-footer-inner { max-width: 80rem; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.ep-footer-copy { font-size: 0.625rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.15em; margin: 0; }
.ep-footer-links { display: flex; gap: 2rem; }
.ep-footer-links a { font-size: 0.625rem; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.15em; text-decoration: none; transition: color 0.2s; }
.ep-footer-links a:hover { color: #b18d59; }

/* --- Sidebar Nav Dropdown ---  */
.ep-nav-group-label { padding: 1.5rem 1rem 0.5rem; font-size: 0.5625rem; font-weight: 900; color: rgba(177, 141, 89, 0.65); text-transform: uppercase; letter-spacing: 0.2em; }
.ep-nav-dropdown { display: flex; flex-direction: column; gap: 0.125rem; }
.ep-nav-dropdown-toggle { width: 100%; display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; border-radius: 0.75rem; border: none; background: transparent; color: #9ca3af; font-size: 0.875rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.ep-nav-dropdown-toggle:hover { color: #fff; background: #252015; }
.ep-nav-dropdown-toggle .material-symbols-outlined:last-child { margin-left: auto; font-size: 1.25rem; transition: transform 0.2s; }
.ep-nav-dropdown-toggle.open .material-symbols-outlined:last-child { transform: rotate(180deg); }
.ep-nav-sub { list-style: none; padding: 0 0 0 2.75rem; margin: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.ep-nav-sub li a { display: block; padding: 0.5rem 1rem; border-radius: 0.5rem; color: #6b7280; font-size: 0.8125rem; font-weight: 500; text-decoration: none; transition: all 0.2s; }
.ep-nav-sub li a:hover, .ep-nav-sub li a.active { color: #b18d59; background: #252015; }

/* --- Modal ---  */
.ep-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.60);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}


.ep-modal { background: var(--glass-bg-heavy); border: var(--glass-border-gold); border-radius: 1rem; width: 100%; max-width: 40rem; max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--glass-shadow-xl); }
.ep-modal-sm { max-width: 28rem; }

/* Document viewer. Wider than .ep-modal's 40rem, which is too narrow to read an A4 page.
   Carries no chrome of its own: DocumentPreview supplies its own border and toolbar. */
.ep-modal-viewer { width: 100%; max-width: 72rem; max-height: 85vh; }
/* The non-viewable fallback card keeps .ep-modal's 40rem, so centre it in the wider wrapper. */
.ep-modal-viewer > .ep-modal { margin: 0 auto; }

/* The upload modal can open the viewer, and equal z-index would leave it behind. */
.ep-modal-backdrop-stacked { z-index: 110; }

.ep-modal-header { padding: 1.5rem 2rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(177, 141, 89, 0.12); background: var(--glass-bg-heavy); }
.ep-modal-title { font-size: 1rem; font-weight: 700; color: #fff; margin: 0; display: flex; align-items: center; gap: 0.5rem; }
.ep-modal-title .material-symbols-outlined { color: #b18d59; font-size: 1.25rem; }

.ep-modal-body { padding: 1.5rem 2rem; overflow-y: auto; flex: 1; background: var(--glass-bg-medium); }

.ep-modal-footer { padding: 1.25rem 2rem; display: flex; justify-content: flex-end; gap: 0.75rem; border-top: 1px solid rgba(177, 141, 89, 0.12); background: var(--glass-bg-heavy); }

/* --- Search Bar ---  */
.ep-search-bar { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 2rem; border-bottom: var(--glass-border-section); background: var(--glass-bg-medium); }

.ep-search-input { flex: 1; padding: 0.625rem 1rem 0.625rem 2.5rem; background: #252015; border: 1px solid #2e2b25; border-radius: 0.5rem; color: var(--text-secondary); font-size: 0.875rem; outline: none; transition: border-color 0.2s; }
.ep-search-input:focus { border-color: rgba(177, 141, 89, 0.4); }
.ep-search-input::placeholder {
    color: #8a8580;
}

.ep-search-wrapper { position: relative; flex: 1; max-width: 24rem; }
.ep-search-wrapper .material-symbols-outlined { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); font-size: 1.125rem; color: var(--text-dim); pointer-events: none; }
.ep-search-count { font-size: 0.6875rem; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap; }

/* --- Form Elements ---  */
.ep-form-grid { display: flex; flex-direction: column; gap: 1rem; }
.ep-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ep-form-group { display: flex; flex-direction: column; gap: 0.375rem; }
.ep-form-label { font-size: 0.625rem; font-weight: 900; color: rgba(177, 141, 89, 0.8); text-transform: uppercase; letter-spacing: 0.15em; margin: 0; }

.ep-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #252015;
    border: 1px solid #2e2b25;
    border-radius: 0.5rem;
    color: #e2e0dd;
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.ep-form-input:focus { border-color: rgba(177, 141, 89, 0.4); }
.ep-form-input::placeholder {
    color: #8a8580;
}

select.ep-form-input {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

select.ep-form-input option { background: #12100d; color: #e2e0dd; }
input[type="date"].ep-form-input::-webkit-calendar-picker-indicator { filter: invert(0.7); cursor: pointer; }

/* --- Breadcrumbs ---  */
.ep-breadcrumbs { display: flex; align-items: center; gap: 0.375rem; padding-bottom: 1rem; font-size: 0.75rem; color: var(--text-dim); }
.ep-breadcrumb-link { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.ep-breadcrumb-link:hover { color: var(--gold); }
.ep-breadcrumb-sep { font-size: 0.875rem; color: var(--text-dim); }
.ep-breadcrumb-current { color: var(--text-secondary); font-weight: 700; }

/* ============================================
   Responsive
   ============================================  */
.ep-hamburger { display: none; background: none; border: none; color: #9ca3af; cursor: pointer; padding: 0.375rem; border-radius: 0.5rem; transition: color 0.2s, background 0.2s; }
.ep-hamburger:hover { color: #b18d59; background: #252015; }
.ep-sidebar-backdrop { display: none; }

@media (max-width: 1024px) {
    .ep-hamburger { display: flex; }
    .ep-sidebar { position: fixed; left: -18rem; top: 0; height: 100vh; z-index: 60; transition: left 0.3s ease; }
    .ep-sidebar-open .ep-sidebar { left: 0; }
    .ep-sidebar-open .ep-sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, 0.6); }
    .ep-header { padding: 1rem 1.25rem; }
    .ep-content { padding: 1.25rem; }
    .ep-card-header { padding: 1.25rem 1.5rem; flex-wrap: wrap; gap: 0.75rem; }
    .ep-card-body { padding: 1.25rem 1.5rem; }
    .ep-welcome { flex-direction: column; align-items: flex-start; }
    .ep-welcome-stat { align-items: flex-start; flex-direction: row; gap: 0.75rem; }
    .ep-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .ep-table { min-width: 36rem; }
    .ep-footer-inner { flex-direction: column; text-align: center; }
    .ep-footer-links { flex-wrap: wrap; justify-content: center; gap: 1rem; }
    .ep-token-header, .ep-token-body { padding-left: 1.25rem; padding-right: 1.25rem; }
    .cp-header-card { padding: 1.25rem; }
    .cp-grid { grid-template-columns: 1fr; }
    .cp-detail-grid { grid-template-columns: 1fr 1fr; }
    .ep-workflow-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .ep-header-title { font-size: 0.875rem; }
    .ep-signout-text { display: none; }
    .ep-welcome-text h2 { font-size: 1.125rem; }
    .ep-welcome-stat-value { font-size: 1.5rem; }
    .ep-form-row { grid-template-columns: 1fr; }
    .ep-modal { max-height: 90vh; margin: 0.75rem; }
    .ep-modal-viewer { max-height: 90vh; margin: 0.75rem; }
    .ep-modal-header, .ep-modal-body, .ep-modal-footer { padding-left: 1.25rem; padding-right: 1.25rem; }
    .ep-modal-footer { flex-wrap: wrap; }
    .cp-header-body { flex-direction: column; align-items: flex-start; text-align: left; }
    .cp-header-top { flex-direction: row; justify-content: space-between; align-items: center; }
    .cp-name { font-size: 1.25rem; }
    .cp-badges { justify-content: flex-start; }
    .cp-detail-grid { grid-template-columns: 1fr; }
    .ep-btn-sm .ep-btn-label { display: none; }
    .ep-btn-sm { padding: 0.5rem; }
    .cp-doc-list { display: flex; flex-direction: column; gap: 0.75rem; padding: 1rem; }
    .cp-doc-card { display: flex; align-items: center; gap: 1rem; padding: 1rem; background: #252015; border: 1px solid #2e2b25; border-radius: 0.75rem; transition: background 0.15s; }
    .cp-doc-card:hover { background: #2e2a20; }
    .cp-docs-table { display: none; }
    .cp-docs-cards { display: flex; }
    .ep-workflow-board { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .ep-content { padding: 1rem 0.75rem; }
    .ep-card-header, .ep-card-body { padding: 1rem; }
    .ep-card-header { flex-direction: column; align-items: flex-start; }
    .ep-btn-sm { padding: 0.5rem 0.75rem; font-size: 0.5625rem; }
    .cp-header-card { padding: 1rem; border-radius: 0.75rem; }
    .cp-avatar { width: 3.5rem; height: 3.5rem; }
    .cp-avatar .material-symbols-outlined { font-size: 1.75rem; }
    .ep-workflow-next { font-size: 0.75rem; }
}

/* Document Cards  */
.cp-doc-icon { width: 2.5rem; height: 2.5rem; border-radius: 0.625rem; background: #252015; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cp-doc-icon .material-symbols-outlined { font-size: 1.25rem; color: #b18d59; }
.cp-doc-info { flex: 1; min-width: 0; }
.cp-doc-name { font-size: 0.875rem; font-weight: 700; color: #fff; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-doc-meta { font-size: 0.75rem; color: #6b7280; margin: 0.25rem 0 0; display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }
.cp-docs-cards { display: none; }
.cp-docs-table { display: block; }
@media (max-width: 768px) { .cp-docs-table { display: none; } .cp-docs-cards { display: flex; } }

/* Client Profile - Tabs  */
.cp-tabs { display: flex; flex-direction: row; border-bottom: 1px solid rgba(177, 141, 89, 0.12); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.cp-tabs::-webkit-scrollbar { display: none; }
.cp-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: rgba(35, 34, 31, 0.6);
    border: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}
.cp-tab .material-symbols-outlined { font-size: 1.125rem; }
.cp-tab:hover { color: #e2e0dd; background: #1a1714; }
.cp-tab-active { color: #b18d59; border-bottom-color: #b18d59; }
.cp-tab-active .material-symbols-outlined { color: #b18d59; }
@media (max-width: 768px) { .cp-tab { padding: 0.875rem 1rem; justify-content: center; flex: 1; min-width: 0; } .cp-tab-label { display: none; } }
@media (max-width: 480px) { .cp-tab { padding: 0.75rem 0.5rem; } }

/* Progressive Column Visibility  */
@media (max-width: 1024px) {
    .ep-table-cm thead th:nth-child(2),
    .ep-table-cm tbody td:nth-child(2),
    .ep-table-dash thead th:nth-child(2),
    .ep-table-dash tbody td:nth-child(2) {
        display: none;
    }
    .ep-table-cm,
    .ep-table-dash { min-width: 0; }
}

@media (max-width: 768px) {
    .ep-table-cm thead th:nth-child(5),
    .ep-table-cm tbody td:nth-child(5),
    .ep-table-dash thead th:nth-child(5),
    .ep-table-dash tbody td:nth-child(5) {
        display: none;
    }
    .ep-table-cm thead th,
    .ep-table-cm tbody td,
    .ep-table-dash thead th,
    .ep-table-dash tbody td { padding: 0.75rem; }
}

@media (max-width: 480px) {
    .ep-table-cm thead th:nth-child(4),
    .ep-table-cm tbody td:nth-child(4),
    .ep-table-dash thead th:nth-child(4),
    .ep-table-dash tbody td:nth-child(4) {
        display: none;
    }
}

/* Collapsible Form Sections  */
.ep-form-section { border: var(--glass-border-section); border-radius: 0.75rem; margin-bottom: 1rem; overflow: hidden; }
.ep-form-section-header { display: flex; align-items: center; gap: 0.75rem; padding: 1rem 1.25rem; background: #1a1714; cursor: pointer; transition: background 0.15s; border: none; width: 100%; color: inherit; font: inherit; text-align: left; }
.ep-form-section-header:hover { background: #252015; }
.ep-form-section-icon { color: var(--gold); font-size: 1.25rem; }
.ep-form-section-title { font-size: 0.6875rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-secondary); margin: 0; flex: 1; }
.ep-form-section-chevron { color: var(--text-dim); font-size: 1.25rem; transition: transform 0.2s; }
.ep-form-section-header[aria-expanded="true"] .ep-form-section-chevron { transform: rotate(180deg); }
.ep-form-section-body { padding: 1.25rem; border-top: var(--glass-border-section); }

/* Validation  */
.ep-form-input.invalid { border-color: rgba(239, 68, 68, 0.5); }
.ep-form-input.valid { border-color: rgba(34, 197, 94, 0.3); }
.ep-field-error { font-size: 0.6875rem; color: #ef4444; margin: 0.25rem 0 0; }

/* Alerts  */
.ep-alert { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.875rem 1.25rem; border-radius: 0.75rem; font-size: 0.8125rem; font-weight: 600; }
.ep-alert .material-symbols-outlined { font-size: 1rem; flex-shrink: 0; }
.ep-alert-error { background: #261414; border: 1px solid rgba(239, 68, 68, 0.25); color: #ef4444; }
.ep-alert-success { background: #142016; border: 1px solid rgba(34, 197, 94, 0.25); color: #22c55e; }
.ep-alert-info { background: #252015; border: 1px solid rgba(177, 141, 89, 0.22); color: var(--gold); }
.ep-alert-message { flex: 1; margin: 0; }
.ep-alert-message strong { color: var(--text-primary); }

/* Skeleton  */
.ep-skeleton { background: linear-gradient(90deg, #1a1714 25%, #252015 50%, #1a1714 75%); background-size: 200% 100%; animation: ep-shimmer 1.5s ease-in-out infinite; border-radius: 0.375rem; }
.ep-skeleton-text { height: 0.875rem; width: 60%; margin-bottom: 0.5rem; }
.ep-skeleton-text-short { height: 0.875rem; width: 35%; }
.ep-skeleton-heading { height: 1.25rem; width: 40%; margin-bottom: 0.75rem; }
.ep-skeleton-row { display: flex; gap: 1rem; padding: 1rem; border-bottom: 1px solid #2e2b25; }
.ep-skeleton-cell { height: 0.875rem; border-radius: 0.25rem; }
@keyframes ep-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Intake Steps  */
.ep-intake-steps { display: flex; align-items: center; gap: 0; padding: 0 0 1.5rem; overflow-x: auto; }
.ep-intake-step-dot { width: 2rem; height: 2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.6875rem; font-weight: 800; flex-shrink: 0; transition: all 0.2s; border: 2px solid #2e2b25; background: transparent; color: var(--text-dim); }
.ep-intake-step-dot.completed { background: #142016; border-color: rgba(34, 197, 94, 0.4); color: #22c55e; }
.ep-intake-step-dot.active { background: #252015; border-color: var(--gold); color: var(--gold); }
.ep-intake-step-line { flex: 1; height: 2px; min-width: 1.5rem; background: #2e2b25; transition: background 0.3s; }
.ep-intake-step-line.completed { background: rgba(34, 197, 94, 0.3); }

/* --- Client Profile - Detail Grid ---  */
.cp-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    padding: 1.0rem;
    background: rgba(20, 18, 16, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(177, 141, 89, 0.10);
    border-radius: 0.75rem;
}

/* --- Client Profile: Application Progress ---  */
.cp-progress-card { margin-top: 1rem; }

.cp-progress-accordion {
    margin-top: 1rem;
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.cp-progress-accordion-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.cp-progress-accordion-header:hover {
    background: #252015;
}

.cp-progress-accordion-summary {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cp-progress-accordion-desc {
    color: #e2e0dd;
    font-size: 0.8125rem;
    font-weight: 600;
}

.cp-progress-chevron {
    font-size: 1.5rem;
    color: #9ca3af;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cp-progress-accordion-header[aria-expanded="true"] .cp-progress-chevron {
    transform: rotate(180deg);
}

.cp-progress-body-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.cp-progress-body-wrapper.expanded {
    max-height: 2000px;
}

.cp-tabs-unified {
    margin-top: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
}

.cp-progress-top {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.cp-progress-stage,
.cp-progress-next {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(20, 18, 16, 0.6);
    border: 1px solid rgba(177, 141, 89, 0.12);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    gap: 0.45rem;
    min-height: 5rem;
}

.cp-progress-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 800;
    color: rgba(177, 141, 89, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.cp-progress-next-text {
    display: block;
    line-height: 1.4;
    color: #e2e0dd;
    font-size: 0.875rem;
    font-weight: 600;
}

.cp-progress-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.cp-progress-metric-card {
    background: rgba(20, 18, 16, 0.6);
    border: 1px solid rgba(177, 141, 89, 0.12);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
}

.cp-progress-metric-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.cp-progress-metric-title {
    color: #d1cec7;
    font-size: 0.8125rem;
    font-weight: 700;
}

.cp-progress-metric-value {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 800;
}

.cp-progress-bar {
    width: 100%;
    height: 0.45rem;
    background: #252015;
    border: 1px solid rgba(177, 141, 89, 0.15);
    border-radius: 9999px;
    overflow: hidden;
}

.cp-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #8e6b3e 0%, #b18d59 100%);
    border-radius: 9999px;
}

.cp-progress-metric-foot {
    margin: 0.5rem 0 0 0;
    color: #9ca3af;
    font-size: 0.75rem;
}

.cp-progress-attention {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.cp-progress-list-card {
    background: rgba(20, 18, 16, 0.6);
    border: 1px solid rgba(177, 141, 89, 0.12);
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
}

.cp-progress-list-title {
    display: block;
    margin: 0 0 0.45rem 0;
    color: #b18d59;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
}

.cp-progress-list {
    margin: 0;
    padding-left: 1rem;
}

.cp-progress-list li {
    color: #e2e0dd;
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
}

.cp-progress-complete {
    margin: 0;
    color: #22c55e;
    font-size: 0.8125rem;
    font-weight: 700;
}

/* Text Visibility Overrides  */

/* Sidebar group labels: 0.4 → 0.65 opacity  */
.ep-nav-group-label {
    color: rgba(177, 141, 89, 0.65);
}

/* Form labels: 0.6 → 0.8 opacity  */
.ep-form-label {
    color: rgba(177, 141, 89, 0.8);
}

/* Table headers: 0.7 → 0.85 opacity  */
.ep-table thead th {
    color: rgba(177, 141, 89, 0.85);
}

/* Dim gray text (#6b7280 → #9ca3af) - roles, meta, empty descriptions  */
.ep-profile-role,
.cp-doc-meta,
.ep-empty-desc,
.ep-workflow-empty {
    color: #9ca3af;
}

/* Medium gray text (#9ca3af → #c9c5be) - nav items, descriptions  */
.ep-nav-item,
.ep-welcome-text p,
.ep-token-body p,
.ep-header-signout {
    color: #c9c5be;
}

/* Footer copy: lift from #6b7280  */
.ep-footer-copy {
    color: #9ca3af;
}

.ep-welcome-text h2,
.ep-header-title,
.ep-card-title,
.ep-modal-title {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.ep-sidebar-brand-sub,
.ep-welcome-stat-label,
.ep-table-badge,
.ep-nav-group-label,
.ep-footer-copy,
.ep-footer-links a,
.ep-header-signout,
.ep-profile-role {
    font-size: 0.6875rem;
}

/* A value the form shows but does not let you change. Same box as .ep-form-input so the row
   keeps its alignment, muted and without a border so it does not invite a click - used for the
   bank and client type while editing, which are fixed once the client exists. */
.ep-form-static {
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    color: #9a938a;
    font-size: 0.875rem;
    font-family: inherit;
    margin: 0;
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────────────────────────────
   Admin list pages: Tasks, Outbox, Staff & roles, Audit trail, Document rules,
   Pack catalogue, Operational settings, Service requests.

   These rules lived in Tasks.razor.css, which Blazor scopes to Tasks.razor alone -
   so the six later screens that copied its markup rendered with no styling at all:
   unstyled tables, invisible muted text, error banners in the browser default. A
   shared vocabulary belongs in the shared sheet.
   ───────────────────────────────────────────────────────────────────────── */
.tasks-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tasks-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
}

.tasks-heading .material-symbols-outlined {
    font-size: 1.25rem;
    color: var(--gold, #b18d59);
}

.tasks-count {
    min-width: 1.5rem;
    padding: 0.0625rem 0.5rem;
    border-radius: 999px;
    background: rgba(177, 141, 89, 0.18);
    border: 1px solid rgba(177, 141, 89, 0.3);
    color: var(--gold, #b18d59);
    font-size: 0.75rem;
    font-weight: 800;
    text-align: center;
}

.tasks-muted {
    margin: 0;
    color: var(--text-muted, #9ca3af);
    font-size: 0.875rem;
}

.tasks-error {
    margin: 0 0 0.75rem;
    color: #f87171;
    font-size: 0.875rem;
}

/* Wide content scrolls inside its own container so the page body never scrolls sideways.  */
.tasks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.tasks-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #9ca3af);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tasks-table td {
    padding: 0.75rem;
    color: var(--text-secondary, #e2e0dd);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: top;
}

.tasks-table tr:last-child td {
    border-bottom: none;
}

.tasks-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.tasks-sub {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-muted, #9ca3af);
}

.tasks-actions {
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .tasks-table thead {
        display: none;
    }

    .tasks-table tr {
        display: block;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .tasks-table td {
        display: block;
        padding: 0.25rem 0;
        border-bottom: none;
    }

    .tasks-actions {
        text-align: left;
        padding-top: 0.5rem;
    }
}
