/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

:root {
    --bg-primary: #0b0f19;
    --bg-secondary: #121826;
    --card-bg: rgba(18, 24, 38, 0.65);
    --card-border: rgba(255, 255, 255, 0.06);
    --accent-cyan: #06b6d4;
    --accent-cyan-glow: rgba(6, 182, 212, 0.3);
    --accent-purple: #a855f7;
    --accent-purple-glow: rgba(168, 85, 247, 0.3);
    --accent-orange: #f97316;
    --accent-orange-glow: rgba(249, 115, 22, 0.3);
    --accent-green: #10b981;
    --accent-green-glow: rgba(16, 185, 129, 0.3);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.2);
    --sidebar-width: 260px;
    --transition-speed: 0.3s;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Glowing Background Blobs */
.blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.25;
    pointer-events: none;
    transition: all 1s ease-in-out;
}
.blob-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 80%);
    top: -100px;
    right: -100px;
}
.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-purple) 0%, transparent 80%);
    bottom: -150px;
    left: -150px;
}
.blob-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent-orange) 0%, transparent 80%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.08;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease, border-color var(--transition-speed) ease;
}

/* Auth Overlay Screen */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 10, 18, 0.85);
    backdrop-filter: blur(20px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) ease;
}
.overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.login-card {
    width: 420px;
    padding: 40px;
    border-color: rgba(255, 255, 255, 0.08);
}
.login-header {
    text-align: center;
    margin-bottom: 30px;
}
.logo-glow {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
}
.logo-icon {
    width: 32px;
    height: 32px;
    color: white;
}
.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff 40%, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 24px;
}
.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}
.input-wrapper input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    transition: all var(--transition-speed) ease;
}
.input-wrapper input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan-glow);
    background: rgba(15, 23, 42, 0.8);
}
.error-text {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: -12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: shake 0.4s ease;
}
.inline-icon {
    width: 14px;
    height: 14px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed) ease;
}
.btn-block {
    width: 100%;
}
.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.45);
}
.btn-primary:active {
    transform: translateY(0);
}
.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}
.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
    box-shadow: 0 4px 15px var(--danger-glow);
}

/* Layout Framework */
.layout {
    display: flex;
    min-height: 100vh;
}
.layout.hidden {
    display: none !important;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(11, 15, 25, 0.7);
    border-right: 1px solid var(--card-border);
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    z-index: 100;
}
.sidebar-header {
    padding: 30px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.header-icon {
    width: 22px;
    height: 22px;
    color: var(--accent-cyan);
}
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 16px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}
.nav-item i {
    width: 18px;
    height: 18px;
}
.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
}
.nav-item.active {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px solid rgba(6, 182, 212, 0.15);
    color: var(--accent-cyan);
}
.mobile-bottom-nav {
    display: none;
}
.sidebar-footer {
    padding: 20px 16px;
}

/* Main Content Structure */
.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 40px;
    min-height: 100vh;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
}
.topbar-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.badge-connected {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #a7f3d0;
}
.badge-connected .status-dot {
    background-color: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
}
.badge-disconnected {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}
.badge-disconnected .status-dot {
    background-color: var(--danger);
    box-shadow: 0 0 8px var(--danger);
}

/* Page Section View Mechanics */
.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}
.view-section.active-section {
    display: block;
}

