/* ==========================================================================
   КРЕСЛО СПЕЦОВ — Luxury Crimson Obsidian Design System 2026
   Theme: Deep Carbon & Ruby Neon SpecOps Glassmorphism
   ========================================================================== */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Rajdhani:wght@500;600;700&display=swap');

/* ── CSS Tokens & System Variables ── */
:root {
    /* Backgrounds */
    --bg-base:          #050609;
    --bg-primary:       #090b10;
    --bg-secondary:     #0f131a;
    --bg-card:          rgba(17, 21, 30, 0.75);
    --bg-card-hover:    rgba(23, 29, 42, 0.88);
    --bg-surface:       #131822;
    --bg-glass:         rgba(12, 16, 24, 0.65);
    --bg-glass-strong:  rgba(15, 19, 28, 0.9);
    --bg-input:         rgba(8, 11, 17, 0.85);

    /* Borders */
    --border-subtle:    rgba(255, 255, 255, 0.06);
    --border:           rgba(255, 42, 95, 0.22);
    --border-hover:     rgba(255, 42, 95, 0.5);
    --border-glow:      rgba(255, 42, 95, 0.75);

    /* Text Colors */
    --text-primary:     #f8fafc;
    --text-secondary:   #94a3b8;
    --text-muted:       #64748b;
    --text-dim:         #475569;

    /* Accents & Brand (Crimson / Ruby) */
    --accent-red:       #ff2a5f;
    --accent-ruby:      #ff0844;
    --accent-crimson:   #e11d48;
    --accent-amber:     #f59e0b;
    --accent-gold:      #fbbf24;
    --accent-blue:      #38bdf8;
    --accent-glow:      rgba(255, 42, 95, 0.35);
    --accent-glow-gold: rgba(245, 158, 11, 0.35);

    /* Status Colors */
    --status-green:     #10b981;
    --status-green-g:   rgba(16, 185, 129, 0.2);
    --status-red:       #ff2a5f;
    --status-red-g:     rgba(255, 42, 95, 0.2);
    --status-amber:     #f59e0b;
    --status-amber-g:   rgba(245, 158, 11, 0.2);
    --status-purple:    #a855f7;
    --status-purple-g:  rgba(168, 85, 247, 0.2);

    /* Dimensions */
    --sidebar-width:    268px;
    --topbar-height:    68px;

    /* Radii */
    --radius-xs:        4px;
    --radius-sm:        8px;
    --radius-md:        12px;
    --radius-lg:        18px;
    --radius-xl:        24px;
    --radius-full:      9999px;

    /* Shadows & Elevation */
    --shadow-sm:        0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md:        0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-lg:        0 16px 48px rgba(0, 0, 0, 0.8);
    --shadow-glow:      0 0 25px rgba(255, 42, 95, 0.25);
    --shadow-glow-lg:   0 0 35px rgba(255, 42, 95, 0.4);

    /* Typography */
    --font-sans:        'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display:     'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-title:       'Rajdhani', sans-serif;
    --font-mono:        'JetBrains Mono', 'Fira Code', Consolas, monospace;

    /* Transitions */
    --transition-fast:  all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base:  all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth:all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    font-size: 14px;
    scroll-behavior: smooth;
    color-scheme: dark;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(circle at 100% 0%, rgba(255, 42, 95, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(245, 158, 11, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(12, 16, 24, 0.85) 0%, var(--bg-base) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: rgba(5, 6, 9, 0.6);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 42, 95, 0.25);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 42, 95, 0.55);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* ── Typography & Links ── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

a {
    color: var(--accent-red);
    text-decoration: none;
    transition: var(--transition-fast);
}
a:hover {
    color: #fff;
    text-shadow: 0 0 12px var(--accent-glow);
}

/* ── Layout Framework ── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 6, 9, 0.8);
    backdrop-filter: blur(8px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-base);
}
.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-logo {
    padding: 22px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(180deg, rgba(255, 42, 95, 0.08) 0%, transparent 100%);
}

.sidebar-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--accent-ruby), #7928ca);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
    flex-shrink: 0;
    transition: var(--transition-base);
}
.sidebar-logo:hover .sidebar-logo-icon {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: 0 0 30px var(--accent-glow-lg);
}

.sidebar-logo-text {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.01em;
    background: linear-gradient(90deg, #fff 30%, var(--accent-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-logo-sub {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-amber);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 1px;
}

/* ── Sidebar Navigation ── */
.sidebar-nav {
    padding: 18px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section-title {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 16px 12px 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-base);
    position: relative;
    border: 1px solid transparent;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: var(--transition-fast);
    stroke-width: 2.2;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 42, 95, 0.08);
    border-color: rgba(255, 42, 95, 0.2);
    transform: translateX(3px);
}
.nav-item:hover svg {
    color: var(--accent-red);
    transform: scale(1.1);
}

.nav-item.active {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(255, 42, 95, 0.25) 0%, rgba(245, 158, 11, 0.1) 100%);
    border-color: rgba(255, 42, 95, 0.4);
    box-shadow: 0 0 20px rgba(255, 42, 95, 0.2), inset 0 0 15px rgba(255, 42, 95, 0.08);
}
.nav-item.active svg {
    color: var(--accent-red);
    filter: drop-shadow(0 0 8px var(--accent-red));
}
.nav-item.active::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--accent-red), var(--accent-amber));
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 12px var(--accent-red);
}

