/* #207 Davis Sheriff Admin Panel CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --bg-dark: #030712;
    --bg-deep: #070e1b;
    --bg-gradient: radial-gradient(ellipse at top, #0f1c3f 0%, #030712 100%);
    --bg-card: rgba(10, 17, 32, 0.75);
    
    --primary: #fbbf24; /* Gold */
    --primary-rgb: 251, 191, 36;
    --primary-hover: #f59e0b;
    
    --secondary: #1d4ed8; /* Police Blue */
    --secondary-hover: #1e40af;
    
    --border-glass: rgba(var(--primary-rgb), 0.08);
    --border-glass-hover: rgba(var(--primary-rgb), 0.3);
    
    --text-color: #f8fafc;
    --text-muted: #64748b;
    --text-gold: #fef08a;
    
    --danger: #ef4444;
    --success: #10b981;
    --info: #3b82f6;
    
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-glow: 0 0 25px rgba(var(--primary-rgb), 0.15);
}

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

body {
    background: var(--bg-dark);
    background-image: var(--bg-gradient);
    background-attachment: fixed;
    color: var(--text-color);
    font-family: var(--font-family);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: rgba(var(--primary-rgb), 0.15);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Layout Elements */
.app-container {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* Glass Panel Layout */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.8);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.02) 0%, rgba(var(--primary-rgb), 0) 100%);
    pointer-events: none;
}

.glass-panel:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-2px);
    box-shadow: 0 30px 50px -10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(var(--primary-rgb), 0.05);
}

/* Sidebar Styling */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    border-radius: 0;
    border-right: 1px solid var(--border-glass);
    background: rgba(7, 14, 27, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 35px 24px;
    border-bottom: 1px solid var(--border-glass);
}

.sidebar-header h2 {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header h2 span {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(var(--primary-rgb), 0.3);
}

.sidebar-header p {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-top: 5px;
    font-weight: 700;
    text-transform: uppercase;
}

.sidebar-nav {
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.sidebar-nav a i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
}

.sidebar-nav a:hover {
    color: #fff;
    background: rgba(var(--primary-rgb), 0.03);
    border-color: rgba(var(--primary-rgb), 0.1);
    padding-left: 20px;
}

.sidebar-nav a.active {
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    border-color: rgba(var(--primary-rgb), 0.25);
    box-shadow: inset 0 0 15px rgba(var(--primary-rgb), 0.05);
    position: relative;
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    width: 3px;
    height: 50%;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px var(--primary);
}

.sidebar-nav .public-link {
    margin-top: auto;
    border: 1px dashed var(--border-glass);
    color: var(--primary);
}

.sidebar-nav .public-link:hover {
    background: rgba(var(--primary-rgb), 0.06);
    color: var(--text-gold);
    border-color: var(--primary);
}

.sidebar-nav .logout-link {
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.15);
    background: rgba(239, 68, 68, 0.02);
}

.sidebar-nav .logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: #ff6b6b;
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 50px 60px;
    overflow-y: auto;
    max-height: 100vh;
}

.content-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
}

.content-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary);
}

.content-title h1 {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.5px;
}

.content-title p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

/* HUD & Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 30px;
    border-left: 4px solid var(--primary);
}

.stat-card.stat-danger { border-left-color: var(--danger); }
.stat-card.stat-success { border-left-color: var(--success); }
.stat-card.stat-info { border-left-color: var(--info); }

.stat-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.stat-value {
    font-size: 2.6rem;
    font-weight: 900;
    color: #fff;
    margin-top: 10px;
    line-height: 1;
}

.stat-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
}

/* Forms & Controls */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.form-control, input[type="text"], input[type="password"], input[type="number"], select, textarea {
    width: 100%;
    background: rgba(3, 7, 18, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 14px 18px;
    color: #fff;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
}

.form-control:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.1);
    background: rgba(3, 7, 18, 0.7);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23fbbf24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
    padding-right: 45px;
}

