/* ============================================================
   Authentique — Glassmorphism Design System
   ============================================================ */

/* --- Brand Tokens --- */
:root {
    --brand-primary: #667eea;
    --brand-secondary: #764ba2;
    --brand-accent: #f093fb;
    --brand-bg: #1e143c;
    --brand-surface: #2d2b55;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 40%, var(--brand-accent) 70%, #5ee7df 100%);
    background-size: 400% 400%;
    animation: meshShift 40s ease infinite;
    min-height: 100vh;
}

@keyframes meshShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

a { color: rgba(255,255,255,0.8); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }

/* --- Typography --- */
h1 { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
h2 { font-size: 17px; font-weight: 600; margin-bottom: 20px; }

.glass-panel h2 {
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }

.page-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 28px;
}

/* --- Glass Panels --- */
.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.glass-panel + .glass-panel { margin-top: 24px; }

/* --- Stat Cards --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-card .label {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.stat-card .change {
    font-size: 12px;
    font-weight: 600;
    margin-top: 6px;
}

.change-up { color: #6ee7b7; }
.change-neutral { color: rgba(255,255,255,0.45); }

/* --- Content Grid --- */
.content-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 24px;
}

/* --- Tables --- */
.glass-table-wrap {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

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

thead th {
    text-align: left;
    padding: 16px 20px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
}

tbody td {
    padding: 14px 20px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.9);
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.06); }

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.action-link {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    margin-right: 14px;
    cursor: pointer;
}
.action-link:hover { color: #fff; }

/* --- Tab Bar --- */
.tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0;
}
.tab-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
    font-family: inherit;
    padding: 10px 18px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    margin-bottom: -1px;
}
.tab-btn:hover { color: rgba(255,255,255,0.8); }
.tab-btn.active {
    color: #fff;
    border-bottom-color: var(--brand-primary, #a78bfa);
}

/* --- Toolbar --- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.toolbar .search-input {
    flex: 1;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 60%, transparent), color-mix(in srgb, var(--brand-secondary) 60%, transparent));
    backdrop-filter: blur(10px);
}
.btn-primary:hover { background: linear-gradient(135deg, color-mix(in srgb, var(--brand-primary) 80%, transparent), color-mix(in srgb, var(--brand-secondary) 80%, transparent)); }

.btn-outline {
    background: rgba(255,255,255,0.06);
}
.btn-outline:hover { background: rgba(255,255,255,0.14); }

.btn-danger {
    background: rgba(239,68,68,0.25);
    border-color: rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.4); }

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
    border-radius: 10px;
}

/* --- Forms --- */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
}

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: #fff;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-input:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.12);
}

::placeholder { color: rgba(255,255,255,0.35); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}

.form-row .form-group { margin-bottom: 0; }

.form-group.full { grid-column: 1 / -1; }

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.5)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