/* ── Sidebar User Footer ── */
.sidebar-user {
    padding: 16px 14px;
    border-top: 1px solid var(--border);
    background: rgba(10, 13, 20, 0.7);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, var(--accent-red), #9333ea);
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-user-role {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-logout {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    transition: var(--transition-fast);
}
.sidebar-logout:hover {
    color: var(--status-red);
    background: var(--status-red-g);
    border-color: rgba(255, 42, 95, 0.4);
    box-shadow: 0 0 12px rgba(255, 42, 95, 0.3);
}

/* ── Main Content Area ── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* ── Topbar ── */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-glass-strong);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 18px;
}

.topbar-burger {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
}

.topbar-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.topbar-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    padding-left: 14px;
    border-left: 1px solid var(--border);
    margin-left: 4px;
}

/* ── Page Body & Grid ── */
.page-body, .content-body {
    padding: 28px;
    flex: 1;
}

/* ── Dashboard Stats Widgets ── */
.dashboard-grid, .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.dash-stat-box, .stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}
.dash-stat-box:hover, .stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-red);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), var(--shadow-glow);
}

.dash-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.dash-stat-icon.red {
    background: linear-gradient(135deg, rgba(255, 42, 95, 0.2) 0%, rgba(225, 29, 72, 0.2) 100%);
    color: var(--accent-red);
}
.dash-stat-icon.gold, .dash-stat-icon.amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(251, 191, 36, 0.2) 100%);
    color: var(--accent-gold);
}
.dash-stat-icon.purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(147, 51, 234, 0.2) 100%);
    color: var(--status-purple);
}
.dash-stat-icon.blue {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2) 0%, rgba(14, 165, 233, 0.2) 100%);
    color: var(--accent-blue);
}
.dash-stat-icon.green {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.2) 100%);
    color: var(--status-green);
}

.dash-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dash-stat-val {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-top: 2px;
}

/* ── Organizations (Фракции) Grid & Cards ── */
.orgs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.org-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.org-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.org-card-name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.org-card-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 14px 0;
    padding: 12px 14px;
    background: rgba(8, 11, 17, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: 12.5px;
    color: var(--text-muted);
}
.org-card-info span {
    display: block;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 13.5px;
    margin-top: 2px;
}

.progress-bar-wrap {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-amber));
    border-radius: var(--radius-full);
    box-shadow: 0 0 10px var(--accent-glow);
    transition: width 0.4s ease;
}

