/* ==========================================================================
   CronMaster Design System & Stylesheet
   Dark Glassmorphism UI with Vibrant Accents & High-Performance Typography
   ========================================================================== */

:root {
    --bg-main: #090c15;
    --bg-surface: rgba(18, 24, 38, 0.72);
    --bg-surface-elevated: rgba(28, 36, 56, 0.85);
    --bg-input: rgba(13, 17, 28, 0.8);

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(0, 242, 254, 0.5);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-cyan: #00f2fe;
    --accent-blue: #3b82f6;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;
    --accent-purple: #8b5cf6;

    --font-sans: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Outfit', 'Vazirmatn', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-full: 9999px;

    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 20px rgba(0, 242, 254, 0.25);
    --transition-smooth: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
}

/* Ambient Ambient Background Lights */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.18;
    animation: float 20s infinite alternate ease-in-out;
}

.glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-cyan), var(--accent-blue));
    top: -150px;
    left: -100px;
}

.glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-purple), var(--accent-rose));
    bottom: -100px;
    right: -100px;
    animation-delay: -7s;
}

.glow-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--accent-emerald), var(--accent-cyan));
    top: 40%;
    right: 30%;
    opacity: 0.1;
    animation-delay: -14s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 40px) scale(1.1); }
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
}

/* ================= Navbar ================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(9, 12, 21, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.85rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface-elevated);
    border-color: rgba(255, 255, 255, 0.15);
}

.nav-btn.logout:hover {
    color: var(--accent-rose);
    border-color: rgba(244, 63, 94, 0.4);
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--border-subtle);
    margin: 0 0.25rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    font-size: 0.825rem;
    color: var(--text-secondary);
}

.status-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-emerald);
    box-shadow: 0 0 10px var(--accent-emerald);
    animation: pulseGlow 2s infinite;
}

.status-pulse.small {
    width: 6px;
    height: 6px;
}

@keyframes pulseGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

/* ================= Main Layout ================= */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.75rem 4rem;
}

/* ================= Statistics Grid ================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: var(--card-accent, var(--accent-cyan));
    opacity: 0.8;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--card-accent, var(--accent-cyan));
}

.stat-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.stat-sub {
    font-size: 0.775rem;
    color: var(--text-muted);
}

/* Color Classes */
.text-success { color: var(--accent-emerald) !important; }
.text-danger { color: var(--accent-rose) !important; }
.text-info { color: var(--accent-blue) !important; }
.text-warning { color: var(--accent-amber) !important; }
.text-muted { color: var(--text-muted); }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-paused {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

.badge-neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

/* ================= Toolbar Section ================= */
.toolbar-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 280px;
    max-width: 480px;
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.65rem 2.75rem 0.65rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition-smooth);
}

.search-box input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.12);
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ================= Buttons ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    outline: none;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

