/* CloudDash - Cloud Infrastructure Management Dashboard */
/* Version 2.4.1 */

:root {
    --sidebar-bg: #1a1e2e;
    --sidebar-active: #2d3348;
    --sidebar-text: #8892a4;
    --sidebar-text-active: #ffffff;
    --primary: #4f6ef7;
    --primary-hover: #3b5de7;
    --primary-light: #eef1fe;
    --success: #10b981;
    --success-light: #ecfdf5;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #3b82f6;
    --bg-main: #f4f6f9;
    --bg-card: #ffffff;
    --text-primary: #1a1e2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
    --sidebar-width: 260px;
    --header-height: 64px;
    --banner-height: 40px;
}

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

body {
    font-family: var(--font);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Security Testing Disclaimer Banner */
.security-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--banner-height);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 9999;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

.security-banner svg {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--banner-height);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    position: fixed;
    top: var(--banner-height);
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.sidebar-brand .logo {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-brand .logo svg {
    width: 20px;
    height: 20px;
    color: white;
}

.sidebar-brand h1 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.3px;
}

.sidebar-brand span {
    font-size: 10px;
    color: var(--sidebar-text);
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

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

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--sidebar-text);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: var(--sidebar-text-active);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active svg {
    opacity: 1;
}

.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.sidebar-user:hover {
    background: rgba(255,255,255,0.06);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar-user .user-info {
    overflow: hidden;
}

.sidebar-user .user-name {
    font-size: 13px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user .user-role {
    font-size: 11px;
    color: var(--sidebar-text);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: var(--banner-height);
    z-index: 50;
}

.top-header .page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.top-header .header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 280px;
    padding: 8px 16px 8px 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--bg-main);
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.1);
    background: white;
}

.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.header-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.header-btn:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.header-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.header-btn svg {
    width: 20px;
    height: 20px;
}

/* Page Content */
.page-content {
    padding: 32px;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-card .stat-info h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-card .stat-info .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-card .stat-info .stat-change {
    font-size: 12px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon.blue { background: var(--primary-light); color: var(--primary); }
.stat-icon.green { background: var(--success-light); color: var(--success); }
.stat-icon.yellow { background: var(--warning-light); color: var(--warning); }
.stat-icon.red { background: var(--danger-light); color: var(--danger); }

.stat-icon svg {
    width: 24px;
    height: 24px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-main);
}

table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

table tr:hover td {
    background: rgba(79, 110, 247, 0.02);
}

table tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.badge-success { background: var(--success-light); color: #059669; }
.badge-warning { background: var(--warning-light); color: #d97706; }
.badge-danger { background: var(--danger-light); color: #dc2626; }
.badge-info { background: var(--primary-light); color: var(--primary); }
.badge-gray { background: #f3f4f6; color: #6b7280; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-main);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn svg {
    width: 16px;
    height: 16px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--font);
    color: var(--text-primary);
    background: white;
    transition: all 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

/* Chat Interface (AI Assistant) */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - var(--banner-height) - 64px);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header .bot-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.chat-header .bot-avatar svg {
    width: 22px;
    height: 22px;
}

.chat-header .bot-info h3 {
    font-size: 15px;
    font-weight: 600;
}

.chat-header .bot-info p {
    font-size: 12px;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-header .bot-info p::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-message {
    display: flex;
    gap: 12px;
    max-width: 80%;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message .msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.chat-message.bot .msg-avatar {
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    color: white;
}

.chat-message.user .msg-avatar {
    background: var(--primary-light);
    color: var(--primary);
}

.chat-message .msg-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.bot .msg-bubble {
    background: var(--bg-main);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-message.user .msg-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-suggestions {
    padding: 16px 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border-light);
}

.suggestion-chip {
    padding: 8px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: var(--font);
}

.suggestion-chip:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.chat-input-area {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-family: var(--font);
    background: var(--bg-main);
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 110, 247, 0.1);
    background: white;
}

.chat-input-area button {
    width: 44px;
    height: 44px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chat-input-area button:hover {
    background: var(--primary-hover);
}

.chat-input-area button svg {
    width: 20px;
    height: 20px;
}

.typing-indicator {
    display: none;
    align-self: flex-start;
    padding: 12px 16px;
    background: var(--bg-main);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    gap: 4px;
    align-items: center;
}

.typing-indicator.visible {
    display: flex;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* Side Panel (User/Invoice Detail) */
.side-panel {
    position: fixed;
    top: var(--banner-height);
    right: -480px;
    width: 480px;
    height: calc(100vh - var(--banner-height));
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    border-left: 1px solid var(--border);
    z-index: 200;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.side-panel.open {
    right: 0;
}

.side-panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.side-panel-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.side-panel-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.15s ease;
}

.side-panel-close:hover {
    background: var(--bg-main);
    color: var(--text-primary);
}

.side-panel-body {
    padding: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-row .value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
}

.detail-row .value.sensitive {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--danger);
}

/* Overlay */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.visible {
    opacity: 1;
    pointer-events: all;
}

/* Settings Page */
.settings-section {
    margin-bottom: 32px;
}

.settings-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.api-key-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 14px;
}

.api-key-display .key-value {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    cursor: pointer;
}

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

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 12px;
    transition: background 0.2s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

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

.integration-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.integration-item:last-child {
    border-bottom: none;
}

.integration-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.integration-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

.danger-zone {
    border: 1px solid var(--danger);
    border-radius: var(--radius-lg);
    padding: 24px;
    background: var(--danger-light);
}

.danger-zone h3 {
    color: var(--danger);
    border-bottom-color: rgba(239, 68, 68, 0.2);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* Chart Placeholder */
.chart-area {
    height: 280px;
    background: linear-gradient(180deg, rgba(79,110,247,0.04) 0%, rgba(79,110,247,0.01) 100%);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 100%;
    padding: 20px 16px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary) 0%, rgba(79,110,247,0.6) 100%);
    border-radius: 4px 4px 0 0;
    min-height: 20px;
    transition: opacity 0.15s ease;
}

.chart-bar:hover {
    opacity: 0.8;
}

/* Activity Log */
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-dot.deploy { background: var(--success); }
.activity-dot.user { background: var(--primary); }
.activity-dot.billing { background: var(--warning); }
.activity-dot.alert { background: var(--danger); }

.activity-item .activity-text {
    font-size: 13px;
    color: var(--text-primary);
}

.activity-item .activity-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Clickable table row */
table tr.clickable {
    cursor: pointer;
}

table tr.clickable:hover td {
    background: rgba(79, 110, 247, 0.04);
}

/* Loading spinner */
.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .page-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .top-header {
        padding: 0 16px;
    }

    .search-box input {
        width: 200px;
    }

    .chat-message {
        max-width: 90%;
    }

    .side-panel {
        width: 100%;
        right: -100%;
    }
}

/* Utility */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.font-mono { font-family: var(--mono); }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
