/* ============================================================
   Academic Editorial Design System — "Digital Dean"
   ============================================================ */

:root {
    --ae-primary: #002b50;
    --ae-primary-container: #004275;
    --ae-on-primary: #ffffff;
    --ae-on-primary-container: #6cafff;
    --ae-primary-fixed: #d3e4ff;
    --ae-primary-fixed-dim: #a2c9ff;
    --ae-on-primary-fixed: #001c38;

    --ae-secondary: #4755b6;
    --ae-secondary-container: #8a99fe;
    --ae-secondary-fixed: #dfe0ff;
    --ae-on-secondary: #ffffff;
    --ae-on-secondary-fixed: #000d5f;

    --ae-tertiary: #002e3e;
    --ae-tertiary-container: #00465c;
    --ae-tertiary-fixed: #bee9ff;
    --ae-tertiary-fixed-dim: #7ed1f7;
    --ae-on-tertiary: #ffffff;
    --ae-on-tertiary-fixed: #001f2a;

    --ae-background: #faf8ff;
    --ae-surface: #faf8ff;
    --ae-surface-dim: #d6d9f0;
    --ae-surface-lowest: #ffffff;
    --ae-surface-low: #f3f2ff;
    --ae-surface-mid: #ebedff;
    --ae-surface-high: #e4e7fe;
    --ae-surface-highest: #dee1f8;

    --ae-on-surface: #171b2b;
    --ae-on-surface-var: #444651;
    --ae-outline: #757682;
    --ae-outline-var: #c5c5d3;

    --ae-error: #ba1a1a;
    --ae-error-container: #ffdad6;
    --ae-on-error: #ffffff;
    --ae-on-error-container: #93000a;

    --ae-sidebar-w: 272px;
    --ae-topbar-h: 64px;

    --r-sm: 0.5rem;
    --r-md: 0.75rem;
    --r-lg: 1rem;
    --r-xl: 1.5rem;
    --r-2xl: 2rem;
    --r-full: 9999px;
}

/* ── Base ─────────────────────────────── */
.ae-root {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--ae-surface);
    color: var(--ae-on-surface);
    min-height: 100vh;
    margin: 0;
}

.ae-root * { box-sizing: border-box; }

/* Neutralize MudBlazor global overrides inside ae-root */
.ae-root a { color: inherit; text-decoration: none; }
.ae-root button { font-family: inherit; }
.ae-root input, .ae-root select, .ae-root textarea { font-family: inherit; }

/* Blazor/MudBlazor body reset when ae-root is present */
body:has(.ae-root) {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
    background: var(--ae-surface) !important;
}

/* ae-root must cover full viewport */
.ae-root.ae-wrap {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.ae-root .material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    user-select: none;
    line-height: 1;
}

/* ── Layout ───────────────────────────── */
.ae-wrap { display: flex; min-height: 100vh; }

.ae-sidebar {
    position: fixed;
    left: 0; top: 0;
    width: var(--ae-sidebar-w);
    height: 100vh;
    background-color: var(--ae-surface-low);
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0;
    z-index: 50;
    overflow-y: auto;
}

.ae-sidebar::-webkit-scrollbar { width: 4px; }
.ae-sidebar::-webkit-scrollbar-thumb { background: var(--ae-surface-high); border-radius: 10px; }

.ae-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.25rem;
    margin-bottom: 1.75rem;
}

.ae-logo-icon {
    width: 2.5rem; height: 2.5rem;
    background: var(--ae-primary);
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.ae-logo-text h2 {
    font-family: 'Manrope', sans-serif;
    font-weight: 900;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ae-primary);
    margin: 0; line-height: 1.2;
}

.ae-logo-text p {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ae-outline);
    margin: 0;
    font-weight: 600;
}

.ae-nav { flex: 1; padding: 0 0.5rem; display: flex; flex-direction: column; gap: 0.125rem; }

.ae-nav-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--r-md);
    font-size: 0.875rem; font-weight: 600;
    text-decoration: none;
    color: #64748b;
    transition: all 0.2s ease;
    border: none; background: transparent;
    width: 100%; text-align: left; cursor: pointer;
}

.ae-nav-link:hover { background-color: var(--ae-surface-mid); transform: translateX(2px); color: var(--ae-primary); }
.ae-nav-link.active { background-color: var(--ae-primary-fixed); color: var(--ae-primary); }
.ae-nav-link .material-symbols-outlined { font-size: 1.25rem; flex-shrink: 0; }

