@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Utilities ── */
.neo-border {
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.neo-shadow {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(0, 0, 0, 0.02);
}

.neo-shadow-sm {
    box-shadow: 0 0.5px 2px rgba(0, 0, 0, 0.03);
}

/* ── Focus Visible ── */
*:focus-visible {
    outline: 2px solid #007AFF;
    outline-offset: 2px;
}

/* ── Login Page ── */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f5f5f7;
}

.login-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    width: 100%;
    max-width: 440px;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 0.25rem;
    font-size: 1.8rem;
    font-weight: 500;
    color: #1d1d1f;
    font-family: "Orbitron", sans-serif;
    letter-spacing: 0.04em;
}

.login-card .subtitle {
    text-align: center;
    color: #007AFF;
    margin-bottom: 2rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(0, 122, 255, 0.06);
    border: none;
    border-radius: 999px;
    display: inline-block;
    padding: 0.25rem 0.75rem;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

.login-card .subtitle-wrap {
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #86868b;
    font-size: 0.8rem;
}

.form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-size: 1rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    background: rgba(255, 255, 255, 0.9);
    color: #1d1d1f;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    outline: none;
}

.form-group input:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.12);
}

.btn {
    width: 100%;
    padding: 0.85rem;
    background: #007AFF;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    box-shadow: none;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: opacity 0.2s ease;
    letter-spacing: 0.01em;
}

.btn:hover {
    opacity: 0.85;
}

.btn:active {
    opacity: 0.7;
}

.btn:disabled {
    background: #d2d2d7;
    color: #fff;
    cursor: not-allowed;
    opacity: 1;
}

.error-message {
    color: #FF3B30;
    background: rgba(255, 59, 48, 0.06);
    border: none;
    border-radius: 10px;
    padding: 0.5rem;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    display: none;
    font-weight: 500;
}

.demo-hint {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    color: #86868b;
    font-size: 0.8rem;
}

.success-message {
    color: #248A3D;
    background: rgba(52, 199, 89, 0.06);
    border: none;
    border-radius: 10px;
    padding: 0.5rem;
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    display: none;
    font-weight: 500;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    color: #86868b;
    font-size: 0.8rem;
}

.auth-link a {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* ── Layout ── */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ── Hamburger Menu ── */
.hamburger {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 200;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
}

.hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: #1d1d1f;
    border-radius: 1px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ── Sidebar Overlay ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.overlay-visible {
    opacity: 1;
}

/* ── Sidebar ── */
.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    color: #1d1d1f;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 0 1.5rem;
    margin-bottom: 0.25rem;
    font-size: 1.3rem;
    font-weight: 500;
    font-family: "Orbitron", sans-serif;
    color: #1d1d1f;
    letter-spacing: 0.03em;
}

.sidebar-label {
    padding: 0 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.65rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-nav {
    list-style: none;
    flex: 1;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.5rem;
    color: #1d1d1f;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 400;
    transition: background 0.2s ease;
    border-radius: 0 8px 8px 0;
    margin-right: 0.75rem;
}

.sidebar-nav li a:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1d1d1f;
}

.sidebar-nav li a.active {
    background: rgba(0, 122, 255, 0.08);
    color: #007AFF;
    font-weight: 500;
}

.sidebar-nav li a .nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.sidebar-user {
    padding: 1.25rem 1.5rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

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

.sidebar-user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: #1d1d1f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role {
    font-size: 0.7rem;
    color: #86868b;
    text-transform: capitalize;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: transparent;
    color: #FF3B30;
    border: 1px solid rgba(255, 59, 48, 0.4);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-logout:hover {
    background: rgba(255, 59, 48, 0.08);
    border-color: rgba(255, 59, 48, 0.6);
    color: #FF3B30;
}

.btn-logout:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.25);
    border-color: rgba(255, 59, 48, 0.7);
}

.btn-logout-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ── Main Content ── */
.main-content {
    flex: 1;
    min-width: 0;
    margin-left: 260px;
    padding: 2.5rem 3rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.7rem;
    font-weight: 500;
    color: #1d1d1f;
    font-family: "Orbitron", sans-serif;
    letter-spacing: 0.03em;
}

