/* ═══════════════════════════════════════════════════════════════
   🐉 Drakon Dashboard — Cyber Dragon Obsidian SaaS Design System
   Pure Pitch Black (#000000) & Intense Drakon Crimson (#900C3F)
   ═══════════════════════════════════════════════════════════════ */

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

/* ── Global Removal of ALL Link Underlines ── */
a,
a:hover,
a:focus,
a:active,
a:visited {
    text-decoration: none !important;
}

:root {
    /* ── Pure Obsidian Deep Black Surfaces ── */
    --bg: #000000;
    --bg-surface: #030406;
    --bg-card: rgba(6, 8, 12, 0.96);
    --bg-card-hover: rgba(10, 13, 20, 0.98);
    --bg-input: rgba(4, 5, 8, 0.96);
    --bg-active: rgba(144, 12, 63, 0.25);

    /* ── Drakon Dragon Crimson Palette (Matched to #900C3F SVG Logo) ── */
    --primary: #900C3F;
    --primary-hover: #a8114c;
    --primary-active: #780833;
    --primary-light: #c71f5a;
    --primary-glow: rgba(144, 12, 63, 0.6);
    --primary-border: rgba(144, 12, 63, 0.45);
    --primary-border-subtle: rgba(144, 12, 63, 0.28);
    --primary-dim: rgba(144, 12, 63, 0.18);
    --primary-gradient: linear-gradient(135deg, #900C3F 0%, #b81446 100%);
    --primary-gradient-glow: linear-gradient(135deg, rgba(144, 12, 63, 0.35) 0%, rgba(184, 20, 70, 0.12) 100%);

    /* ── Functional Status Indicators ── */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #38bdf8;

    /* ── Borders & Glass Dividers ── */
    --border: rgba(144, 12, 63, 0.3);
    --border-hover: rgba(184, 20, 70, 0.65);
    --border-strong: rgba(144, 12, 63, 0.5);
    --border-subtle: rgba(255, 255, 255, 0.08);

    /* ── High-Contrast SaaS Typography ── */
    --white: #ffffff;
    --text: #f8fafc;
    --text-dim: #94a3b8;
    --text-muted: #64748b;

    /* ── Geometry & Shadows ── */
    --sidebar-w: 260px;
    --header-h: 70px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --transition: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(144, 12, 63, 0.4);
    --shadow-dragon: 0 0 28px rgba(144, 12, 63, 0.45);
}

html,
body {
    height: 100%;
    width: 100%;
    max-width: 100vw;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ── Cyber Dragon Dark Atmosphere: Rich Crimson Ambient Flares on Pure Black ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse 950px 600px at 90% -10%, rgba(144, 12, 63, 0.28) 0%, transparent 70%),
        radial-gradient(ellipse 750px 500px at 10% 105%, rgba(144, 12, 63, 0.22) 0%, transparent 65%),
        radial-gradient(ellipse 650px 400px at 50% 20%, rgba(144, 12, 63, 0.14) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(rgba(144, 12, 63, 0.15) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 20%, transparent 80%);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

/* ── Custom Dragon Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 10px rgba(144, 12, 63, 0.8);
}

/* ── Layout ── */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    height: 100%;
    min-width: 0;
    max-width: 100vw;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR & BRAND IDENTITY
   ═══════════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    background: rgba(2, 3, 5, 0.98);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border-right: 1px solid rgba(144, 12, 63, 0.35);
    z-index: 100;
    transition: transform var(--transition);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.85);
}

.sidebar-brand {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(144, 12, 63, 0.3);
    background: linear-gradient(180deg, rgba(144, 12, 63, 0.22) 0%, transparent 100%);
}

.sidebar-brand .brand-icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(144, 12, 63, 0.25);
    border: 1px solid var(--primary-border);
    box-shadow: 0 0 22px rgba(144, 12, 63, 0.65);
    flex-shrink: 0;
    transition: transform var(--transition), box-shadow var(--transition);
}

.sidebar-brand:hover .brand-icon-wrap {
    transform: scale(1.08);
    box-shadow: 0 0 28px rgba(144, 12, 63, 0.9);
}

.sidebar-brand .brand-icon {
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 0 8px rgba(144, 12, 63, 0.95));
    display: block;
}

.sidebar-brand .brand-text-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-brand .brand-name {
    font-size: 1.22rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 60%, #ff7597 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-brand .brand-badge {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(144, 12, 63, 0.25);
    color: #ff4777;
    border: 1px solid rgba(144, 12, 63, 0.55);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(144, 12, 63, 0.4);
}