.btn-secondary {
    background: var(--bg-surface-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

.select-styled {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0.65rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
}

.select-styled:focus {
    border-color: var(--border-focus);
}

/* ================= Jobs Table ================= */
.table-wrapper {
    overflow-x: auto;
}

.jobs-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
    font-size: 0.875rem;
}

.jobs-table th {
    padding: 1.1rem 1.25rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
}

.jobs-table td {
    padding: 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.job-row {
    transition: var(--transition-smooth);
}

.job-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

/* Method Badges */
.method-badge {
    display: inline-block;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.5px;
}

.method-get { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.method-post { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.method-put { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.method-patch { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.method-delete { background: rgba(244, 63, 94, 0.15); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.3); }
.method-head { background: rgba(100, 116, 139, 0.15); color: #94a3b8; border: 1px solid rgba(100, 116, 139, 0.3); }

/* Job Details Cell */
.job-header-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.job-title {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.job-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.job-url-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.url-text {
    font-family: var(--font-mono);
    font-size: 0.775rem;
    color: var(--text-secondary);
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    direction: ltr;
}

.btn-copy-url {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px;
    border-radius: 4px;
    transition: var(--transition-smooth);
}

.btn-copy-url:hover {
    color: var(--accent-cyan);
}

/* Cron Cell */
.cron-badge code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 242, 254, 0.2);
}

.cron-human {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Next Run Cell */
.next-run-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.825rem;
    color: var(--text-secondary);
}

.pulse-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 6px var(--accent-cyan);
}

/* Status Cell */
.status-summary {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-dot.success { background: var(--accent-emerald); box-shadow: 0 0 6px var(--accent-emerald); }
.status-dot.failed { background: var(--accent-rose); box-shadow: 0 0 6px var(--accent-rose); }
.status-dot.timeout { background: var(--accent-amber); box-shadow: 0 0 6px var(--accent-amber); }

.status-summary.status-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-emerald);
}

.status-summary.status-failed {
    background: rgba(244, 63, 94, 0.1);
    color: var(--accent-rose);
}

.status-summary.status-timeout {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-amber);
}

.duration-tag {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.time-ago {
    font-size: 0.725rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Actions Group */
.action-buttons-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-surface-elevated);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-action:hover {
    transform: translateY(-2px);
    color: #fff;
}

.btn-action.run-btn:hover { background: rgba(0, 242, 254, 0.2); border-color: var(--accent-cyan); color: var(--accent-cyan); }
.btn-action.toggle-btn:hover { background: rgba(245, 158, 11, 0.2); border-color: var(--accent-amber); color: var(--accent-amber); }
.btn-action.logs-btn:hover { background: rgba(59, 130, 246, 0.2); border-color: var(--accent-blue); color: var(--accent-blue); }
.btn-action.edit-btn:hover { background: rgba(139, 92, 246, 0.2); border-color: var(--accent-purple); color: var(--accent-purple); }
.btn-action.delete-btn:hover { background: rgba(244, 63, 94, 0.2); border-color: var(--accent-rose); color: var(--accent-rose); }

/* Empty State */
.empty-state {
    padding: 4rem 2rem;
    text-align: center;
}

.empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* ================= Modals ================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-card {
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-card.modal-lg {
    max-width: 900px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-heading {
    font-size: 1.15rem;
    font-weight: 600;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    color: var(--accent-rose);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 0, 0, 0.2);
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 1rem;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-center { display: flex; align-items: center; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group label {
    font-size: 0.825rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.65rem 0.85rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group textarea {
    font-family: var(--font-mono);
    font-size: 0.825rem;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.12);
}

/* Cron Box Inside Modal */
.cron-section-box {
    background: rgba(0, 242, 254, 0.03);
    border: 1px solid rgba(0, 242, 254, 0.15);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.cron-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cron-preview-badge {
    font-size: 0.775rem;
    color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.15);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.cron-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

.preset-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.preset-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 0.725rem;
    padding: 0.2rem 0.55rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.preset-pill:hover {
    color: var(--accent-cyan);
    border-color: rgba(0, 242, 254, 0.3);
    background: rgba(0, 242, 254, 0.08);
}

/* Advanced Options Accordion */
.accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.825rem;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

.accordion-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.advanced-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-top: 0.5rem;
}

.advanced-panel.hidden {
    display: none;
}

/* Switch */
.switch-container {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    user-select: none;
    margin-top: 1.5rem;
}

.switch-container input {
    display: none;
}

.switch-slider {
    width: 40px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    position: relative;
    transition: var(--transition-smooth);
}

.switch-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    right: 3px;
    transition: var(--transition-smooth);
}

.switch-container input:checked + .switch-slider {
    background: var(--accent-emerald);
}

.switch-container input:checked + .switch-slider::before {
    transform: translateX(-18px);
}

.switch-text {
    font-size: 0.825rem;
    color: var(--text-primary);
}

/* ================= Logs Drawer / Modal ================= */
.logs-modal-body {
    display: flex;
    flex-direction: row;
    height: 480px;
    padding: 0;
    gap: 0;
}

.logs-sidebar {
    width: 320px;
    border-left: 1px solid var(--border-subtle);
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.15);
}

.log-item-row {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.log-item-row:hover,
.log-item-row.active {
    background: rgba(255, 255, 255, 0.05);
}

.log-item-row.active {
    border-right: 3px solid var(--accent-cyan);
}

.logs-detail-pane {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.logs-empty-select {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.response-box {
    background: #060910;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #cbd5e1;
    max-height: 250px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-all;
    direction: ltr;
}

/* ================= API Modal ================= */
.key-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent-cyan);
}

.code-example-block {
    background: #070a12;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.btn-copy-mini {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 0.75rem;
    cursor: pointer;
}

.code-example-block pre {
    padding: 0.85rem;
    margin: 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 0.775rem;
    color: #e2e8f0;
    line-height: 1.5;
}

/* ================= Toast Notification ================= */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    min-width: 280px;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-md);
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn 0.3s forwards ease;
}

@keyframes toastIn {
    to { transform: translateY(0); opacity: 1; }
}

.toast.toast-success { border-color: rgba(16, 185, 129, 0.5); }
.toast.toast-error { border-color: rgba(244, 63, 94, 0.5); }
.toast.toast-info { border-color: rgba(0, 242, 254, 0.5); }

/* ================= Login Page Styles ================= */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
}

.login-card {
    width: 100%;
    max-width: 440px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue), var(--accent-purple));
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(59, 130, 246, 0.15));
    border: 1px solid rgba(0, 242, 254, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--accent-cyan);
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.2);
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper .input-icon {
    position: absolute;
    right: 12px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding-right: 2.75rem !important;
}

.btn-toggle-pass {
    position: absolute;
    left: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
}

.btn-toggle-pass:hover {
    color: var(--text-primary);
}

.login-footer {
    margin-top: 1.75rem;
    text-align: center;
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.775rem;
    color: var(--text-muted);
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.alert-error {
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: #fca5a5;
}

/* Spinner */
.spin {
    animation: spinAround 1s infinite linear;
}

@keyframes spinAround {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar-container { padding: 0.75rem 1rem; }
    .main-content { padding: 1.25rem 1rem 3rem; }
    .form-row { flex-direction: column; }
    .logs-modal-body { flex-direction: column; height: 500px; }
    .logs-sidebar { width: 100%; height: 180px; border-left: none; border-bottom: 1px solid var(--border-subtle); }
    .toolbar-section { flex-direction: column; align-items: stretch; }
    .search-box { max-width: 100%; }
    .filter-controls { justify-content: space-between; }
}