/* Buttons System */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-family);
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    color: var(--bg-dark);
    box-shadow: 0 10px 20px -5px rgba(var(--primary-rgb), 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(var(--primary-rgb), 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-glass-hover);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: #fff;
    box-shadow: 0 10px 20px -5px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(239, 68, 68, 0.45);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Custom Tactical Lists & Cards */
.rank-item, .personnel-card, .roster-row {
    background: rgba(7, 14, 27, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 16px 20px;
    transition: var(--transition);
}

.rank-item:hover, .personnel-card:hover, .roster-row:hover {
    border-color: var(--border-glass-hover);
    background: rgba(10, 17, 32, 0.6);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Table Style Improvements */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 15px;
    background: transparent;
    border-radius: 8px;
}

.table-responsive table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
}

.table-responsive th,
.table-responsive td {
    white-space: nowrap;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th {
    padding: 18px 24px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-glass);
}

td {
    padding: 18px 24px;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-color);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.005);
}

/* Custom Login Container (Tactical HUD) */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100vw;
    background-image: 
        linear-gradient(rgba(3, 7, 18, 0.75), rgba(3, 7, 18, 0.85)), 
        url('https://images.unsplash.com/photo-1616781296063-79d15024b423?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.login-bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.05) 0%, rgba(3, 7, 18, 0.95) 85%);
    z-index: 1;
}

.login-grid-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.007) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.007) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 2;
}

.login-scanline {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(255,255,255,0),
        rgba(255,255,255,0) 50%,
        rgba(var(--primary-rgb), 0.03) 50%,
        rgba(var(--primary-rgb), 0.03)
    );
    background-size: 100% 4px;
    z-index: 3;
    pointer-events: none;
}

.login-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.35;
    z-index: 4;
    animation: scanLineSweep 7s linear infinite;
    pointer-events: none;
}

@keyframes scanLineSweep {
    0% { top: -2%; }
    50% { top: 102%; }
    100% { top: -2%; }
}

.login-container {
    width: 100%;
    max-width: 440px;
    padding: 50px 40px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    background: rgba(10, 17, 32, 0.85);
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 4px;
    background: var(--primary);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3);
}

/* HUD Brackets */
.hud-bracket {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: var(--primary);
    border-style: solid;
    pointer-events: none;
    opacity: 0.7;
    transition: var(--transition);
}

.hud-bracket.top-left { top: 15px; left: 15px; border-width: 2px 0 0 2px; }
.hud-bracket.top-right { top: 15px; right: 15px; border-width: 2px 2px 0 0; }
.hud-bracket.bottom-left { bottom: 15px; left: 15px; border-width: 0 0 2px 2px; }
.hud-bracket.bottom-right { bottom: 15px; right: 15px; border-width: 0 2px 2px 0; }

.login-container:hover .hud-bracket {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(var(--primary-rgb), 0.35);
}

.login-logo {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo h2 {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: #fff;
}

.login-logo p {
    font-size: 0.75rem;
    color: var(--primary);
    letter-spacing: 6px;
    font-weight: 800;
    margin-top: 6px;
}

/* Tab Navigation for Settings Editor */
.tabs-header {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--border-glass);
    margin-bottom: 25px;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Alert Notifications */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ff6b6b;
    border-color: rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #51cf66;
    border-color: rgba(16, 185, 129, 0.2);
}

/* Custom design for roster tree views & cards */
.roster-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.roster-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.01), transparent);
    pointer-events: none;
}

.roster-card:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.roster-img-container {
    height: 140px;
    position: relative;
    background: rgba(3, 7, 18, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-glass);
}

.roster-avatar-fallback {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.roster-info {
    padding: 20px;
    text-align: center;
}

.roster-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.2px;
}

.roster-meta {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
}

.roster-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
}

/* Org Chart Hierarchy Tree Styling */
.tree-container {
    padding: 40px;
    background: rgba(3, 7, 18, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: auto;
    display: flex;
    justify-content: flex-start;
    min-height: 500px;
}

.tree {
    display: flex;
    justify-content: flex-start;
}

.tree ul {
    padding-top: 20px;
    position: relative;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.tree li {
    float: left;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 5px 0 5px;
    transition: var(--transition);
}

.tree li::before, .tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid rgba(var(--primary-rgb), 0.15);
    width: 50%;
    height: 20px;
}

.tree li::after {
    right: auto;
    left: 50%;
    border-left: 2px solid rgba(var(--primary-rgb), 0.15);
}

.tree li:only-child::after, .tree li:only-child::before {
    display: none;
}

.tree li:only-child {
    padding-top: 0;
}

.tree li:first-child::before, .tree li:last-child::after {
    border: 0 none;
}

.tree li:last-child::before {
    border-right: 2px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 0 8px 0 0;
}

.tree li:first-child::after {
    border-radius: 8px 0 0 0;
}

.tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 2px solid rgba(var(--primary-rgb), 0.15);
    width: 0;
    height: 20px;
}