/* ── Avatars & Inline Users ── */
.user-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.avatar-placeholder {
    background: linear-gradient(135deg, var(--accent-ruby), #9333ea);
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Glass Cards ── */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: var(--transition-base);
    margin-bottom: 24px;
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: linear-gradient(180deg, rgba(255, 42, 95, 0.05) 0%, transparent 100%);
}

.card-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

/* ── Filter Form & Grid ── */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Form Controls & Inputs */
.form-control, .form-select {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13.5px;
    outline: none;
    transition: var(--transition-base);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
}

.form-control-sm, .form-select-sm {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 15px var(--accent-glow), inset 0 2px 4px rgba(0, 0, 0, 0.4);
    background: rgba(18, 22, 32, 0.95);
}

.form-control::placeholder {
    color: var(--text-dim);
}

select.form-select:not([multiple]) {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ff2a5f' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* Multiple Select Box (Custom Styled) */
select.form-select[multiple] {
    height: 120px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    background: rgba(8, 11, 17, 0.9);
}
select.form-select[multiple] option {
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    margin-bottom: 2px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
}
select.form-select[multiple] option:hover {
    background: rgba(255, 42, 95, 0.2);
    color: #fff;
}
select.form-select[multiple] option:checked {
    background: linear-gradient(90deg, rgba(255, 42, 95, 0.4) 0%, rgba(245, 158, 11, 0.2) 100%);
    color: var(--accent-red);
    font-weight: 600;
}

/* Search Box Container */
.search-box {
    position: relative;
    width: 100%;
}
.search-box-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.search-box .form-control {
    padding-left: 42px;
}

/* ── Modern Data & Logs Tables ── */
.table-wrap, .logs-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.table, .logs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: left;
}

.table th, .logs-table th {
    background: rgba(10, 13, 20, 0.95);
    padding: 14px 20px;
    font-family: var(--font-display);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table td, .logs-table td {
    padding: 13px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    vertical-align: middle;
    transition: var(--transition-fast);
}

.table tbody tr:hover, .logs-table tbody tr:hover {
    background: rgba(255, 42, 95, 0.08);
    color: var(--text-primary);
}
.table tbody tr:hover td, .logs-table tbody tr:hover td {
    border-bottom-color: rgba(255, 42, 95, 0.25);
}

/* Specific Columns for Logs Table */
.col-date {
    width: 190px;
    font-family: var(--font-mono);
    font-size: 12.5px;
    color: var(--accent-red);
    font-weight: 600;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.col-action {
    font-size: 13.5px;
    line-height: 1.5;
}
.col-action b, .col-action strong {
    color: #fff;
    font-weight: 600;
}

/* ── Pagination ── */
.pagination {
    padding: 18px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    background: linear-gradient(180deg, transparent 0%, rgba(10, 13, 20, 0.4) 100%);
}

.pagination-info {
    margin-right: auto;
    font-size: 12.5px;
    color: var(--text-muted);
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-base);
}
.page-btn:hover:not(.disabled) {
    background: rgba(255, 42, 95, 0.2);
    border-color: var(--accent-red);
    color: #fff;
    box-shadow: 0 0 12px var(--accent-glow);
}
.page-btn.active {
    background: linear-gradient(135deg, var(--accent-ruby) 0%, var(--accent-amber) 100%);
    border-color: var(--accent-red);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 0 15px var(--accent-glow);
}
.page-btn.disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ── Empty State ── */
.empty-state {
    padding: 60px 20px;
    text-align: center;
}
.empty-state-icon {
    font-size: 44px;
    margin-bottom: 14px;
    filter: drop-shadow(0 0 15px rgba(255, 42, 95, 0.3));
}
.empty-state-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.empty-state-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge-red, .badge-danger, .badge-crimson {
    background: var(--status-red-g);
    color: var(--status-red);
    border-color: rgba(255, 42, 95, 0.35);
}

.badge-green, .badge-success {
    background: var(--status-green-g);
    color: var(--status-green);
    border-color: rgba(16, 185, 129, 0.35);
}

.badge-amber, .badge-gold, .badge-warning {
    background: var(--status-amber-g);
    color: var(--status-amber);
    border-color: rgba(245, 158, 11, 0.35);
}

.badge-blue, .badge-info, .badge-primary {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent-blue);
    border-color: rgba(56, 189, 248, 0.35);
}

.badge-purple {
    background: var(--status-purple-g);
    color: var(--status-purple);
    border-color: rgba(168, 85, 247, 0.35);
}

.badge-gray, .badge-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border-color: var(--border-subtle);
}

/* ── Alerts & Notifications ── */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert-success {
    background: var(--status-green-g);
    color: var(--status-green);
    border-color: rgba(16, 185, 129, 0.35);
}
.alert-danger, .alert-error {
    background: var(--status-red-g);
    color: var(--status-red);
    border-color: rgba(255, 42, 95, 0.35);
}
.alert-warning {
    background: var(--status-amber-g);
    color: var(--status-amber);
    border-color: rgba(245, 158, 11, 0.35);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-ruby) 0%, #a855f7 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 42, 95, 0.35);
    font-weight: 700;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--accent-glow);
    color: #fff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--border);
}
.btn-secondary:hover {
    background: rgba(255, 42, 95, 0.12);
    border-color: var(--accent-red);
    color: #fff;
}

.btn-danger {
    background: var(--status-red-g);
    color: var(--status-red);
    border-color: rgba(255, 42, 95, 0.3);
}
.btn-danger:hover {
    background: var(--status-red);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 42, 95, 0.4);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}
.btn-ghost:hover {
    background: rgba(255, 42, 95, 0.12);
    border-color: var(--border-hover);
    color: #fff;
}

/* ── Mobile Responsive Breakpoints ── */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .topbar-burger {
        display: block;
    }
}

@media (max-width: 640px) {
    .page-body, .content-body {
        padding: 16px;
    }
    .topbar {
        padding: 0 16px;
    }
    .filter-grid {
        grid-template-columns: 1fr;
    }
    .orgs-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