.ae-sidebar-bottom { padding: 0 0.5rem; margin-top: auto; }

.ae-sidebar-divider { height: 1px; background: rgba(197, 197, 211, 0.2); margin: 0.5rem 0.5rem 0.375rem; }

.ae-nav-link-logout { color: var(--ae-error) !important; }
.ae-nav-link-logout:hover { background-color: rgba(186, 26, 26, 0.08) !important; }

.ae-main { margin-left: var(--ae-sidebar-w); flex: 1; min-height: 100vh; }

/* ── Topbar ───────────────────────────── */
.ae-topbar {
    position: sticky; top: 0; z-index: 40;
    background: rgba(250, 248, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem;
    height: var(--ae-topbar-h);
    border-bottom: 1px solid rgba(197, 197, 211, 0.15);
}

.ae-topbar-left { display: flex; align-items: center; gap: 1.5rem; }

.ae-topbar-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.125rem; font-weight: 800;
    color: var(--ae-primary);
    letter-spacing: -0.025em;
    white-space: nowrap;
}

.ae-search-wrap { position: relative; display: flex; align-items: center; }

.ae-search-wrap .si { position: absolute; left: 0.75rem; font-size: 1rem; color: var(--ae-outline); pointer-events: none; }

.ae-search-wrap input {
    background: var(--ae-surface-mid);
    border: none; outline: none;
    border-radius: var(--r-full);
    padding: 0.45rem 1rem 0.45rem 2.4rem;
    font-size: 0.8125rem;
    font-family: 'Inter', sans-serif;
    color: var(--ae-on-surface);
    width: 14rem;
    transition: all 0.2s;
}

.ae-search-wrap input:focus { background: var(--ae-surface-high); width: 18rem; }

.ae-topbar-right { display: flex; align-items: center; gap: 0.375rem; }

.ae-icon-btn {
    width: 2.25rem; height: 2.25rem;
    border-radius: var(--r-full);
    border: none; background: transparent;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #64748b;
    transition: all 0.15s;
}
.ae-icon-btn:hover { background: var(--ae-surface-mid); color: var(--ae-primary); }

.ae-avatar {
    width: 2.25rem; height: 2.25rem;
    border-radius: var(--r-full);
    background: var(--ae-primary-fixed);
    color: var(--ae-primary);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Manrope', sans-serif;
    font-weight: 800; font-size: 0.6875rem;
    border: 2px solid var(--ae-primary-fixed-dim);
    margin-left: 0.25rem;
}

/* ── Canvas ───────────────────────────── */
.ae-canvas { padding: 2rem; }

/* ── Page Header ──────────────────────── */
.ae-page-header { margin-bottom: 2rem; }

.ae-tag {
    display: inline-block;
    background: var(--ae-tertiary-fixed);
    color: var(--ae-on-tertiary-fixed);
    font-size: 0.625rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.15em;
    padding: 0.2rem 0.75rem;
    border-radius: var(--r-full);
    margin-bottom: 0.625rem;
}

.ae-page-title {
    font-family: 'Manrope', sans-serif;
    font-size: 2rem; font-weight: 800;
    color: var(--ae-on-surface);
    letter-spacing: -0.025em;
    margin: 0; line-height: 1.2;
}

.ae-page-sub {
    font-size: 0.9375rem;
    color: var(--ae-on-surface-var);
    margin-top: 0.375rem; line-height: 1.5;
}

/* ── Cards ────────────────────────────── */
.ae-card {
    background: var(--ae-surface-lowest);
    border-radius: var(--r-xl);
    padding: 1.5rem;
    border: 1px solid rgba(197, 197, 211, 0.12);
}

.ae-card-section {
    background: var(--ae-surface-low);
    border-radius: var(--r-2xl);
    padding: 1.75rem;
}

/* Stat card */
.ae-stat-card {
    background: var(--ae-surface-lowest);
    border-radius: var(--r-2xl);
    padding: 1.5rem;
    border: 1px solid rgba(197, 197, 211, 0.1);
    display: flex; flex-direction: column; justify-content: space-between;
    transition: all 0.35s ease;
    min-height: 9rem;
}
.ae-stat-card:hover { box-shadow: 0 16px 36px rgba(0, 43, 80, 0.06); transform: translateY(-2px); }

.ae-stat-icon {
    width: 3rem; height: 3rem;
    border-radius: 1rem;
    display: flex; align-items: center; justify-content: center;
}