.tree .org-item {
    border: 1px solid var(--border-glass);
    padding: 16px 22px;
    text-decoration: none;
    color: #fff;
    font-size: 0.95rem;
    display: inline-block;
    border-radius: 12px;
    transition: var(--transition);
    background: rgba(10, 17, 32, 0.9);
    min-width: 180px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    cursor: grab;
    position: relative;
    z-index: 10;
}

.tree .org-item:hover {
    background: rgba(15, 23, 42, 0.98);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.2);
    transform: translateY(-4px);
}

/* Shift Cell Styles */
.shift-cell {
    position: relative;
    height: 85px;
    vertical-align: middle;
    text-align: center;
    padding: 10px 8px !important;
    transition: var(--transition);
}

.time-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.time-separator {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
}

.shift-input {
    width: 44px !important;
    padding: 6px 2px !important;
    font-size: 0.85rem !important;
    text-align: center;
    background: rgba(3, 7, 18, 0.6) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 6px !important;
    color: #fff !important;
    font-family: monospace;
    margin: 0 !important;
}

.shift-input:focus {
    border-color: var(--primary) !important;
    background: rgba(3, 7, 18, 0.85) !important;
}

/* Hide spin buttons for inputs */
.shift-input::-webkit-outer-spin-button,
.shift-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.shift-input {
    -moz-appearance: textfield;
}

.excused-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--info);
    letter-spacing: 1.5px;
    text-align: center;
    margin-top: 5px;
}

.shift-status-badge {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    color: white;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.btn-excused-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition);
}

.btn-excused-toggle:hover {
    background: rgba(var(--primary-rgb), 0.2);
    border-color: var(--primary);
}

.excused-toggle-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.3;
    transition: var(--transition);
}

.btn-excused-toggle:hover .excused-toggle-dot {
    opacity: 1;
}

/* Shift Status Backgrounds */
.status-blue {
    background: rgba(59, 130, 246, 0.08) !important;
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
}

.status-purple {
    background: rgba(168, 85, 247, 0.08) !important;
    border: 1px solid rgba(168, 85, 247, 0.15) !important;
}

.status-green {
    background: rgba(16, 185, 129, 0.08) !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
}

.status-orange {
    background: rgba(245, 158, 11, 0.08) !important;
    border: 1px solid rgba(245, 158, 11, 0.15) !important;
}

.status-red {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
}

.status-grey {
    background: rgba(156, 163, 175, 0.08) !important;
    border: 1px solid rgba(156, 163, 175, 0.15) !important;
}

/* Topbar HUD and Sidebar Ergonomic Badges */
.top-hud {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    margin-bottom: 40px;
    border-radius: 12px;
}

.top-hud-item {
    display: flex;
    align-items: center;
}

.top-hud-item i {
    color: var(--primary);
}

.nav-badge {
    margin-left: auto;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 900;
    font-family: monospace;
}

.badge-pending {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--danger);
    color: #ff6b6b;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
    box-shadow: 0 0 10px var(--success);
    animation: pulseDot 1.5s infinite ease-in-out;
}

@keyframes pulseDot {
    0% { transform: scale(0.85); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.85); opacity: 0.6; }
}

/* Quick Search Bar Ergonomics */
.quick-search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(3, 7, 18, 0.45);
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    transition: var(--transition);
    max-width: 320px;
    width: 100%;
}

.quick-search-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.1);
}

.quick-search-input {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 0.9rem !important;
    color: #fff !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Sidebar Dropdown Accordion Menu */
.sidebar-dropdown {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.dropdown-btn span {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-btn i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
}

.dropdown-btn:hover {
    color: #fff;
    background: rgba(var(--primary-rgb), 0.03);
    border-color: rgba(var(--primary-rgb), 0.1);
}

.dropdown-btn.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.05);
}

