:root {
    /* Color Palette - Indigo/Violet Theme */
    --primary-color: #4f46e5;       /* Indigo 600 */
    --primary-hover: #4338ca;       /* Indigo 700 */
    --secondary-color: #64748b;     /* Slate 500 */
    --accent-color: #8b5cf6;        /* Violet 500 */
    
    --success-color: #10b981;       /* Emerald 500 */
    --warning-color: #f59e0b;       /* Amber 500 */
    --danger-color: #ef4444;        /* Red 500 */
    
    --bg-body: #f3f4f6;             /* Gray 100 */
    --bg-surface: #ffffff;
    --bg-input: #f9fafb;            /* Gray 50 */
    
    --text-main: #1f2937;           /* Gray 800 */
    --text-muted: #6b7280;          /* Gray 500 */
    --text-light: #9ca3af;          /* Gray 400 */
    
    --border-color: #e5e7eb;        /* Gray 200 */
    --border-focus: #6366f1;        /* Indigo 500 */
    
    /* Spacing & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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);
    
    /* Typography */
    --font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.section {
    margin-bottom: 2rem;
}

/* Components: Card */
.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Components: Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-size: 0.95rem;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--bg-body);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

/* Components: Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-input, .form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

/* Components: Tables */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.95rem;
}

.table th {
    background: var(--bg-body);
    color: var(--text-muted);
    font-weight: 600;
    text-align: center;
    padding: 1rem;
    white-space: nowrap;
}

.table td {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-main);
    text-align: center;
}

.table tr:hover td {
    background-color: var(--bg-input);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.badge-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .card {
        padding: 1.25rem;
        border-radius: var(--radius-md);
    }
    
    .table th, .table td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* App-like Bottom Nav Placeholder (if needed) */
}