.ae-stat-val {
    font-family: 'Manrope', sans-serif;
    font-size: 2rem; font-weight: 900;
    color: var(--ae-primary); line-height: 1;
}

.ae-stat-lbl { font-size: 0.875rem; font-weight: 600; color: #64748b; margin-top: 0.2rem; }

.ae-badge { font-size: 0.6875rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 0.5rem; }
.ae-badge-green { background: #f0fdf4; color: #15803d; }
.ae-badge-neutral { background: #f8fafc; color: #64748b; }
.ae-badge-primary { background: var(--ae-primary-fixed); color: var(--ae-primary); }

/* Dark bento card */
.ae-bento-primary {
    background: var(--ae-primary);
    border-radius: var(--r-2xl);
    padding: 1.5rem;
    color: white;
    position: relative; overflow: hidden;
}

.ae-bento-secondary {
    background: linear-gradient(135deg, var(--ae-secondary), var(--ae-secondary-container));
    border-radius: var(--r-2xl);
    padding: 1.5rem;
    color: white;
    position: relative; overflow: hidden;
}

/* ── Buttons ──────────────────────────── */
.ae-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
    padding: 0.7rem 1.375rem;
    border-radius: var(--r-md);
    font-size: 0.8125rem; font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer; border: none; text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}
.ae-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.ae-btn-primary {
    background: linear-gradient(135deg, var(--ae-primary), var(--ae-primary-container));
    color: white;
    box-shadow: 0 4px 14px rgba(0, 43, 80, 0.22);
}
.ae-btn-primary:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(0, 43, 80, 0.32); transform: scale(1.02); }
.ae-btn-primary:active:not(:disabled) { transform: scale(0.97); }

.ae-btn-ghost {
    background: transparent; color: var(--ae-primary);
    border: 1px solid rgba(197, 197, 211, 0.5);
}
.ae-btn-ghost:hover:not(:disabled) { background: var(--ae-surface-low); }

.ae-btn-error { background: rgba(186, 26, 26, 0.09); color: var(--ae-error); }
.ae-btn-error:hover:not(:disabled) { background: rgba(186, 26, 26, 0.17); }

.ae-btn-tertiary {
    background: transparent; color: var(--ae-primary);
    font-size: 0.8125rem; padding: 0.4rem 0;
}
.ae-btn-tertiary:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 3px; }

.ae-btn-sm { padding: 0.45rem 0.875rem; font-size: 0.75rem; border-radius: var(--r-sm); }
.ae-btn-lg { padding: 0.875rem 2rem; font-size: 0.9375rem; border-radius: var(--r-lg); }
.ae-btn-full { width: 100%; }

/* ── Form ─────────────────────────────── */
.ae-form-group { display: flex; flex-direction: column; gap: 0.375rem; }

.ae-lbl {
    font-size: 0.625rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--ae-outline); padding: 0 0.125rem;
}

.ae-input, .ae-select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--ae-surface-low);
    border: none; outline: none;
    border-radius: var(--r-md);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--ae-on-surface);
    font-weight: 500;
    transition: all 0.18s;
    appearance: none; -webkit-appearance: none;
}

.ae-input:focus, .ae-select:focus {
    background: var(--ae-surface-mid);
    box-shadow: 0 0 0 2px var(--ae-secondary-container);
}

.ae-input::placeholder { color: rgba(117, 118, 130, 0.55); }

/* ── Table ────────────────────────────── */
.ae-tbl-wrap {
    background: var(--ae-surface-lowest);
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid rgba(197, 197, 211, 0.1);
}

.ae-tbl-head {
    background: var(--ae-surface-high);
    padding: 0.875rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
}

.ae-tbl {
    width: 100%; border-collapse: collapse; text-align: left;
}

.ae-tbl thead { background: var(--ae-surface-low); }

.ae-tbl thead th {
    padding: 0.875rem 1.5rem;
    font-size: 0.625rem; font-weight: 900;
    text-transform: uppercase; letter-spacing: 0.15em;
    color: var(--ae-outline);
}

.ae-tbl tbody tr { transition: background 0.13s; cursor: pointer; }
.ae-tbl tbody tr:nth-child(even) { background: rgba(243, 242, 255, 0.45); }
.ae-tbl tbody tr:hover { background: var(--ae-surface-low) !important; }
.ae-tbl tbody tr.ae-selected { background: var(--ae-primary-fixed) !important; }