.dropdown-arrow {
    font-size: 0.75rem !important;
    transition: transform 0.3s ease;
}

.sidebar-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-container {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding-left: 12px;
    margin-top: 4px;
    border-left: 1px dashed rgba(255, 255, 255, 0.08);
    margin-left: 24px;
}

.sidebar-dropdown.open .dropdown-container {
    display: flex;
}

.dropdown-container a {
    font-size: 0.85rem !important;
    padding: 10px 14px !important;
}

/* =============================================
   Performance Grid (30-Box +/- Tracker)
   ============================================= */

/* Each personnel row */
.perf-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}
.perf-row:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

/* Row header (name + score) */
.perf-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}
.perf-person-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Score badges container */
.perf-score-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}
.perf-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.78rem;
    font-family: monospace;
    border: 1px solid transparent;
}
.perf-stat-good {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}
.perf-stat-good i { font-size: 0.6rem; }
.perf-stat-bad {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}
.perf-stat-bad i { font-size: 0.6rem; }
.perf-stat-total {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    font-weight: 900;
    font-size: 0.85rem;
    min-width: 30px;
    text-align: center;
    justify-content: center;
}

/* The 31 boxes grid */
.perf-boxes-grid {
    display: grid;
    grid-template-columns: repeat(31, minmax(26px, 1fr));
    gap: 5px;
}

@media (max-width: 1200px) {
    .perf-boxes-grid {
        grid-template-columns: repeat(15, minmax(26px, 1fr));
    }
}
@media (max-width: 768px) {
    .perf-boxes-grid {
        grid-template-columns: repeat(10, minmax(26px, 1fr));
    }
}

/* Individual box */
.perf-box {
    aspect-ratio: 1;
    min-width: 26px;
    min-height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.15);
    user-select: none;
    position: relative;
}
.perf-box:hover {
    border-color: rgba(var(--primary-rgb), 0.4);
    background: rgba(var(--primary-rgb), 0.06);
    color: rgba(var(--primary-rgb), 0.8);
    transform: scale(1.18);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
}
.perf-box:hover .hover-icon {
    opacity: 0.65 !important;
}

/* Good (+) */
.perf-box-green {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
    color: #10b981 !important;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
}
.perf-box-green:hover {
    background: rgba(16, 185, 129, 0.3) !important;
    border-color: #34d399 !important;
    color: #34d399 !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

/* Bad (−) */
.perf-box-red {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}
.perf-box-red:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    border-color: #f87171 !important;
    color: #f87171 !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
}

/* Right-Click Context Menu */
.perf-context-menu {
    position: absolute;
    z-index: 99999;
    min-width: 170px;
    background: rgba(15, 20, 35, 0.98);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.06);
    animation: ctxMenuIn 0.15s ease;
}

@keyframes ctxMenuIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.perf-ctx-header {
    padding: 8px 12px 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 700;
}

.perf-ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.12s ease;
}
.perf-ctx-item:hover {
    background: rgba(255, 255, 255, 0.08);
}
.perf-ctx-good i {
    color: #10b981;
}
.perf-ctx-good:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.perf-ctx-bad i {
    color: #ef4444;
}
.perf-ctx-bad:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.perf-ctx-clear i {
    color: var(--text-muted);
}
.perf-ctx-clear:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
}

.perf-ctx-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

/* Score badges container */
.perf-score-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}
.perf-stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.78rem;
    font-family: monospace;
    border: 1px solid transparent;
}
.perf-stat-good {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}
.perf-stat-good i { font-size: 0.6rem; }
.perf-stat-bad {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}
.perf-stat-bad i { font-size: 0.6rem; }
.perf-stat-total {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    font-weight: 900;
    font-size: 0.85rem;
    min-width: 30px;
    text-align: center;
    justify-content: center;
}

/* The 31 boxes grid */
.perf-boxes-grid {
    display: grid;
    grid-template-columns: repeat(31, minmax(26px, 1fr));
    gap: 5px;
}

@media (max-width: 1200px) {
    .perf-boxes-grid {
        grid-template-columns: repeat(15, minmax(26px, 1fr));
    }
}
@media (max-width: 768px) {
    .perf-boxes-grid {
        grid-template-columns: repeat(10, minmax(26px, 1fr));
    }
}