.sidebar-nav {
    flex: 1;
    padding: 18px 12px;
    overflow-y: auto;
    scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.nav-section {
    margin-bottom: 22px;
}

.nav-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: #ff5c8a;
    padding: 0 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-section-title::before {
    content: '◆';
    font-size: 0.55rem;
    color: #900C3F;
    text-shadow: 0 0 6px #900C3F;
}

.nav-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(144, 12, 63, 0.2);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    text-decoration: none !important;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all var(--transition);
    border: 1px solid transparent;
    margin-bottom: 3px;
    position: relative;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
    color: var(--text-muted);
    transition: all var(--transition);
    flex-shrink: 0;
}

.nav-item:hover {
    background: rgba(144, 12, 63, 0.16);
    color: var(--white);
    border-color: rgba(144, 12, 63, 0.35);
    transform: translateX(3px);
    box-shadow: 0 0 16px rgba(144, 12, 63, 0.25);
}

.nav-item:hover svg {
    color: #ff5c8a;
    filter: drop-shadow(0 0 6px rgba(144, 12, 63, 0.6));
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(144, 12, 63, 0.45) 0%, rgba(144, 12, 63, 0.08) 100%);
    border-color: rgba(144, 12, 63, 0.65);
    border-left: 4px solid #ff2a6d;
    color: var(--white);
    box-shadow: 0 2px 20px rgba(144, 12, 63, 0.4);
}

.nav-item.active svg {
    color: #ff4d7e;
    filter: drop-shadow(0 0 8px rgba(255, 77, 126, 0.8));
}

.sidebar-footer {
    padding: 14px 12px;
    border-top: 1px solid rgba(144, 12, 63, 0.3);
    background: rgba(2, 3, 5, 0.85);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: rgba(144, 12, 63, 0.08);
    border: 1px solid rgba(144, 12, 63, 0.3);
    transition: border-color var(--transition);
}

.user-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(144, 12, 63, 0.3);
}

.user-card .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--primary);
    object-fit: cover;
    box-shadow: 0 0 10px rgba(144, 12, 63, 0.5);
}

.user-card .user-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-card .user-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT & HEADER
   ═══════════════════════════════════════════════════════════════ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    min-width: 0;
    max-width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.content-header {
    padding: 22px 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(144, 12, 63, 0.3);
    background: rgba(2, 3, 5, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.75);
}

.content-header .header-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.content-header h1 {
    font-size: 1.48rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.4px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-shadow: 0 0 20px rgba(144, 12, 63, 0.4);
}

.content-header h1::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 1.3rem;
    background: var(--primary-gradient);
    border-radius: 3px;
    box-shadow: 0 0 14px rgba(144, 12, 63, 0.9);
}

.content-area {
    padding: 30px 34px 48px;
}

/* ═══════════════════════════════════════════════════════════════
   MINIMALIST GLASS CARDS & CONTAINERS
   ═══════════════════════════════════════════════════════════════ */
.glass-card {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(22px) saturate(140%);
    -webkit-backdrop-filter: blur(22px) saturate(140%);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    padding: 22px 24px;
    transition: all var(--transition);
    box-shadow: var(--shadow-card);
    word-break: break-word;
}

.glass-card:hover {
    border-color: rgba(184, 20, 70, 0.65);
    background: var(--bg-card-hover);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9), 0 0 30px rgba(144, 12, 63, 0.35), inset 0 1px 0 rgba(255, 77, 126, 0.7);
}

/* Card Section Header */
.card-header-clean {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(144, 12, 63, 0.25);
}

.card-header-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: rgba(144, 12, 63, 0.25);
    border: 1px solid rgba(144, 12, 63, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4777;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(144, 12, 63, 0.45);
}

.card-header-icon-wrap svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.card-header-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.2px;
}

.card-header-desc {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 2px;
}

.glass-card .card-title {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #ff5c8a;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-card .card-value {
    font-size: 1.88rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
}

.glass-card .card-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   MODULE NAVIGATION HUB (TOP BAR TABS)
   ═══════════════════════════════════════════════════════════════ */
.module-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 26px;
}

.module-nav-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    text-decoration: none !important;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(144, 12, 63, 0.35);
}

.module-nav-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(144, 12, 63, 0.22) 0%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.module-nav-card:hover {
    border-color: #b81446;
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.85), 0 0 24px rgba(144, 12, 63, 0.4), inset 0 1px 0 rgba(255, 77, 126, 0.8);
}

.module-nav-card:hover::before {
    opacity: 1;
}

.module-nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(144, 12, 63, 0.2);
    border: 1px solid var(--primary-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4777;
    flex-shrink: 0;
    transition: all var(--transition);
}

.module-nav-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
}

.module-nav-card:hover .module-nav-icon {
    background: var(--primary);
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 0 16px rgba(144, 12, 63, 0.7);
}

.module-nav-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.module-nav-title {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -0.1px;
}