.page-header .date {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8rem;
    color: #86868b;
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

/* ── Filter & Search Controls ── */
.filter-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.neo-select {
    padding: 0.5rem 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff;
    color: #1d1d1f;
    cursor: pointer;
    outline: none;
    transition: border-color 0.25s ease;
}

.neo-select:focus {
    border-color: #007AFF;
}

.neo-search {
    padding: 0.5rem 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff;
    color: #1d1d1f;
    min-width: 200px;
    outline: none;
    transition: border-color 0.25s ease;
}

.neo-search:focus {
    border-color: #007AFF;
}

.col-toggle {
    position: relative;
}

.col-toggle-btn {
    padding: 0.5rem 0.85rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    background: #fff;
    color: #1d1d1f;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

.col-toggle-btn:hover {
    border-color: rgba(0, 0, 0, 0.2);
}

.col-toggle-btn[aria-expanded="true"] {
    border-color: #007AFF;
}

.col-toggle-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 0.4rem;
    min-width: 180px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.col-toggle-menu[hidden] {
    display: none;
}

.col-toggle-menu label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.55rem;
    font-size: 0.85rem;
    color: #1d1d1f;
    cursor: pointer;
    border-radius: 6px;
    user-select: none;
}

.col-toggle-menu label:hover {
    background: rgba(0, 0, 0, 0.04);
}

.col-toggle-menu input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
    accent-color: #007AFF;
}

.neo-table.hide-col-email .col-email,
.neo-table.hide-col-phone .col-phone,
.neo-table.hide-col-last-login .col-last-login,
.neo-table.hide-col-location .col-location {
    display: none;
}

/* ── KPI Cards ── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.kpi-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.75rem;
    border: none;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.kpi-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.kpi-card::before {
    content: none;
}

.kpi-card .kpi-label {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    color: #86868b;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

.kpi-card .kpi-value {
    font-size: 1.8rem;
    font-weight: 500;
    color: #1d1d1f;
    font-family: "Orbitron", sans-serif;
    letter-spacing: 0.02em;
}

.kpi-card .kpi-change {
    font-size: 0.75rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    margin-top: 0.35rem;
}

.kpi-change.positive { color: #34C759; }
.kpi-change.negative { color: #FF3B30; }

/* ── Cards (generic) ── */
.neo-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.75rem;
}

.neo-card-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.neo-card-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1d1d1f;
}

.neo-card-body {
    padding: 1.75rem;
}