select option { background: var(--brand-surface); color: #fff; }

/* --- Search Input --- */
.search-input {
    padding: 10px 16px 10px 38px;
    font-size: 13px;
    color: #fff;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='rgba(255,255,255,0.4)' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    transition: border-color 0.2s;
    min-width: 200px;
}

.search-input:focus { border-color: rgba(255,255,255,0.4); }

/* --- Badges --- */
.badge {
    display: inline-block;
    padding: 3px 11px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 16px;
    white-space: nowrap;
}

.badge-active  { background: rgba(52,211,153,0.22); color: #6ee7b7; }
.badge-locked  { background: rgba(239,68,68,0.2); color: #fca5a5; }
.badge-invited { background: rgba(129,140,248,0.2); color: #a5b4fc; }
.badge-inactive { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }
.badge-oidc    { background: rgba(99,102,241,0.25); color: #a5b4fc; }
.badge-portal  { background: rgba(251,191,36,0.2); color: #fbbf24; }
.badge-saml    { background: rgba(244,114,182,0.25); color: #f9a8d4; }
.badge-group   { background: rgba(129,140,248,0.25); color: #a5b4fc; }
.badge-user    { background: rgba(52,211,153,0.2); color: #6ee7b7; }
.badge-auth    { background: rgba(99,102,241,0.2); color: #a5b4fc; }
.badge-mfa     { background: rgba(168,85,247,0.2); color: #c4b5fd; }
.badge-system  { background: rgba(251,191,36,0.2); color: #fbbf24; }
.badge-security { background: rgba(239,68,68,0.2); color: #fca5a5; }
.badge-admin   { background: rgba(244,114,182,0.2); color: #f9a8d4; }
.badge-policy  { background: rgba(168,85,247,0.25); color: #c4b5fd; }

/* --- Avatars --- */
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa, #f472b6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.avatar-lg { width: 72px; height: 72px; font-size: 26px; font-weight: 700; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }

.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid rgba(0,0,0,0.2); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* --- App Cards --- */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.app-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background 0.2s;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    display: block;
}

.app-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.app-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
}

.icon-argo       { background: linear-gradient(135deg, #ef8e38, #f6c343); }
.icon-finance    { background: linear-gradient(135deg, #34d399, #10b981); }
.icon-grafana    { background: linear-gradient(135deg, #f97316, #f59e0b); }
.icon-longhorn   { background: linear-gradient(135deg, #3b82f6, #6366f1); }
.icon-mailcow    { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.icon-mongodb    { background: linear-gradient(135deg, #22c55e, #16a34a); }
.icon-proxmox    { background: linear-gradient(135deg, #e97520, #d35400); }
.icon-rabbitmq   { background: linear-gradient(135deg, #f97316, #ea580c); }
.icon-storage    { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.icon-timesheets { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.icon-webmail    { background: linear-gradient(135deg, #f472b6, #ec4899); }
.icon-default    { background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary)); }

.app-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.app-admin-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background 0.2s;
}

.app-admin-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

.app-admin-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.app-admin-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.app-admin-header .app-title { font-size: 16px; font-weight: 600; }
.app-admin-header .app-slug { font-size: 12px; color: rgba(255,255,255,0.45); }

.app-meta { margin-bottom: 16px; }
.app-meta-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.app-meta-row:last-child { border-bottom: none; }
.app-meta-row .meta-label { color: rgba(255,255,255,0.55); }
.app-meta-row .meta-value { font-weight: 500; }

.app-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.app-actions a {
    font-size: 13px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.app-actions a:hover { color: #fff; }

/* --- Group Panels --- */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.group-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background 0.2s;
}

.group-panel:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

/* --- Activity Feed --- */
.feed-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.feed-item:last-child { border-bottom: none; padding-bottom: 0; }

.feed-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.dot-blue  { background: #818cf8; }
.dot-green { background: #6ee7b7; }
.dot-amber { background: #fbbf24; }
.dot-pink  { background: #f472b6; }
.dot-red   { background: #f87171; }

.feed-text { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.8); }
.feed-time { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 3px; }

/* --- Quick Stats List --- */
.quick-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 14px;
}
.quick-row:last-child { border-bottom: none; }
.quick-row .qlabel { color: rgba(255,255,255,0.7); }
.quick-row .qvalue { font-weight: 600; }

/* --- Toggle Switch --- */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle .slider {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.15); border-radius: 24px;
    cursor: pointer; transition: background 0.3s;
}
.toggle .slider::before {
    content: ''; position: absolute; width: 18px; height: 18px;
    left: 3px; bottom: 3px; background: #fff;
    border-radius: 50%; transition: transform 0.3s;
}
.toggle input:checked + .slider { background: rgba(99,102,241,0.6); }
.toggle input:checked + .slider::before { transform: translateX(20px); }

/* --- Pagination --- */
.pagination {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 13px; color: rgba(255,255,255,0.5);
}
.pagination-btns { display: flex; gap: 6px; }
.pagination-btns button {
    padding: 6px 14px; font-size: 12px; font-weight: 600; color: #fff;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px; cursor: pointer; transition: background 0.2s;
}
.pagination-btns button:hover { background: rgba(255,255,255,0.16); }
.pagination-btns button.active { background: rgba(255,255,255,0.2); }

/* --- Summary Cards --- */
.summary-cards {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 16px; margin-bottom: 24px;
}

/* --- Settings Row --- */
.setting-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 14px; font-weight: 500; }
.setting-desc { font-size: 12px; color: rgba(255,255,255,0.45); margin-top: 3px; }

/* --- Page Header --- */
.page-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 28px;
}
.page-header-info h1 { margin-bottom: 4px; }

/* --- Filter Dropdowns --- */
.filter-select { padding: 10px 36px 10px 14px; font-size: 13px; min-width: 140px; }

/* --- Code/Mono --- */
.mono {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 12px; color: rgba(255,255,255,0.7);
}

/* --- Top Nav (User Layout) --- */
.topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    height: 64px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.topnav-brand { font-size: 20px; font-weight: 700; color: #fff; margin-right: 32px; }

.topnav-links { display: flex; gap: 28px; flex: 1; }

.topnav-links a {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.topnav-links a:hover { color: #fff; }
.topnav-links a.active { color: #fff; }

.topnav-user {
    position: relative;
    display: flex;
    align-items: center;
}

.user-menu {
    position: absolute;
    top: 48px;
    right: 0;
    width: 220px;
    background: color-mix(in srgb, var(--brand-bg) 85%, transparent);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    padding: 8px 0;
    z-index: 200;
}

.user-menu-header { padding: 12px 16px; }
.user-menu-name { font-size: 14px; font-weight: 600; color: #fff; }
.user-menu-email { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 2px; }
.user-menu-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 4px 0; }

.user-menu-item {
    display: block;
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.user-menu-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.user-menu-logout { color: #fca5a5; }
.user-menu-logout:hover { background: rgba(239,68,68,0.15); color: #fca5a5; }

.menu-backdrop { position: fixed; inset: 0; z-index: 99; }

.user-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px;
    position: relative;
    z-index: 1;
}

/* --- Admin Sidebar --- */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    z-index: 100;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    border-right: 1px solid rgba(255,255,255,0.12);
    display: flex;
    flex-direction: column;
    padding: 28px 0 0 0;
}

.sidebar-brand {
    padding: 0 24px;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.sidebar-sub {
    padding: 0 24px;
    margin-bottom: 32px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    letter-spacing: 1px;
}

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

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-nav li a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-left-color: rgba(255,255,255,0.6);
}

.sidebar-nav .icon {
    width: 20px;
    text-align: center;
    font-size: 15px;
    opacity: 0.8;
}

.sidebar-footer {
    padding: 14px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #a78bfa, #f472b6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-user-info { font-size: 13px; }
.sidebar-user-name { font-weight: 600; }
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,0.5); }

.admin-main {
    margin-left: 260px;
    flex: 1;
    padding: 40px;
    position: relative;
    z-index: 1;
}

/* --- Modals --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 500;
}

.modal-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 520px;
    background: color-mix(in srgb, var(--brand-bg) 92%, transparent);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 32px;
    z-index: 501;
    box-shadow: 0 16px 64px rgba(0, 0, 0, 0.4);
}

.modal-panel h2 {
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* --- Blazor Validation --- */
.valid.modified:not([type=checkbox]) { outline: 1px solid #6ee7b7; }
.invalid { outline: 1px solid #f87171; }
.validation-message { color: #fca5a5; font-size: 12px; margin-top: 4px; }

#blazor-error-ui {
    display: none; position: fixed; bottom: 0; width: 100%; z-index: 1000;
    padding: 12px; background: rgba(239,68,68,0.9); color: #fff; text-align: center;
}