.ae-tbl tbody td { padding: 0.875rem 1.5rem; font-size: 0.875rem; }

.ae-tbl-footer {
    background: var(--ae-surface-low);
    padding: 0.625rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.75rem; color: var(--ae-outline); font-weight: 600;
}

/* ── Chips ────────────────────────────── */
.ae-chip {
    display: inline-flex; align-items: center;
    padding: 0.15rem 0.6rem;
    border-radius: var(--r-full);
    font-size: 0.6rem; font-weight: 900;
    text-transform: uppercase; letter-spacing: 0.1em;
}
.ae-chip-ok { background: var(--ae-tertiary-fixed); color: var(--ae-on-tertiary-fixed); }
.ae-chip-warn { background: #fef3c7; color: #92400e; }
.ae-chip-err { background: var(--ae-error-container); color: var(--ae-on-error-container); }
.ae-chip-off { background: var(--ae-surface-highest); color: var(--ae-outline); }
.ae-chip-blue { background: var(--ae-primary-fixed); color: var(--ae-primary); }

/* ── Tabs ─────────────────────────────── */
.ae-tabs {
    display: flex;
    background: var(--ae-surface-low);
    border-radius: var(--r-full);
    padding: 0.25rem; gap: 0.25rem;
}

.ae-tab {
    flex: 1; padding: 0.5rem 1.125rem;
    border-radius: var(--r-full);
    border: none; background: transparent;
    font-size: 0.8125rem; font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer; transition: all 0.18s;
    color: #64748b; white-space: nowrap;
}
.ae-tab.active {
    background: var(--ae-surface-lowest);
    color: var(--ae-primary); font-weight: 700;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.ae-tab:hover:not(.active) { color: var(--ae-primary); }

/* ── List Items ───────────────────────── */
.ae-list-item {
    display: flex; align-items: center; gap: 0.875rem;
    padding: 0.875rem 1rem;
    background: var(--ae-surface-lowest);
    border-radius: var(--r-lg);
    cursor: pointer; transition: all 0.14s;
    border: 2px solid transparent;
}
.ae-list-item:hover { background: var(--ae-surface-high); }
.ae-list-item.ae-selected { border-color: var(--ae-secondary-container); background: rgba(211, 228, 255, 0.25); }

/* ── Confirm Modal ────────────────────── */
.ae-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.42);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px);
}

.ae-modal {
    background: var(--ae-surface-lowest);
    border-radius: var(--r-2xl);
    padding: 2rem;
    max-width: 26rem; width: 90%;
    box-shadow: 0 40px 80px rgba(0, 43, 80, 0.18);
}

.ae-modal-title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.25rem; font-weight: 800;
    color: var(--ae-on-surface); margin: 0 0 0.625rem;
}

.ae-modal-body {
    color: var(--ae-on-surface-var);
    font-size: 0.9375rem; margin-bottom: 1.5rem; line-height: 1.6;
}

.ae-modal-footer { display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ── Spinner ──────────────────────────── */
.ae-spin {
    width: 1.125rem; height: 1.125rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: ae-rotate 0.55s linear infinite;
    display: inline-block;
}
.ae-spin-dark { border-color: rgba(0,43,80,0.18); border-top-color: var(--ae-primary); }
@keyframes ae-rotate { to { transform: rotate(360deg); } }

/* ── Initials Avatar ──────────────────── */
.ae-initials {
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-full);
    font-weight: 800; font-family: 'Manrope', sans-serif;
    font-size: 0.6875rem; flex-shrink: 0;
}