/* ── Tag / Badge ── */
.neo-tag {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border: none;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

.neo-tag.green { background: rgba(52, 199, 89, 0.1); color: #248A3D; }
.neo-tag.yellow { background: rgba(255, 149, 0, 0.1); color: #C93400; }
.neo-tag.red { background: rgba(255, 59, 48, 0.1); color: #D70015; }
.neo-tag.blue { background: rgba(0, 122, 255, 0.1); color: #0040DD; }
.neo-tag.purple { background: rgba(175, 82, 222, 0.1); color: #8944AB; }

/* ── Tables ── */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.neo-table {
    width: 100%;
    border-collapse: collapse;
}

.neo-table th {
    text-align: left;
    padding: 0.75rem 1.25rem;
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #86868b;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    white-space: nowrap;
}

.neo-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.neo-table th.sortable:hover {
    color: #007AFF;
}

.neo-table th.sortable::after {
    content: " \2195";
    font-size: 0.65rem;
    opacity: 0.4;
}

.neo-table th.sort-asc::after {
    content: " \2191";
    opacity: 1;
    color: #007AFF;
}

.neo-table th.sort-desc::after {
    content: " \2193";
    opacity: 1;
    color: #007AFF;
}

.neo-table td {
    padding: 0.9rem 1.25rem;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: #1d1d1f;
}

.neo-table tr:hover td {
    background: rgba(0, 0, 0, 0.02);
}

.neo-table .mono {
    font-family: "Orbitron", sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* ── Content Grid ── */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-grid.full {
    grid-template-columns: 1fr;
}

/* ── Activity / List Items ── */
.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

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

.activity-item .action {
    color: #1d1d1f;
    font-size: 0.88rem;
    font-weight: 400;
}

.activity-item .time {
    color: #86868b;
    font-size: 0.75rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    white-space: nowrap;
    margin-left: 1rem;
}

/* ── Document List ── */
.doc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.2s ease;
}

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

.doc-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.doc-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.doc-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 122, 255, 0.06);
    border: none;
    border-radius: 10px;
    box-shadow: none;
}

.doc-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.doc-meta {
    font-size: 0.75rem;
    color: #86868b;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    margin-top: 0.2rem;
}

.btn-download {
    padding: 0.4rem 1rem;
    background: #007AFF;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: none;
    font-size: 0.75rem;
    font-weight: 500;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

.btn-download:hover {
    opacity: 0.85;
}

.btn-download:active {
    opacity: 0.7;
}

/* ── AUM Chart ── */
.chart-placeholder {
    height: 220px;
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 1rem 0 2rem;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    position: relative;
    min-width: 40px;
}

.chart-bar {
    flex: 1;
    background: #007AFF;
    border: none;
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    transition: opacity 0.2s ease;
    cursor: default;
}

.chart-bar:hover {
    opacity: 0.75;
}

.chart-bar-label {
    position: absolute;
    bottom: -1.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #86868b;
    white-space: nowrap;
}

.aum-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 1rem;
    font-size: 0.75rem;
    color: #1d1d1f;
    font-family: 'Inter', sans-serif;
}

.aum-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

/* ── Loading ── */
.loading {
    text-align: center;
    padding: 3rem;
    color: #86868b;
    font-size: 0.9rem;
}

/* ── Skeleton Loading ── */
.skeleton {
    background: linear-gradient(90deg, #e8e8ed 25%, #f0f0f5 50%, #e8e8ed 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

.skeleton-text {
    height: 0.9rem;
    border-radius: 4px;
}

.skeleton-card {
    pointer-events: none;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Error State ── */
.error-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #86868b;
    font-size: 0.95rem;
}

.error-state p {
    margin-bottom: 1.25rem;
    color: #FF3B30;
    font-weight: 500;
}

.btn-retry {
    padding: 0.55rem 1.5rem;
    background: #007AFF;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-retry:hover {
    opacity: 0.85;
}

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 2rem 1.5rem;
    color: #86868b;
    font-size: 0.88rem;
}

/* ── Toast Notifications ── */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 90vw;
    text-align: center;
}

.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-info {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
}

.toast-warning {
    background: rgba(255, 149, 0, 0.95);
    color: #fff;
}

.toast-error {
    background: rgba(255, 59, 48, 0.95);
    color: #fff;
}

/* ── Page Fade-in ── */
.page-fade {
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Admin Panel ── */
.admin-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-admin-action {
    padding: 0.3rem 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn-admin-action:hover {
    opacity: 0.8;
}

.btn-admin-action:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-disable {
    background: rgba(255, 59, 48, 0.1);
    color: #D70015;
}

.btn-enable {
    background: rgba(52, 199, 89, 0.1);
    color: #248A3D;
}

.btn-activity {
    background: rgba(0, 122, 255, 0.1);
    color: #0040DD;
}

.btn-delete {
    background: rgba(255, 59, 48, 0.15);
    color: #D70015;
    font-weight: 600;
}

.btn-close-panel {
    padding: 0.3rem 0.75rem;
    background: transparent;
    color: #86868b;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-panel:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1d1d1f;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .sidebar-overlay {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
        padding: 1.5rem 1rem;
        padding-top: 4rem;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .neo-search {
        min-width: 0;
        width: 100%;
    }

    .filter-group {
        width: 100%;
    }
}

/* ── Profile Page ── */

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.profile-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #86868b;
    font-family: 'Inter', sans-serif;
}

.profile-value {
    font-size: 1rem;
    color: #1d1d1f;
    font-family: 'Inter', sans-serif;
}

@media (max-width: 600px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Admin Profile Form ── */

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 500px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #86868b;
    font-family: 'Inter', sans-serif;
}

.neo-input {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: #1d1d1f;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.neo-input:focus {
    outline: none;
    border-color: #007AFF;
}

textarea.neo-input {
    resize: vertical;
}

.btn-primary {
    background: #007AFF;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    align-self: flex-start;
}

.btn-primary:hover {
    opacity: 0.85;
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-back {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #007AFF;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-back:hover {
    opacity: 0.7;
}

/* ── Shareholding Editor ── */

.shareholding-controls {
    margin-bottom: 1rem;
}

.fund-nav-editor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem;
    background: rgba(0, 122, 255, 0.05);
    border-radius: 8px;
}

.fund-nav-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1d1d1f;
    white-space: nowrap;
}

.shareholding-input,
.committed-input,
.contributed-input,
.withdrawn-input {
    width: 120px;
    text-align: right;
}

.shareholding-total {
    margin: 1rem 0;
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: inline-block;
}

.nav-change {
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-up {
    color: #248A3D;
}

.nav-down {
    color: #D70015;
}

.total-valid {
    color: #34C759;
    background: rgba(52, 199, 89, 0.1);
}

.total-invalid {
    color: #FF3B30;
    background: rgba(255, 59, 48, 0.1);
}

.add-class-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.holdings-shares-input {
    width: 120px;
    text-align: right;
}

/* ── Pagination ── */

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

.pagination-info {
    font-size: 0.8rem;
    color: #86868b;
    font-family: 'Inter', sans-serif;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
}

/* ── Holdings matrix (admin) ── */

.holdings-matrix-table input.holdings-shares-input {
    width: 9ch;
    text-align: right;
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
}

.holdings-matrix-table th,
.holdings-matrix-table td {
    padding: 0.6rem 0.8rem;
    white-space: nowrap;
}

.shareholding-controls {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* ── Fund AUM KPI (distinct from personal KPIs) ── */

.kpi-card-fund {
    background: rgba(0, 0, 0, 0.06);
    border: 1px dashed rgba(0, 0, 0, 0.15);
}

.kpi-card-fund .kpi-label {
    color: #86868b;
    font-style: italic;
}

.kpi-card-fund .kpi-value {
    color: #86868b;
}

/* Drag & drop file upload zone */
.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 80px;
    padding: 16px 20px;
    border: 2px dashed #4ea3ff;
    border-radius: 12px;
    background: rgba(78, 163, 255, 0.08);
    color: #1d3557;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
    flex: 1 1 260px;
    min-width: 260px;
    font-weight: 500;
}

.drop-zone:hover,
.drop-zone:focus {
    border-color: #2b7de9;
    background: rgba(78, 163, 255, 0.15);
    color: #0b1e3a;
    outline: none;
}

.drop-zone.drag-over {
    border-color: #2b7de9;
    border-style: solid;
    background: rgba(78, 163, 255, 0.22);
    color: #0b1e3a;
}

.drop-zone-label {
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.drop-zone-filename {
    font-size: 0.85rem;
    font-family: "IBM Plex Mono", monospace;
    color: #2b7de9;
    word-break: break-all;
}

/* Password change form on profile page */
.password-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 420px;
}

.password-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.password-form .form-field span {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
    letter-spacing: 0.02em;
}

.password-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Create User form on admin page */
.create-user-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px 16px;
    align-items: end;
}

.create-user-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.create-user-form .form-field span {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

.create-user-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.create-user-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#toggle-create-user {
    margin-left: auto;
}

/* Sub-account UI */

.linked-note {
    margin: 0.5rem 0 1rem 0;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid #6aa9ff;
    background: rgba(106, 169, 255, 0.08);
    color: #cdd6e7;
    font-size: 0.9rem;
    border-radius: 4px;
}

.sub-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(106, 169, 255, 0.15);
    color: #6aa9ff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

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

.linked-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.linked-list li:last-child {
    border-bottom: none;
}

.linked-list .badge {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.linked-list .badge.active {
    background: rgba(96, 209, 138, 0.18);
    color: #60d18a;
}

.linked-list .badge.inactive {
    background: rgba(255, 120, 120, 0.18);
    color: #ff8888;
}

.linked-list .mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: #98a2b3;
    font-size: 0.85rem;
}

.linked-list .last-login {
    margin-left: auto;
    margin-right: 0.5rem;
    color: #98a2b3;
    font-size: 0.8rem;
}

.linked-list button {
    margin-left: 0.5rem;
}

.empty-state {
    color: #98a2b3;
    font-style: italic;
    padding: 0.5rem 0;
}

.doc-table-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 0.75rem 0;
}

.doc-table-controls .neo-search {
    flex: 1;
    min-width: 200px;
}

.doc-meta + .sub-badge {
    margin-top: 0.2rem;
    margin-left: 0;
    display: inline-block;
}

.main-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(96, 209, 138, 0.18);
    color: #60d18a;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Live indicator (pulsing dot + Updated Ns ago) for auto-refreshing pages */
.live-stamp {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.75rem;
    font-size: 0.8rem;
    color: #98a2b3;
    vertical-align: middle;
}
.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #60d18a;
    box-shadow: 0 0 0 0 rgba(96, 209, 138, 0.7);
    animation: live-pulse 1.6s infinite;
}
@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(96, 209, 138, 0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(96, 209, 138, 0); }
    100% { box-shadow: 0 0 0 0 rgba(96, 209, 138, 0); }
}
.live-label { font-weight: 600; color: #60d18a; }
.live-sep   { color: #4b5563; }
.live-age   { font-variant-numeric: tabular-nums; }

/* Recent Trades panel — 8 cols (Time | Exchange | Symbol | Side | Order Type | Amount | Filled Price | Fees) */
.trade-row {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr 1.2fr 0.7fr 1.2fr 0.9fr 1.1fr 1fr;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
}
.trade-blur {
    filter: blur(4px);
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}
.trade-row:last-child { border-bottom: none; }
.trade-header {
    font-weight: 600;
    color: #86868b;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.trade-time { color: #86868b; font-variant-numeric: tabular-nums; }
.trade-chip {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.trade-buy  { background: rgba(52, 199, 89, 0.15);  color: #248A3D; }
.trade-sell { background: rgba(255, 59, 48, 0.12);  color: #C12B22; }
.trade-empty {
    padding: 1rem 0.8rem;
    color: #86868b;
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
}