.module-nav-sub {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.module-nav-arrow {
    width: 14px;
    height: 14px;
    stroke: var(--text-muted);
    stroke-width: 2;
    transition: all var(--transition);
    flex-shrink: 0;
}

.module-nav-card:hover .module-nav-arrow {
    stroke: #ff4777;
    transform: translateX(3px);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS, INPUTS & CONTROLS
   ═══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none !important;
    border: 1px solid transparent;
    outline: none;
    line-height: 1.4;
    user-select: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 18px rgba(144, 12, 63, 0.55);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a8114c 0%, #c71f5a 100%);
    box-shadow: 0 6px 28px rgba(144, 12, 63, 0.8);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(144, 12, 63, 0.5);
}

/* Dragon Save Button in Content Header */
.btn-dragon-save {
    padding: 9px 22px;
    font-size: 0.88rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 22px rgba(144, 12, 63, 0.65);
}

.btn-dragon-save .save-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2;
    transition: transform var(--transition);
}

.btn-dragon-save:hover .save-icon {
    transform: scale(1.15);
}

.btn-dragon-save.saving {
    opacity: 0.8;
    pointer-events: none;
}

.btn-dragon-save.saved {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%) !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    background: rgba(144, 12, 63, 0.14);
    color: #ff5c8a;
    border-color: rgba(144, 12, 63, 0.4);
}

.btn-secondary:hover {
    background: var(--primary-gradient);
    border-color: #ff4777;
    color: var(--white);
    box-shadow: 0 0 20px rgba(144, 12, 63, 0.65);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-dim);
}

.btn-ghost:hover {
    background: rgba(144, 12, 63, 0.15);
    color: var(--white);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
    color: var(--white);
}

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

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 7px;
    letter-spacing: -0.1px;
}

.form-control,
.form-input,
.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 0.88rem;
    outline: none;
    transition: all var(--transition);
}

.form-control:focus,
.form-input:focus,
.form-select:focus {
    border-color: var(--primary);
    background: rgba(8, 10, 16, 0.98);
    box-shadow: 0 0 0 3px rgba(144, 12, 63, 0.28), 0 0 16px rgba(144, 12, 63, 0.35);
}

/* ═══════════════════════════════════════════════════════════════
   PREMIUM COLOR PICKER COMPONENT (Embed Brand Color)
   ═══════════════════════════════════════════════════════════════ */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    transition: all var(--transition);
}

.color-picker-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(144, 12, 63, 0.28);
}

.color-swatch-box {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition);
}

.color-swatch-box:hover {
    transform: scale(1.1);
}

.color-swatch-preview {
    width: 100%;
    height: 100%;
    border-radius: 7px;
    display: block;
}

.color-native-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    top: 0;
    left: 0;
}

.color-hex-input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 4px 6px !important;
    font-family: 'JetBrains Mono', monospace, Consolas, sans-serif;
    font-size: 0.88rem !important;
    font-weight: 600;
    color: var(--white) !important;
    box-shadow: none !important;
    text-transform: uppercase;
}

.color-preset-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 8px;
    border-left: 1px solid var(--border);
}

.color-dot-preset {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
}

.color-dot-preset:hover {
    transform: scale(1.28);
    border-color: var(--white);
    box-shadow: 0 0 10px currentColor;
}

/* ═══════════════════════════════════════════════════════════════
   CUSTOM ANIMATED SELECT DROPDOWNS
   ═══════════════════════════════════════════════════════════════ */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    width: 100%;
}

.custom-select-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    width: 100%;
}

.custom-select-trigger:hover {
    border-color: var(--primary-border);
    background: rgba(10, 13, 20, 0.98);
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(144, 12, 63, 0.25), 0 0 20px rgba(144, 12, 63, 0.35);
}

.custom-select-trigger .chevron-icon {
    width: 14px;
    height: 14px;
    stroke: var(--text-muted);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), stroke 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}

.custom-select-wrapper.open .custom-select-trigger .chevron-icon {
    transform: rotate(180deg);
    stroke: #ff4777;
}

.custom-select-options {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 9999;
    margin-top: 6px;
    padding: 6px;
    background: rgba(8, 10, 15, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 24px rgba(144, 12, 63, 0.25);
    
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px) scale(0.96);
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), 
                visibility 0.22s;
}

.custom-select-wrapper.drop-up .custom-select-options {
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 6px;
    transform: translateY(8px) scale(0.96);
}

.custom-select-wrapper.open .custom-select-options {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.custom-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 0.84rem;
    color: var(--text-dim);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.custom-option:hover {
    background: rgba(144, 12, 63, 0.25);
    color: var(--white);
    transform: translateX(2px);
}

.custom-option.selected {
    background: var(--primary-dim);
    border: 1px solid var(--primary-border);
    color: var(--white);
    font-weight: 600;
}

.custom-option.selected::after {
    content: '✓';
    font-size: 0.8rem;
    color: #ff4777;
}

/* ═══════════════════════════════════════════════════════════════
   TOGGLE SWITCHES
   ═══════════════════════════════════════════════════════════════ */
.form-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(144, 12, 63, 0.2);
}