/* Dashboard Elements */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}
.stat-card {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stat-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon-wrapper i {
    width: 22px;
    height: 22px;
    color: white;
}
.cyan-glow {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.35);
}
.purple-glow {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.35);
}
.orange-glow {
    background: linear-gradient(135deg, #ea580c, #f97316);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.35);
}
.green-glow {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
}

/* Charts & Dashboard Quick Actions */
.charts-grid {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.chart-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
}
.card-header {
    margin-bottom: 24px;
}
.card-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.card-header p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.chart-container {
    position: relative;
    flex: 1;
    min-height: 260px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.actions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.action-btn {
    width: 100%;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-speed) ease;
}
.action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}
.act-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
}
.text-cyan { color: var(--accent-cyan); }
.text-purple { color: var(--accent-purple); }
.act-text h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.act-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.act-arrow {
    margin-left: auto;
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* Devices Table View styling */
.table-card {
    padding: 0;
    overflow: hidden;
}
.table-toolbar {
    padding: 24px;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}
.search-box input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
}
.search-box input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan-glow);
}
.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}
.toolbar-controls label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.toolbar-controls select {
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}
.table-responsive {
    overflow-x: auto;
    width: 100%;
}
.devices-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}
.devices-table th {
    padding: 16px 24px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.01);
}
.devices-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-primary);
}
.devices-table tbody tr {
    transition: background-color var(--transition-speed) ease;
}
.devices-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Loading animation in table */
.loading-cell {
    text-align: center;
    padding: 60px !important;
    color: var(--text-secondary);
}
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(6, 182, 212, 0.1);
    border-top: 3px solid var(--accent-cyan);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.table-pagination {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--card-border);
}
.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.pagination-buttons {
    display: flex;
    gap: 8px;
}

/* Row elements & tooltips */
.copyable-code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
}
.row-actions {
    display: flex;
    gap: 6px;
}
.icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}
.icon-btn i {
    width: 15px;
    height: 15px;
}
.icon-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}
.icon-btn.btn-copy-active {
    color: var(--accent-green) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    background: rgba(16, 185, 129, 0.1) !important;
}
.icon-btn-danger:hover {
    color: white;
    background: var(--danger);
    border-color: var(--danger);
}

/* Generator View Layout */
.generator-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: stretch;
    height: calc(100vh - 160px);
}
.config-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
}
.form-control {
    width: 100%;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition-speed) ease;
}
.form-control:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan-glow);
}
.native-select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.custom-select {
    position: relative;
    min-width: 110px;
}
.custom-select-wide {
    width: 100%;
}
.custom-select-trigger {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
}
.custom-select-trigger:hover,
.custom-select.open .custom-select-trigger {
    border-color: rgba(6, 182, 212, 0.45);
    box-shadow: 0 0 10px var(--accent-cyan-glow);
}
.custom-select-trigger i {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: transform var(--transition-speed) ease;
}
.custom-select.open .custom-select-trigger i {
    transform: rotate(180deg);
}
.custom-select-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 40;
    padding: 6px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    display: none;
}
.custom-select.open .custom-select-menu {
    display: block;
}
.custom-select-menu button {
    width: 100%;
    padding: 10px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    text-align: left;
    cursor: pointer;
    font-size: 0.85rem;
}
.custom-select-menu button:hover,
.custom-select-menu button.active {
    background: rgba(6, 182, 212, 0.12);
    color: var(--accent-cyan);
}
.minmax-control {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 8px;
}
.minmax-control .form-control {
    text-align: center;
    min-height: 42px;
}
.minmax-btn {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.minmax-btn:hover {
    border-color: rgba(6, 182, 212, 0.35);
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.08);
}
.minmax-btn i {
    width: 16px;
    height: 16px;
}
.minmax-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.72rem;
}
.status-note {
    margin: 8px 0 18px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}
