/*
 * Zebra Day Modern Theme
 * Ursa-inspired dark design system with zebra stripe accents
 */

/* CSS Variables */
:root {
    /* Colors - Dark theme */
    --color-primary: #1a1a2e;
    --color-secondary: #16213e;
    --color-accent: #0f3460;
    --color-highlight: #6366f1;
    --color-success: #22c55e;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
    
    /* Grays */
    --color-gray-900: #0a0a0a;
    --color-gray-800: #141414;
    --color-gray-700: #1f1f1f;
    --color-gray-600: #2d2d2d;
    --color-gray-500: #4a4a4a;
    --color-gray-400: #6b6b6b;
    --color-gray-300: #a3a3a3;
    --color-gray-200: #d4d4d4;
    --color-gray-100: #f5f5f5;
    --color-white: #fafafa;
    --color-dark: #0a0a0a;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.4);
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-gray-900);
    color: var(--color-gray-200);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-highlight);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: #818cf8;
}

/* Zebra Stripe Bar */
.zebra-stripe-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: repeating-linear-gradient(
        90deg,
        var(--color-white) 0px,
        var(--color-white) 20px,
        var(--color-primary) 20px,
        var(--color-primary) 40px
    );
    z-index: 1001;
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* Header */
.header {
    background: var(--color-primary);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 4px;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--color-white);
    font-weight: 700;
    font-size: 1.25rem;
}

.logo:hover {
    color: var(--color-white);
}

.logo-icon {
    flex-shrink: 0;
}

/* Navigation */
.nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-xs);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--color-gray-300);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--color-white);
    background: var(--color-secondary);
}

.nav-link.active {
    color: var(--color-white);
    background: var(--color-highlight);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main Content */
.main {
    flex: 1;
    padding: var(--spacing-2xl) 0;
}

/* Footer */
.footer {
    background: var(--color-primary);
    padding: var(--spacing-lg) 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-info {
    color: var(--color-gray-400);
    font-size: 0.875rem;
}

.footer-sep {
    margin: 0 var(--spacing-sm);
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-links a {
    color: var(--color-gray-400);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.footer-links a:hover {
    color: var(--color-highlight);
}

/* Cards */
.card {
    background: var(--color-gray-800);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--color-gray-700);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-white);
    margin: 0;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-icon.primary { background: rgba(99, 102, 241, 0.15); color: var(--color-highlight); }
.card-icon.success { background: rgba(34, 197, 94, 0.15); color: var(--color-success); }
.card-icon.warning { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.card-icon.error { background: rgba(239, 68, 68, 0.15); color: var(--color-error); }
.card-icon.info { background: rgba(59, 130, 246, 0.15); color: var(--color-info); }

/* Stat Cards */
.stat-card {
    background: var(--color-gray-800);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-lg);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.stat-card-clickable {
    cursor: pointer;
    color: inherit;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-white);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-gray-400);
    margin-top: var(--spacing-xs);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: #818cf8;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--color-success);
    color: var(--color-dark);
}

.btn-success:hover:not(:disabled) {
    background: #16a34a;
}

.btn-outline {
    background: transparent;
    border-color: var(--color-gray-600);
    color: var(--color-gray-300);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--color-highlight);
    color: var(--color-highlight);
}

.btn-sm {
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.125rem;
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1024px) {
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-5, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .menu-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-primary);
        flex-direction: column;
        padding: var(--spacing-md);
    }
    .nav-links.active { display: flex; }
    .nav-actions { display: none; }
}

@media (max-width: 480px) {
    .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    color: var(--color-gray-300);
}

.form-label.required::after {
    content: " *";
    color: var(--color-error);
}

.form-control {
    display: block;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: var(--font-mono);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--color-white);
    background-color: var(--color-gray-700);
    border: 2px solid var(--color-gray-600);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--color-highlight);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-control::placeholder {
    color: var(--color-gray-500);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--spacing-md) center;
    padding-right: var(--spacing-2xl);
    cursor: pointer;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    background: var(--color-gray-800);
    box-shadow: var(--shadow-md);
}

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

.table th,
.table td {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    border-bottom: 1px solid var(--color-gray-700);
}

.table th {
    font-weight: 600;
    color: var(--color-gray-300);
    background: var(--color-gray-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr:hover {
    background: var(--color-gray-700);
}

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--color-highlight);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: calc(4px + var(--spacing-lg));
    right: var(--spacing-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--color-gray-800);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--color-gray-600);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-success { border-left-color: var(--color-success); }
.toast-error { border-left-color: var(--color-error); }
.toast-warning { border-left-color: var(--color-warning); }
.toast-info { border-left-color: var(--color-info); }

.toast-icon {
    font-size: 1.25rem;
}

.toast-success .toast-icon { color: var(--color-success); }
.toast-error .toast-icon { color: var(--color-error); }
.toast-warning .toast-icon { color: var(--color-warning); }
.toast-info .toast-icon { color: var(--color-info); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: var(--spacing-xs);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--color-gray-400);
}

.toast-close {
    background: none;
    border: none;
    color: var(--color-gray-500);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: var(--color-white);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

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

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-gray-700);
    border-top-color: var(--color-highlight);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-md);
}

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

/* Page Header */
.page-header {
    margin-bottom: var(--spacing-xl);
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
}

.page-subtitle {
    color: var(--color-gray-400);
    font-size: 1.125rem;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.action-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--color-gray-700);
    border-radius: var(--radius-md);
    color: var(--color-gray-200);
    transition: all var(--transition-fast);
    flex: 1;
    min-width: 200px;
}

.action-card:hover {
    background: var(--color-gray-600);
    color: var(--color-white);
    transform: translateY(-2px);
}

.action-card i {
    font-size: 1.5rem;
    color: var(--color-highlight);
}

/* Utility Classes */
.d-none { display: none !important; }
.d-flex { display: flex !important; }
.d-block { display: block !important; }

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

.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }
.text-muted { color: var(--color-gray-400); }

.mb-0 { margin-bottom: 0 !important; }
.mb-sm { margin-bottom: var(--spacing-sm) !important; }
.mb-md { margin-bottom: var(--spacing-md) !important; }
.mb-lg { margin-bottom: var(--spacing-lg) !important; }
.mb-xl { margin-bottom: var(--spacing-xl) !important; }

.mt-lg { margin-top: var(--spacing-lg) !important; }
.mt-xl { margin-top: var(--spacing-xl) !important; }

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Code blocks */
code {
    font-family: var(--font-mono);
    background: var(--color-gray-700);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.875em;
    color: var(--color-highlight);
}

pre {
    font-family: var(--font-mono);
    background: var(--color-gray-700);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--color-gray-400);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.empty-state p {
    margin-bottom: var(--spacing-lg);
}

