/* ===================================
   PROXMOX DASHBOARD DOCUMENTATION
   Premium Dark Mode Theme
   =================================== */

:root {
    /* Dark Mode Colors - Improved Contrast */
    --bg-primary: #0a0e14;
    --bg-secondary: #151a21;
    --bg-tertiary: #1f2633;
    --bg-hover: #2a3241;
    --bg-card: #1a1f2e;

    /* Text Colors - High Contrast */
    --text-primary: #f0f6fc;
    --text-secondary: #c9d1d9;
    --text-muted: #8b949e;
    --text-bright: #ffffff;

    /* Accent Colors - Vibrant */
    --accent-blue: #58a6ff;
    --accent-green: #3fb950;
    --accent-purple: #bc8cff;
    --accent-orange: #ff9f40;
    --accent-red: #ff7b72;
    --accent-yellow: #ffd33d;
    --accent-cyan: #56d4dd;

    /* Border Colors */
    --border-default: #30363d;
    --border-bright: #484f58;
    --border-muted: #21262d;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.8);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

/* ===================================
   SIDEBAR STYLES
   =================================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-default);
    padding: 24px 16px;
    overflow-y: auto;
    z-index: 100;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-default);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--border-bright);
}

.sidebar h4 {
    color: var(--text-bright);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-blue);
}

.sidebar .nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar .nav-link {
    color: var(--text-secondary);
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 10px;
    color: var(--text-muted);
}

.sidebar .nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-bright);
}

.sidebar .nav-link:hover i {
    color: var(--accent-blue);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: var(--text-bright);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.sidebar .nav-link.active i {
    color: var(--text-bright);
}

/* ===================================
   MAIN CONTENT STYLES
   =================================== */

.content {
    margin-left: 280px;
    padding: 48px;
    max-width: 1400px;
}

h1 {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}

h1 i {
    color: var(--accent-blue);
    font-size: 36px;
}

h2 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-bright);
    margin-top: 56px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-bright);
}

h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-bright);
    margin-top: 32px;
    margin-bottom: 16px;
}

h4,
h5,
h6 {
    color: var(--text-bright);
    margin-top: 24px;
    margin-bottom: 12px;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-size: 16px;
    line-height: 1.8;
}

.lead {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-cyan);
    text-decoration: underline;
}

ul,
ol {
    margin-left: 24px;
    margin-bottom: 16px;
    color: var(--text-secondary);
}

li {
    margin-bottom: 8px;
    line-height: 1.7;
}

strong,
b {
    color: var(--text-bright);
    font-weight: 600;
}

/* ===================================
   CARD STYLES
   =================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--border-bright);
    transform: translateY(-2px);
}

.card-header {
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-default);
    padding: 20px 24px;
}

.card-header h5 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-bright);
}

.card-header.bg-primary {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    border-bottom: none;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #047857, #10b981);
    border-bottom: none;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #b45309, #f59e0b);
    border-bottom: none;
}

.card-header.bg-danger {
    background: linear-gradient(135deg, #b91c1c, #ef4444);
    border-bottom: none;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #0369a1, #0ea5e9);
    border-bottom: none;
}

.card-body {
    padding: 24px;
}

.card-body ul {
    margin-left: 20px;
    color: var(--text-secondary);
}

.card-body li {
    margin-bottom: 10px;
}

/* ===================================
   FEATURE CARDS
   =================================== */

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-blue);
    background: var(--bg-tertiary);
}

.feature-card i {
    font-size: 56px;
    margin-bottom: 20px;
    color: var(--accent-blue);
}

.feature-card h5 {
    color: var(--text-bright);
    font-size: 22px;
    font-weight: 600;
    margin: 16px 0;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #7c3aed 50%, #ec4899 100%);
    color: #ffffff;
    padding: 72px 56px;
    border-radius: 16px;
    margin-bottom: 56px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.hero h1 {
    color: #ffffff;
    font-size: 48px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.hero .lead {
    color: rgba(255, 255, 255, 0.95);
    font-size: 22px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.hero p {
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 1;
}

/* ===================================
   CODE BLOCKS
   =================================== */

code {
    background: var(--bg-tertiary);
    color: var(--accent-orange);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    font-size: 14px;
    border: 1px solid var(--border-default);
    font-weight: 500;
}

pre {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    border-radius: 10px;
    padding: 24px;
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

pre code {
    background: transparent;
    color: var(--text-primary);
    padding: 0;
    border: none;
    font-size: 14px;
    line-height: 1.7;
}

/* ===================================
   TABLES - IMPROVED DARK MODE
   =================================== */

.table-responsive {
    overflow-x: auto;
    margin: 24px 0;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

table,
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-default);
}

table thead,
.table thead {
    background: var(--bg-tertiary);
}

table thead th,
.table thead th {
    color: var(--text-bright);
    font-weight: 600;
    padding: 18px 20px;
    text-align: left;
    border-bottom: 2px solid var(--border-bright);
    font-size: 15px;
}

table tbody tr,
.table tbody tr {
    border-bottom: 1px solid var(--border-default);
    transition: all 0.2s ease;
}

table tbody tr:last-child,
.table tbody tr:last-child {
    border-bottom: none;
}

table tbody tr:hover,
.table tbody tr:hover {
    background: var(--bg-hover);
}

table tbody td,
.table tbody td {
    padding: 16px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

table tbody td code,
.table tbody td code {
    font-size: 13px;
}

.table-dark {
    background: var(--bg-tertiary);
}

.table-striped tbody tr:nth-child(odd) {
    background: var(--bg-card);
}

.table-striped tbody tr:nth-child(even) {
    background: var(--bg-secondary);
}

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

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--accent-blue);
    color: #000;
}

.badge-success {
    background: var(--accent-green);
    color: #000;
}

.badge-warning {
    background: var(--accent-yellow);
    color: #000;
}

.badge-danger {
    background: var(--accent-red);
    color: #fff;
}

.badge-info {
    background: var(--accent-cyan);
    color: #000;
}

.badge-secondary {
    background: var(--text-muted);
    color: #fff;
}

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

.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-info {
    background: rgba(88, 166, 255, 0.15);
    border-left-color: var(--accent-blue);
    color: var(--text-primary);
}

.alert-success {
    background: rgba(63, 185, 80, 0.15);
    border-left-color: var(--accent-green);
    color: var(--text-primary);
}

.alert-warning {
    background: rgba(255, 211, 61, 0.15);
    border-left-color: var(--accent-yellow);
    color: var(--text-primary);
}

.alert-danger {
    background: rgba(255, 123, 114, 0.15);
    border-left-color: var(--accent-red);
    color: var(--text-primary);
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-blue);
    color: #000;
}

.btn-primary:hover {
    background: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--accent-green);
    color: #000;
}

.btn-success:hover {
    background: #4ade80;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ===================================
   GRID SYSTEM
   =================================== */

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 12px;
    margin-bottom: 24px;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 12px;
    margin-bottom: 24px;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 12px;
    margin-bottom: 24px;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid var(--border-default);
    }

    .content {
        margin-left: 0;
        padding: 24px;
    }

    .hero {
        padding: 40px 24px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .col-md-4,
    .col-md-6,
    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--accent-blue) !important;
}

.text-success {
    color: var(--accent-green) !important;
}

.text-warning {
    color: var(--accent-yellow) !important;
}

.text-danger {
    color: var(--accent-red) !important;
}

.mb-3 {
    margin-bottom: 16px;
}

.mb-4 {
    margin-bottom: 24px;
}

.mt-4 {
    margin-top: 24px;
}