.status-note.status-error {
    color: #fca5a5;
}
.wg-qr {
    margin: 0 0 18px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    justify-content: center;
}
.wg-qr svg {
    width: 180px;
    height: 180px;
    display: block;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Custom Checkbox */
.checkbox-group {
    margin-top: 12px;
}
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
    user-select: none;
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}
.checkmark {
    width: 20px;
    height: 20px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    flex-shrink: 0;
    position: relative;
    transition: all var(--transition-speed) ease;
}
.checkbox-container:hover input ~ .checkmark {
    border-color: rgba(255, 255, 255, 0.2);
}
.checkbox-container input:checked ~ .checkmark {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-color: transparent;
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}
.checkbox-text h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.checkbox-text p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: none !important;
}
.generator-controls {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Simulated Web Terminal */
.terminal-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(10, 12, 18, 0.85);
    border-color: rgba(255, 255, 255, 0.05);
}
.terminal-header {
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.terminal-dots {
    display: flex;
    gap: 6px;
}
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }
.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.terminal-actions {
    display: flex;
    gap: 8px;
}
.terminal-action-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    transition: all var(--transition-speed) ease;
}
.terminal-action-btn i {
    width: 14px;
    height: 14px;
}
.terminal-action-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}
.terminal-action-btn.active {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.08);
}
.terminal-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scroll-behavior: smooth;
}
/* Scrollbar Styling */
.terminal-body::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.terminal-body::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
.terminal-body::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.terminal-body::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
.terminal-line {
    white-space: pre-wrap;
    word-break: break-all;
    color: #cbd5e1;
}
.config-output {
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #cbd5e1;
}
.system-line {
    color: var(--text-muted);
    font-weight: 500;
}
.success-line {
    color: var(--accent-green);
}
.error-line {
    color: var(--danger);
}
.info-line {
    color: var(--accent-cyan);
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
}
.toast {
    padding: 14px 20px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(10px);
}
.toast-success {
    border-left: 4px solid var(--accent-green);
}
.toast-error {
    border-left: 4px solid var(--danger);
}
.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}
.toast-success .toast-icon { color: var(--accent-green); }
.toast-error .toast-icon { color: var(--danger); }

/* Utility classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* Responsive Adaptation */
@media (max-width: 1024px) {
    .generator-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    .charts-grid {
        flex-direction: column;
    }
}
@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .mobile-bottom-nav {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 5000;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        padding: 8px;
        border-radius: 14px;
        background: rgba(11, 15, 25, 0.92);
        border: 1px solid rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(16px);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    }
    .mobile-bottom-nav .nav-item {
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        padding: 8px 4px;
        border-radius: 10px;
        font-size: 0.68rem;
        text-align: center;
        min-width: 0;
    }
    .mobile-bottom-nav .nav-item i {
        width: 18px;
        height: 18px;
    }
    .mobile-bottom-nav .nav-item span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
    .content {
        margin-left: 0;
        padding: 18px 14px 96px;
        width: 100%;
    }
    .topbar {
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 22px;
    }
    .topbar-title h2 {
        font-size: 1.35rem;
    }
    .badge {
        padding: 5px 10px;
        font-size: 0.72rem;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .stat-card {
        padding: 16px;
        min-width: 0;
    }
    .stat-value {
        font-size: 1.55rem;
    }
    .charts-grid {
        gap: 16px;
    }
    .table-toolbar {
        align-items: stretch;
        padding: 16px;
    }
    .search-box {
        min-width: 100%;
    }
    .toolbar-controls {
        width: 100%;
        justify-content: space-between;
    }
    .toolbar-controls .custom-select {
        flex: 1;
    }
    .table-pagination {
        align-items: stretch;
        gap: 12px;
        flex-direction: column;
    }
    .pagination-buttons {
        width: 100%;
    }
    .pagination-buttons .btn {
        flex: 1;
    }
    .generator-grid {
        gap: 16px;
    }
    .config-card {
        padding: 18px;
    }
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .terminal-card {
        min-height: 420px;
    }
    .terminal-body {
        min-height: 320px;
    }
    .toast-container {
        left: 14px;
        right: 14px;
        bottom: 92px;
    }
    .toast {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .login-card {
        width: calc(100vw - 28px);
        padding: 28px 22px;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stat-card {
        align-items: flex-start;
    }
    .topbar {
        flex-direction: column;
    }
    .topbar-actions {
        width: 100%;
    }
    .topbar-actions .badge {
        width: 100%;
        justify-content: center;
    }
    .generator-controls {
        gap: 8px;
    }
    .custom-select-menu {
        position: fixed;
        left: 14px;
        right: 14px;
        top: auto;
        bottom: 90px;
    }
}
