/**
 * Jung Claude Admin - Stylesheet Principal
 * Tema escuro com cores purple/pink inspirado no Jung Lab
 */

/* ========================================
   BASE STYLES
   ======================================== */

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

body {
    font-family: 'Inter', sans-serif;
    background: #000000 !important;
    color: #e2e8f0 !important;
    min-height: 100vh;
}

/* HTMX Indicators */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    opacity: 1;
}

/* ========================================
   BACKGROUND COLORS
   ======================================== */

.bg-white {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.bg-gray-50 {
    background: rgba(15, 23, 42, 0.6) !important;
}

.bg-gray-100 {
    background: rgba(30, 41, 59, 0.6) !important;
    color: #e2e8f0 !important;
}

.bg-indigo-50 {
    background: rgba(139, 92, 246, 0.15) !important;
}

.bg-indigo-100 {
    background: rgba(139, 92, 246, 0.2) !important;
}

.bg-green-50 {
    background: rgba(34, 197, 94, 0.15) !important;
}

.bg-green-100 {
    background: rgba(34, 197, 94, 0.2) !important;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.bg-yellow-50 {
    background: rgba(251, 191, 36, 0.15) !important;
}

.bg-yellow-100 {
    background: rgba(251, 191, 36, 0.2) !important;
    border: 1px solid rgba(251, 191, 36, 0.4);
}

.bg-blue-50 {
    background: rgba(59, 130, 246, 0.15) !important;
}

.bg-red-50 {
    background: rgba(239, 68, 68, 0.15) !important;
}

.bg-red-100 {
    background: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

/* ========================================
   TEXT COLORS - Garantir contraste
   ======================================== */

.text-white {
    color: #ffffff !important;
}

.text-gray-900,
.text-gray-800,
.text-gray-700 {
    color: #f1f5f9 !important;
}

.text-gray-600 {
    color: #cbd5e1 !important;
}

.text-gray-500 {
    color: #94a3b8 !important;
}

.text-indigo-600,
.text-indigo-700 {
    color: #c4b5fd !important;
}

.text-indigo-900 {
    color: #ddd6fe !important;
}

.text-green-600,
.text-green-700 {
    color: #4ade80 !important;
}

.text-green-800,
.text-green-900 {
    color: #86efac !important;
}

.text-yellow-700 {
    color: #fbbf24 !important;
}

.text-yellow-800,
.text-yellow-900 {
    color: #fcd34d !important;
}

.text-blue-700 {
    color: #60a5fa !important;
}

.text-red-700 {
    color: #f87171 !important;
}

.text-red-800 {
    color: #fca5a5 !important;
}

.text-purple-600 {
    color: #c084fc !important;
}

.text-purple-900 {
    color: #d8b4fe !important;
}

/* ========================================
   BORDER COLORS
   ======================================== */

.border-gray-200,
.border-gray-300 {
    border-color: rgba(148, 163, 184, 0.2) !important;
}

.divide-gray-200 > :not([hidden]) ~ :not([hidden]),
.divide-gray-300 > :not([hidden]) ~ :not([hidden]) {
    border-color: rgba(148, 163, 184, 0.2) !important;
}

/* ========================================
   HOVER STATES
   ======================================== */

.hover\:bg-gray-50:hover {
    background: rgba(51, 65, 85, 0.4) !important;
}

.hover\:text-gray-700:hover {
    color: #e2e8f0 !important;
}

.hover\:border-gray-300:hover {
    border-color: rgba(139, 92, 246, 0.3) !important;
}

/* ========================================
   LINKS
   ======================================== */

a {
    transition: all 0.3s ease;
}

a:hover {
    transform: translateX(2px);
}

/* ========================================
   TABLES
   ======================================== */

table {
    border-collapse: separate;
    border-spacing: 0;
}

thead {
    background: rgba(15, 23, 42, 0.9) !important;
}

thead th {
    color: #f1f5f9 !important;
}

tbody {
    background: rgba(15, 23, 42, 0.6) !important;
}

tbody td {
    color: #e2e8f0 !important;
}

tbody tr:hover {
    background: rgba(139, 92, 246, 0.2) !important;
}

/* ========================================
   CARDS & CONTAINERS
   ======================================== */

.rounded-lg,
.rounded-xl {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.card {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 10px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #f1f5f9 !important;
}

/* ========================================
   STATS GRID (Dashboard)
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(139, 92, 246, 0.4);
    border-color: rgba(139, 92, 246, 0.4);
}

.stat-label {
    color: #a78bfa !important;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.stat-value {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #c4b5fd 0%, #ddd6fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.3;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 10;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd !important;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
}

.bg-indigo-600 {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
}

.bg-indigo-600:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%) !important;
}

/* ========================================
   NAVIGATION
   ======================================== */

nav.bg-white {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2) !important;
}

nav a.border-indigo-500 {
    border-bottom-color: #8b5cf6 !important;
    color: #c4b5fd !important;
}

nav a.border-transparent:hover {
    color: #ddd6fe !important;
}

/* ========================================
   FOOTER
   ======================================== */

footer.bg-white {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(139, 92, 246, 0.2) !important;
}

/* ========================================
   GRADIENT TEXT
   ======================================== */

.gradient-text {
    background: linear-gradient(135deg, #c4b5fd 0%, #ddd6fe 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   SECTIONS & CONTAINERS
   ======================================== */

.section {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    font-size: 1.4em;
    color: #333;
    margin: 0;
}

.section-header .btn {
    pointer-events: auto;
    user-select: none;
}

.container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 40px;
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

/* ========================================
   NAVIGATION STYLES
   ======================================== */

.nav {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    padding: 15px 40px;
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s;
}

.nav a:hover {
    background: #f0f0f0;
    color: #667eea;
}

.nav a.active {
    background: #667eea;
    color: white;
}

.logout-btn {
    margin-left: auto;
    background: #dc3545;
    color: white !important;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #c82333 !important;
}

/* ========================================
   HEADER STYLES
   ======================================== */

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.8em;
    font-weight: 600;
    margin: 0;
}

.header-info {
    text-align: right;
}

.user-name {
    font-size: 1.1em;
    margin-bottom: 5px;
}

.role-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    display: inline-block;
}

/* ========================================
   TABLE STYLES
   ======================================== */

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

th {
    background: transparent;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #cbd5e1;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
}

tr:hover {
    background: #f8f9fa;
}

.actions {
    white-space: nowrap;
}

.btn-action {
    display: inline-block;
    padding: 6px 10px;
    margin: 0 2px;
    border: none;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-action:hover {
    transform: scale(1.2);
}

.btn-edit:hover {
    filter: brightness(0.8);
}

.btn-delete {
    background: transparent;
}

.btn-delete:hover {
    filter: brightness(0.8);
}

/* ========================================
   BADGES
   ======================================== */

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.badge-small { background: #e2e3e5; color: #383d41; }
.badge-medium { background: #fff3cd; color: #856404; }
.badge-large { background: #d1ecf1; color: #0c5460; }
.badge-basic { background: #e2e3e5; color: #383d41; }
.badge-pro { background: #fff3cd; color: #856404; }
.badge-enterprise { background: #d4edda; color: #155724; }
.badge-active { background: #d4edda; color: #155724; }
.badge-trial { background: #fff3cd; color: #856404; }
.badge-suspended { background: #f8d7da; color: #721c24; }
.badge-inactive { background: #f8d7da; color: #721c24; }
.badge-master { background: #d1ecf1; color: #0c5460; }
.badge-org_admin { background: #fff3cd; color: #856404; }

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* ========================================
   FORM STYLES
   ======================================== */

.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 0.85em;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.info-box {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
}

.info-box h4 {
    margin-bottom: 15px;
    color: #333;
}

.info-box p {
    margin: 8px 0;
    color: #666;
}

/* ========================================
   ADMIN V2 LIGHT SHELL
   ======================================== */

.admin-shell-v2 {
    --shell-bg: #04070d;
    --shell-panel: rgba(12, 18, 30, 0.92);
    --shell-border: rgba(148, 163, 184, 0.16);
    --shell-border-strong: rgba(148, 163, 184, 0.24);
    --shell-text: #e7edf6;
    --shell-muted: #93a1b6;
    --shell-accent: #d6bcfa;
    --shell-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(168, 85, 247, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 24%),
        linear-gradient(180deg, #04070d 0%, #070c14 100%);
    color: var(--shell-text);
    font-family: "Segoe UI", Inter, system-ui, sans-serif;
}

.admin-topbar-v2 {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(10px);
    background: rgba(4, 7, 13, 0.84);
    border-bottom: 1px solid var(--shell-border);
}

.admin-topbar-inner-v2,
.admin-main-inner-v2,
.admin-footer-inner-v2 {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.admin-topbar-inner-v2 {
    min-height: 72px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
}

.admin-brand-v2 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--shell-text);
}

.admin-brand-v2:hover {
    transform: none;
}

.admin-brand-v2 img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.admin-brand-copy-v2 {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    line-height: 1;
    color: #f8fafc;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.admin-brand-jung-v2 {
    font-weight: 700;
}

.admin-brand-agent-v2 {
    font-weight: 400;
}

.admin-nav-v2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-nav-link-v2 {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--shell-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
    border: 1px solid transparent;
}

.admin-nav-link-v2:hover,
.admin-nav-link-v2.is-active {
    transform: none;
    color: var(--shell-text);
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.22);
}

.admin-topbar-meta-v2 {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.admin-status-chip-v2 {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid var(--shell-border);
    background: rgba(15, 23, 42, 0.65);
    color: var(--shell-muted);
    font-size: 0.83rem;
    font-weight: 600;
}

.admin-meta-link-v2 {
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid var(--shell-border);
    background: rgba(15, 23, 42, 0.65);
    color: var(--shell-muted);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 600;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.admin-meta-link-v2:hover {
    color: var(--shell-text);
    border-color: rgba(168, 85, 247, 0.22);
    background: rgba(168, 85, 247, 0.12);
}

.admin-main-v2 {
    min-height: calc(100vh - 144px);
    padding: 32px 0 48px;
}

.admin-footer-v2 {
    border-top: 1px solid var(--shell-border);
    background: rgba(4, 7, 13, 0.72);
}

.admin-footer-inner-v2 {
    padding: 18px 0 28px;
}

.admin-footer-v2 p {
    margin: 0;
    color: #6e7b91;
    font-size: 0.88rem;
}

.page-shell-v2 {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.page-header-v2 {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
}

.page-kicker-v2 {
    margin: 0 0 10px;
    color: var(--shell-accent);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.74rem;
    font-weight: 700;
}

.page-title-v2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.9rem);
    line-height: 0.98;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #f6f8fc;
}

.page-subtitle-v2 {
    margin: 12px 0 0;
    max-width: 760px;
    color: var(--shell-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.page-actions-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.metric-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.metric-card-v2,
.panel-v2 {
    background: linear-gradient(180deg, rgba(13, 19, 32, 0.96), rgba(10, 16, 27, 0.88));
    border: 1px solid var(--shell-border);
    border-radius: 20px;
    box-shadow: var(--shell-shadow);
}

.metric-card-v2 {
    padding: 22px 22px 20px;
}

.metric-label-v2 {
    display: block;
    margin-bottom: 12px;
    color: var(--shell-muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.metric-value-v2 {
    display: block;
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #f9fbff;
}

.metric-note-v2 {
    margin: 0;
    color: var(--shell-muted);
    line-height: 1.55;
    font-size: 0.95rem;
}

.panel-v2 {
    overflow: hidden;
}

.panel-header-v2 {
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--shell-border);
}

.panel-title-v2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #f5f7fb;
}

.panel-subtitle-v2 {
    margin: 8px 0 0;
    color: var(--shell-muted);
    font-size: 0.95rem;
}

.table-shell-v2 {
    overflow-x: auto;
}

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

.data-table-v2 th,
.data-table-v2 td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.data-table-v2 th {
    color: #9cabbe;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.data-table-v2 td {
    color: var(--shell-text);
    font-size: 0.95rem;
    vertical-align: middle;
}

.data-table-v2 tbody tr {
    transition: background-color 180ms ease;
}

.data-table-v2 tbody tr:hover {
    background: rgba(148, 163, 184, 0.06) !important;
}

.table-badge-v2 {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(168, 85, 247, 0.18);
    background: rgba(168, 85, 247, 0.08);
    color: #dfd0ff;
}

.table-badge-v2--mono {
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 0.82rem;
}

.cell-primary-v2 {
    color: #f3f6fb;
    font-weight: 600;
}

.cell-secondary-v2 {
    color: var(--shell-muted);
}

.metric-inline-v2 {
    color: var(--shell-accent);
    font-size: 1rem;
    font-weight: 700;
}

.actions-col-v2,
.actions-cell-v2 {
    text-align: right;
}

.actions-cell-v2 {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.actions-cell-v2 form {
    margin: 0;
}

.button-v2 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(168, 85, 247, 0.22);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(124, 58, 237, 0.1));
    color: #eee7ff !important;
    text-decoration: none;
    font-weight: 600;
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

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

.button-v2--ghost {
    background: rgba(148, 163, 184, 0.08);
    border-color: var(--shell-border-strong);
    color: var(--shell-text) !important;
}

.button-v2--small {
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.88rem;
}

.empty-state-v2 {
    padding: 56px 24px 60px;
    text-align: center;
}

.empty-state-icon-v2 {
    display: inline-block;
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--shell-border);
    color: var(--shell-accent);
    background: rgba(168, 85, 247, 0.08);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.empty-state-title-v2 {
    margin: 0 0 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #f5f7fb;
}

.empty-state-copy-v2 {
    margin: 0;
    color: var(--shell-muted);
    line-height: 1.6;
}

@media (max-width: 900px) {
    .admin-topbar-inner-v2 {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px 0;
    }

    .admin-topbar-meta-v2 {
        justify-content: flex-start;
    }

    .page-header-v2 {
        flex-direction: column;
        align-items: flex-start;
    }

    .metric-grid-v2 {
        grid-template-columns: 1fr;
    }

    .data-table-v2 th,
    .data-table-v2 td {
        padding: 14px 16px;
    }
}

.metric-grid-v2--triple {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel-v2--warning {
    border-color: rgba(245, 158, 11, 0.35);
}

.panel-body-v2 {
    padding: 22px 24px 24px;
}

.stack-v2 {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.stack-compact-v2 {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notice-v2 {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--shell-border);
    background: rgba(15, 23, 42, 0.62);
}

.notice-v2 strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.92rem;
    color: #f8fafc;
}

.notice-v2 p {
    margin: 0;
    color: var(--shell-muted);
    line-height: 1.55;
}

.notice-v2--success {
    border-color: rgba(16, 185, 129, 0.28);
    background: rgba(6, 78, 59, 0.22);
}

.notice-v2--warning {
    border-color: rgba(245, 158, 11, 0.32);
    background: rgba(120, 53, 15, 0.22);
}

.diag-grid-v2 {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 18px;
}

.diag-card-v2 {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--shell-border);
    background: rgba(10, 16, 27, 0.78);
}

.diag-row-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.details-v2 {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px solid var(--shell-border);
    background: rgba(9, 13, 22, 0.82);
}

.details-v2 summary {
    cursor: pointer;
    font-weight: 600;
    color: #f3f6fb;
}

.code-block-v2 {
    margin: 14px 0 0;
    padding: 14px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.9);
    color: #cbd5e1;
    overflow-x: auto;
    font-size: 0.84rem;
    line-height: 1.5;
}

.quick-grid-v2 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.metric-grid-v2--quad {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.quick-card-v2 {
    padding: 22px;
    border-radius: 20px;
    border: 1px solid var(--shell-border);
    background: linear-gradient(180deg, rgba(12, 18, 30, 0.96), rgba(8, 13, 22, 0.9));
    color: var(--shell-text);
    text-decoration: none;
    box-shadow: var(--shell-shadow);
    transition: transform 180ms ease, border-color 180ms ease;
}

.quick-card-v2:hover {
    transform: translateY(-2px);
    border-color: rgba(168, 85, 247, 0.28);
}

.quick-card-v2--heavy {
    border-color: rgba(56, 189, 248, 0.2);
}

.quick-kicker-v2 {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--shell-accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.quick-title-v2 {
    display: block;
    margin-bottom: 8px;
    color: #f8fafc;
    font-size: 1.15rem;
    font-weight: 700;
}

.quick-copy-v2 {
    margin: 0;
    color: var(--shell-muted);
    line-height: 1.6;
}

.stack-list-v2 {
    display: flex;
    flex-direction: column;
}

.list-card-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.list-card-main-v2 {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.list-avatar-v2 {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.86), rgba(59, 130, 246, 0.7));
    color: #fff;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.list-card-meta-v2 {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.subnav-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.subnav-link-v2 {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--shell-border);
    background: rgba(15, 23, 42, 0.52);
    color: var(--shell-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.subnav-link-v2:hover,
.subnav-link-v2.is-active {
    color: var(--shell-text);
    border-color: rgba(168, 85, 247, 0.28);
    background: rgba(168, 85, 247, 0.12);
}

.dashboard-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.dashboard-columns-v2 {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 18px;
}

.dashboard-columns-v2--balanced {
    grid-template-columns: 1fr 1fr;
}

.scroll-list-v2 {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 620px;
    overflow: auto;
}

.data-card-v2 {
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(9, 13, 22, 0.74);
}

.data-card-v2 strong {
    color: #f6dd95;
}

.meta-line-v2 {
    color: #98a8bf;
    font-size: 0.84rem;
    line-height: 1.5;
}

.list-plain-v2 {
    margin: 8px 0 0 18px;
    padding: 0;
}

.list-plain-v2 li {
    margin: 6px 0;
    color: var(--shell-text);
}

.table-controls-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.search-input-v2,
.field-v2 input,
.field-v2 select,
.field-v2 textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--shell-border);
    background: rgba(8, 15, 30, 0.55);
    color: var(--shell-text);
    font: inherit;
    padding: 12px 14px;
}

.field-v2 textarea {
    min-height: 96px;
    resize: vertical;
}

.form-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field-v2 label {
    display: block;
    color: var(--shell-muted);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.mono-block-v2 {
    margin: 10px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.84);
    color: #d4ddee;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.84rem;
    line-height: 1.55;
    font-family: Consolas, "SFMono-Regular", monospace;
}

.tag-list-v2 {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-v2 {
    display: inline-flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--shell-border);
    background: rgba(15, 23, 42, 0.65);
    color: var(--shell-text);
    font-size: 0.82rem;
    font-weight: 600;
}

.modal-v2 {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 20px;
    background: rgba(2, 6, 23, 0.78);
    z-index: 1000;
    overflow-y: auto;
}

.modal-v2.is-open {
    display: flex;
}

.modal-v2.open {
    display: flex;
}

.modal-card-v2 {
    width: min(1040px, 100%);
    border-radius: 22px;
    border: 1px solid var(--shell-border);
    background: rgba(11, 19, 36, 0.98);
    padding: 26px;
    box-shadow: var(--shell-shadow);
}

.modal-head-v2 {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.detail-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.detail-card-v2 {
    padding: 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.88);
    border: 1px solid var(--shell-border);
}

.table-cover-v2 {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--shell-border);
    background: rgba(8, 15, 30, 0.9);
    margin-bottom: 14px;
}

.detail-value-v2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: #f8fafc;
}

.details-v2 + .details-v2 {
    margin-top: 16px;
}

.details-v2-body {
    padding: 18px;
    background: rgba(8, 15, 30, 0.5);
}

.empty-row-v2 {
    padding: 24px;
    text-align: center;
    color: var(--shell-muted);
}

.split-panels-v2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.action-grid-v2 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.action-tile-v2 {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--shell-border-strong);
    background: rgba(15, 23, 42, 0.68);
    color: var(--shell-text);
    text-align: left;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.action-tile-v2:hover:not(:disabled) {
    transform: translateY(-1px);
    border-color: rgba(168, 85, 247, 0.28);
}

.action-tile-v2:disabled,
.action-tile-v2--disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.action-tile-v2--busy {
    opacity: 0.82;
}

.action-tile-title-v2 {
    display: block;
    margin-bottom: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: #f8fafc;
}

.action-tile-copy-v2 {
    display: block;
    color: var(--shell-muted);
    line-height: 1.55;
    font-size: 0.92rem;
}

@media (max-width: 1080px) {
    .metric-grid-v2--quad,
    .metric-grid-v2--triple,
    .quick-grid-v2,
    .action-grid-v2,
    .split-panels-v2,
    .dashboard-columns-v2,
    .dashboard-columns-v2--balanced,
    .form-grid-v2 {
        grid-template-columns: 1fr 1fr;
    }

    .diag-grid-v2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .metric-grid-v2--quad,
    .metric-grid-v2--triple,
    .quick-grid-v2,
    .action-grid-v2,
    .split-panels-v2,
    .dashboard-columns-v2,
    .dashboard-columns-v2--balanced,
    .form-grid-v2 {
        grid-template-columns: 1fr;
    }

    .list-card-v2 {
        flex-direction: column;
        align-items: flex-start;
    }

    .list-card-meta-v2 {
        align-items: flex-start;
    }
}