/* Individual box */
.perf-box {
    aspect-ratio: 1;
    min-width: 26px;
    min-height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: rgba(255, 255, 255, 0.15);
    user-select: none;
    position: relative;
}
.perf-box:hover {
    border-color: rgba(var(--primary-rgb), 0.4);
    background: rgba(var(--primary-rgb), 0.06);
    color: rgba(var(--primary-rgb), 0.8);
    transform: scale(1.18);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.15);
}
.perf-box:hover .hover-icon {
    opacity: 0.65 !important;
}

/* Good (+) */
.perf-box-green {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: #10b981 !important;
    color: #10b981 !important;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.15);
}
.perf-box-green:hover {
    background: rgba(16, 185, 129, 0.3) !important;
    border-color: #34d399 !important;
    color: #34d399 !important;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.35);
}

/* Bad (−) */
.perf-box-red {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: #ef4444 !important;
    color: #ef4444 !important;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.15);
}
.perf-box-red:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    border-color: #f87171 !important;
    color: #f87171 !important;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.35);
}

/* Right-Click Context Menu */
.perf-context-menu {
    position: absolute;
    z-index: 99999;
    min-width: 170px;
    background: rgba(15, 20, 35, 0.98);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255,255,255,0.06);
    animation: ctxMenuIn 0.15s ease;
}

@keyframes ctxMenuIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-6px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.perf-ctx-header {
    padding: 8px 12px 6px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    font-weight: 700;
}

.perf-ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.12s ease;
}
.perf-ctx-item:hover {
    background: rgba(255, 255, 255, 0.08);
}
.perf-ctx-good i {
    color: #10b981;
}
.perf-ctx-good:hover {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.perf-ctx-bad i {
    color: #ef4444;
}
.perf-ctx-bad:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.perf-ctx-clear i {
    color: var(--text-muted);
}
.perf-ctx-clear:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #94a3b8;
}

.perf-ctx-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 8px;
}

/* =============================================
   Mobile Responsive Adjustments
   ============================================= */