/* ── Quick actions ────────────────────── */
.ae-quick-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 1rem; gap: 0.375rem;
    background: var(--ae-surface-lowest);
    border-radius: var(--r-lg);
    border: none; cursor: pointer; transition: all 0.18s;
}
.ae-quick-btn:hover { background: var(--ae-primary); }
.ae-quick-btn .material-symbols-outlined { font-size: 1.375rem; color: var(--ae-primary); }
.ae-quick-btn:hover .material-symbols-outlined { color: white; }
.ae-quick-btn span.ql { font-size: 0.625rem; font-weight: 700; color: #64748b; }
.ae-quick-btn:hover span.ql { color: white; }

/* ── Login Page ───────────────────────── */
.ae-login-root {
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top right, #004275, #002b50);
    display: flex; overflow: hidden;
}

.ae-login-deco {
    width: 50%;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 4rem; position: relative; overflow: hidden;
}

.ae-deco-blob { position: absolute; border-radius: 50%; filter: blur(3rem); pointer-events: none; }

.ae-login-panel {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 2rem 3rem; position: relative;
}

.ae-glass {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 2rem;
    padding: 2.5rem;
    width: 100%; max-width: 28rem;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 32px 64px rgba(0,0,0,0.14);
}

.ae-role-selector { display: flex; gap: 0.375rem; overflow-x: auto; padding-bottom: 0.25rem; flex-wrap: nowrap; }
.ae-role-selector::-webkit-scrollbar { display: none; }

.ae-role-btn {
    flex-shrink: 0; padding: 0.4rem 1rem;
    background: var(--ae-surface-mid);
    color: var(--ae-primary); font-size: 0.75rem; font-weight: 700;
    border-radius: var(--r-full); border: none; cursor: pointer;
    transition: all 0.15s; font-family: 'Inter', sans-serif;
}
.ae-role-btn.active { background: var(--ae-primary); color: white; }
.ae-role-btn:hover:not(.active) { background: var(--ae-surface-high); }

.ae-input-icon-wrap { position: relative; }
.ae-input-icon-wrap .ae-input { padding-left: 3rem; }
.ae-input-icon-wrap .ae-fi { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--ae-outline); pointer-events: none; }
.ae-input-icon-wrap .ae-fe { position: absolute; right: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--ae-outline); cursor: pointer; background: transparent; border: none; }

/* ── Grid helpers ─────────────────────── */
.ae-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.ae-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.ae-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1200px) { .ae-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
    .ae-grid-3 { grid-template-columns: 1fr 1fr; }
    .ae-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .ae-grid-2, .ae-grid-3, .ae-grid-4 { grid-template-columns: 1fr; }
    .ae-login-deco { display: none; }
    .ae-login-panel { padding: 2rem 1.25rem; }
}

/* ── Connections layout ───────────────── */
.ae-conn-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) { .ae-conn-grid { grid-template-columns: 1fr; } }

.ae-class-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1100px) { .ae-class-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .ae-class-grid { grid-template-columns: 1fr; } }

/* ── Misc ─────────────────────────────── */
.ae-divider { height: 1px; background: rgba(197,197,211,0.2); margin: 1rem 0; }
.ae-scroll { overflow-y: auto; }
.ae-scroll::-webkit-scrollbar { width: 4px; }
.ae-scroll::-webkit-scrollbar-thumb { background: var(--ae-surface-highest); border-radius: 10px; }

.ae-empty { text-align: center; padding: 2rem; color: var(--ae-outline); font-size: 0.875rem; }

.ae-loading-row { display: flex; align-items: center; justify-content: center; padding: 2rem; gap: 0.5rem; color: var(--ae-outline); }

/* ── Table (Academic Ledger) ──────────── */
.ae-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.ae-table thead th {
    padding: 0.625rem 0.875rem;
    text-align: left;
    font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ae-outline);
    border-bottom: 2px solid var(--ae-surface-mid);
    background: var(--ae-surface-container);
}
.ae-table tbody td {
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid var(--ae-surface-mid);
    color: var(--ae-on-surface);
    vertical-align: middle;
}
.ae-table tbody tr:last-child td { border-bottom: none; }
.ae-table tbody tr:hover td { background: var(--ae-surface-mid); }
.ae-table tfoot td {
    padding: 0.625rem 0.875rem;
    border-top: 2px solid var(--ae-surface-mid);
    font-size: 0.8125rem;
    color: var(--ae-on-surface-var);
}

/* ── Danger Button ────────────────────── */
.ae-btn-danger {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
    padding: 0.625rem 1.25rem;
    background: #f44336; color: white;
    font-weight: 700; font-size: 0.875rem; font-family: 'Inter', sans-serif;
    border-radius: var(--r-md); border: none; cursor: pointer;
    transition: background 0.15s, transform 0.1s, opacity 0.15s;
}
.ae-btn-danger:hover:not(:disabled) { background: #d32f2f; }
.ae-btn-danger:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Icon Delete Button ───────────────── */
.ae-btn-icon-del {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem;
    background: transparent; border: none; cursor: pointer;
    border-radius: var(--r-sm);
    color: #f44336; transition: background 0.15s;
}
.ae-btn-icon-del:hover { background: rgba(244,67,54,0.1); }
.ae-btn-icon-del .material-symbols-outlined { font-size: 1.125rem; }