.switch-track {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.switch-track input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--white);
    border-radius: 50%;
    transition: transform var(--transition), background var(--transition);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.switch-track input:checked + .switch-thumb {
    transform: translateX(20px);
    background: var(--white);
}

.switch-track:has(input:checked) {
    background: var(--primary-gradient);
    border-color: var(--primary-hover);
    box-shadow: 0 0 16px rgba(144, 12, 63, 0.65);
}

/* Toggle alias for moderation/tickets/autovoice */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--white);
    border-radius: 50%;
    transition: transform var(--transition), background var(--transition);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary-gradient);
    border-color: var(--primary-hover);
    box-shadow: 0 0 16px rgba(144, 12, 63, 0.65);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
    background: var(--white);
}

/* ═══════════════════════════════════════════════════════════════
   LIVE MUSIC CONTROLLER COMPONENT
   ═══════════════════════════════════════════════════════════════ */
.player-widget {
    background: linear-gradient(135deg, rgba(144, 12, 63, 0.18) 0%, rgba(6, 8, 12, 0.95) 100%);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.8), 0 0 30px rgba(144, 12, 63, 0.35), inset 0 1px 0 rgba(144, 12, 63, 0.5);
}

.player-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.player-art {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    object-fit: cover;
    border: 1px solid var(--primary-border);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.7);
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-author {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.progress-bar-container {
    margin-top: 16px;
}

.progress-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.3s ease;
    box-shadow: 0 0 12px rgba(144, 12, 63, 0.7);
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 18px;
}

.control-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(144, 12, 63, 0.15);
    border: 1px solid var(--border);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.control-btn:hover {
    background: rgba(144, 12, 63, 0.35);
    border-color: var(--primary);
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(144, 12, 63, 0.5);
}

.control-btn.play-btn {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 24px rgba(144, 12, 63, 0.7);
}

.control-btn.play-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 0 32px rgba(144, 12, 63, 0.9);
}

/* ═══════════════════════════════════════════════════════════════
   SERVER CARDS GRID & SAAS CARDS (Rich Drakon Styling)
   ═══════════════════════════════════════════════════════════════ */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 18px;
}

.server-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 20px;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-decoration: none !important;
    color: var(--text) !important;
    transition: all var(--transition);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(144, 12, 63, 0.45);
    position: relative;
    overflow: hidden;
}

.server-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(144, 12, 63, 0.12) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.server-card.active-server-card {
    border-color: rgba(144, 12, 63, 0.55);
    background: linear-gradient(180deg, rgba(144, 12, 63, 0.12) 0%, rgba(6, 8, 12, 0.96) 100%);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(144, 12, 63, 0.25), inset 0 1px 0 rgba(144, 12, 63, 0.7);
}

.server-card.inactive-server-card {
    background: var(--bg-card);
    border-color: var(--border);
}

.server-card:hover {
    border-color: #b81446;
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.9), 0 0 32px rgba(144, 12, 63, 0.45), inset 0 1px 0 #ff4d7e;
}

.server-card:hover::before {
    opacity: 1;
}

.server-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.server-card .server-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(144, 12, 63, 0.45);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(144, 12, 63, 0.35);
}

.server-card .server-icon-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #900C3F 0%, #630628 100%);
    border: 1px solid #b81446;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 0 18px rgba(144, 12, 63, 0.65);
}

.server-card .server-meta {
    flex: 1;
    min-width: 0;
}

.server-card .server-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--transition);
}

.server-card:hover .server-name {
    color: #ff8dae;
}

.server-card .server-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'JetBrains Mono', Consolas, monospace;
}

.server-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(144, 12, 63, 0.25);
    gap: 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    background: rgba(144, 12, 63, 0.14);
    color: #ff7597;
    border: 1px solid rgba(144, 12, 63, 0.4);
}

.badge-primary {
    background: rgba(144, 12, 63, 0.2);
    color: #ff4777;
    border: 1px solid rgba(144, 12, 63, 0.5);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-dot.offline {
    background: #64748b;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE UTILITIES & MOBILE SIDEBAR
   ═══════════════════════════════════════════════════════════════ */
#mobile-menu-btn,
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--white);
    padding: 6px 10px;
    font-size: 1rem;
}

@media (max-width: 900px) {
    #mobile-menu-btn,
    .mobile-menu-btn {
        display: inline-flex !important;
    }
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.95);
    }
    .main-content {
        margin-left: 0;
    }
    .content-header {
        padding: 16px 20px;
    }
    .content-area {
        padding: 20px 16px 36px;
    }
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.85);
        backdrop-filter: blur(8px);
        z-index: 90;
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition);
    }
    .sidebar-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }
}