@media (max-width: 992px) {
    body {
        overflow-x: hidden;
        width: 100%;
    }

    .app-container {
        flex-direction: column !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    .sidebar {
        position: fixed !important;
        left: -300px !important;
        top: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        z-index: 10000 !important;
        border-radius: 0 !important;
        box-shadow: 5px 0 30px rgba(0,0,0,0.7) !important;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        overflow-y: auto !important;
    }

    .sidebar.open {
        transform: translateX(300px) !important;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.65);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 9999;
    }

    .sidebar-backdrop.active {
        display: block !important;
    }

    .main-content {
        padding: 15px 12px !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        max-height: none !important;
        overflow-y: visible !important;
    }

    /* Top HUD: row on tablet, compact */
    .top-hud {
        padding: 12px 14px !important;
        margin-bottom: 16px !important;
        flex-wrap: wrap !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        justify-content: flex-start !important;
    }

    .top-hud > div[style] {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    /* Mobile menu toggle */
    .mobile-menu-toggle {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 8px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid var(--border-glass) !important;
        color: #fff !important;
        cursor: pointer !important;
        outline: none !important;
        flex-shrink: 0 !important;
    }

    .mobile-menu-toggle:hover {
        background: rgba(var(--primary-rgb), 0.1) !important;
        border-color: var(--primary) !important;
    }

    .top-hud-item.connection-info {
        margin-right: auto !important;
    }

    /* Tables: horizontally scrollable */
    .glass-panel {
        overflow-x: auto !important;
    }

    table {
        min-width: 550px !important;
    }

    /* Grids */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Perf boxes */
    .perf-boxes-grid {
        grid-template-columns: repeat(7, minmax(28px, 1fr)) !important;
        gap: 4px !important;
    }

    .perf-box {
        min-width: 28px !important;
        min-height: 28px !important;
    }
}

<<<<<<< HEAD
/* =============================================
   Tablet Refined: 768px and below
   ============================================= */
@media (max-width: 768px) {

    /* Content Header */
    .content-header {
        margin-bottom: 20px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .content-title h1 {
        font-size: 1.5rem !important;
    }

    /* Stats grid: single col on small */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .stat-card {
        padding: 18px !important;
    }

    .stat-value {
        font-size: 1.9rem !important;
    }

    /* Top HUD: very compact */
    .top-hud {
        padding: 10px 12px !important;
        gap: 6px !important;
    }

    /* Table */
    th, td {
        padding: 11px 12px !important;
        font-size: 0.82rem !important;
        white-space: nowrap !important;
    }

    /* Buttons */
    .btn {
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
        gap: 7px !important;
    }

    /* Form inputs: prevent zoom on iOS */
    .form-control,
    input[type="text"],
    input[type="password"],
    input[type="number"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px !important;
        padding: 12px 14px !important;
    }

    /* Tabs: horizontal scroll */
    .tabs-header {
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        gap: 4px !important;
        padding-bottom: 8px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .tab-btn {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        padding: 9px 13px !important;
        font-size: 0.82rem !important;
    }

    /* Quick search: full width */
    .quick-search-wrapper {
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Tree/org chart */
    .tree-container {
        padding: 16px !important;
        overflow-x: auto !important;
    }

    /* Login page */
    .login-container {
        padding: 28px 18px !important;
        margin: 12px !important;
    }

    /* Shift inputs stay compact */
    .shift-input {
        width: 36px !important;
        font-size: 0.78rem !important;
    }

    /* Glass panel padding */
    .glass-panel {
        padding: 16px !important;
    }

    /* Perf boxes: 6 columns */
    .perf-boxes-grid {
        grid-template-columns: repeat(6, minmax(28px, 1fr)) !important;
    }
}

/* =============================================
   Small Mobile: 480px and below
   ============================================= */
@media (max-width: 480px) {

    .main-content {
        padding: 10px 8px !important;
    }

    /* Stats: full single column */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }

    .stat-card {
        padding: 14px !important;
    }

    .stat-value {
        font-size: 1.6rem !important;
    }

    /* Content title */
    .content-title h1 {
        font-size: 1.2rem !important;
    }

    .content-title p {
        font-size: 0.8rem !important;
    }

    /* Top HUD: minimal, 2-col wrap */
    .top-hud {
        padding: 8px !important;
        border-radius: 8px !important;
        gap: 6px !important;
    }

    /* HUD items text smaller */
    .top-hud-item span {
        font-size: 0.68rem !important;
    }

    .top-hud-item strong {
        font-size: 0.78rem !important;
    }

    /* Tables */
    th, td {
        padding: 8px 10px !important;
        font-size: 0.75rem !important;
    }

    /* Perf boxes: 5 per row */
    .perf-boxes-grid {
        grid-template-columns: repeat(5, minmax(24px, 1fr)) !important;
        gap: 3px !important;
    }

    .perf-box {
        min-width: 24px !important;
        min-height: 24px !important;
    }

    /* Buttons */
    .btn {
        padding: 9px 14px !important;
        font-size: 0.82rem !important;
    }

    /* Glass panel */
    .glass-panel {
        border-radius: 8px !important;
        padding: 10px !important;
    }

    /* Login */
    .login-container {
        padding: 20px 14px !important;
        padding: 20px 15px !important;
        width: 100% !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    .top-hud {
        padding: 12px 15px !important;
        margin-bottom: 20px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        justify-content: flex-start !important;
    }
    
    .mobile-menu-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid var(--border-glass) !important;
        color: #fff !important;
        cursor: pointer;
        outline: none;
    }
    
    .mobile-menu-toggle:hover {
        background: rgba(var(--primary-rgb), 0.1) !important;
        border-color: var(--primary) !important;
    }
    
    .top-hud-item.connection-info {
        margin-right: auto !important;
    }

    /* Grid layouts responsive */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Sidebar dropdown indent */
    .dropdown-container {
        margin-left: 14px !important;
    }
}

/* Tree and Login Responsiveness */
@media (max-width: 768px) {
    .tree-container {
        padding: 15px !important;
        min-height: auto !important;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px !important;
        margin: 0 15px !important;
        max-width: calc(100% - 30px) !important;
    }
}

/* WYSIWYG Editor Styles & Rendered Elements */
.rich-editor-area h1 { font-size: 2rem; font-weight: 900; margin: 1.5rem 0 0.75rem; color: #fff; }
.rich-editor-area h2 { font-size: 1.5rem; font-weight: 800; margin: 1.25rem 0 0.5rem; color: #fff; }
.rich-editor-area h3 { font-size: 1.25rem; font-weight: 700; margin: 1rem 0 0.5rem; color: #fff; }
.rich-editor-area h4 { font-size: 1.1rem; font-weight: 600; margin: 0.75rem 0 0.5rem; color: #fff; }
.rich-editor-area p { margin-bottom: 1rem; }
.rich-editor-area ul { list-style-type: disc; margin-left: 1.5rem; margin-bottom: 1rem; }
.rich-editor-area ol { list-style-type: decimal; margin-left: 1.5rem; margin-bottom: 1rem; }
.rich-editor-area li { margin-bottom: 0.25rem; }
.rich-editor-area a { color: #818cf8; text-decoration: underline; }
.rich-editor-area img { max-width: 100%; height: auto; border-radius: 0.75rem; margin: 1rem 0; display: block; }
.rich-editor-area pre { background: #0f172a; color: #34d399; padding: 1rem; border-radius: 0.75rem; overflow-x: auto; margin: 1rem 0; font-family: monospace; }
.rich-editor-area code { background: rgba(0,0,0,0.3); padding: 2px 6px; border-radius: 4px; font-family: monospace; }

/* Custom Quotes in Editor */
.rich-editor-area blockquote.editor-quote-modern {
    border-left: 4px solid #818cf8;
    background: rgba(129, 140, 248, 0.05);
    padding: 1rem 1.25rem;
    border-radius: 0 0.75rem 0.75rem 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: #e2e8f0;
}
.rich-editor-area blockquote.editor-quote-elegant {
    border-left: 4px solid #10b981;
    background: rgba(16, 185, 129, 0.05);
    padding: 1rem 1.25rem;
    border-radius: 0 0.75rem 0.75rem 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: #e2e8f0;
}
.rich-editor-area blockquote.editor-quote-minimal {
    border-left: 3px dashed rgba(255,255,255,0.15);
    padding: 0.75rem 1rem;
    margin: 1.25rem 0;
    color: #94a3b8;
}
.rich-editor-area blockquote.editor-quote-bold {
    border-left: 6px solid var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    color: #fff;
    font-weight: 600;
}
.rich-editor-area blockquote.editor-quote-neon {
    border-left: 4px solid #06b6d4;
    background: rgba(6, 182, 212, 0.04);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.1);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    color: #e2e8f0;
}
.rich-editor-area blockquote.editor-quote-paper {
    background: #334155;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    color: #f1f5f9;
}
.rich-editor-area blockquote.editor-quote-speech {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    color: #cbd5e1;
}
.rich-editor-area blockquote.editor-quote-highlight {
    background: rgba(250, 204, 21, 0.08);
    border-left: 4px solid #facc15;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    color: #fef08a;
}

/* Custom HR Lines */
.rich-editor-area hr.solid-hr { border: none; border-top: 2px solid rgba(255,255,255,0.1); margin: 2rem 0; }
.rich-editor-area hr.dashed-hr { border: none; border-top: 2px dashed rgba(255,255,255,0.1); margin: 2rem 0; }
.rich-editor-area hr.dotted-hr { border: none; border-top: 2px dotted rgba(255,255,255,0.1); margin: 2rem 0; }
.rich-editor-area .gradient-hr { height: 4px; background: linear-gradient(to right, var(--primary), #ec4899, #ef4444); border-radius: 2px; margin: 2rem 0; }
.rich-editor-area .fancy-hr { text-align: center; color: rgba(255,255,255,0.3); font-size: 1.25rem; letter-spacing: 0.5rem; margin: 2rem 0; }

/* Custom Tables */
.rich-editor-area table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.rich-editor-area table th, .rich-editor-area table td { border: 1px solid rgba(255, 255, 255, 0.1); padding: 0.75rem; }
.rich-editor-area table th { background: rgba(255,255,255,0.05); font-weight: 700; color: #fff; }

.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}
.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Global utility class for hiding elements */
.hidden {
    display: none !important;
}
