:root {
    /* Color Palette - Modern Corporate Blue & Slate */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;

    /* Backgrounds */
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-sidebar: #0f172a;
    
    /* Text */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #f8fafc;

    /* Borders */
    --border-color: #e2e8f0;
    
    /* Spacing */
    --sidebar-width: 260px;
    --header-height: 64px;
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-sidebar: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Tajawal', 'Inter', sans-serif; /* Adding Arabic Friendly Font */
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Utility Classes */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

@media print {
    .no-print { display: none !important; }
}

[data-theme="dark"] .glass-panel {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-danger { background-color: var(--danger-color); color: white; }
.form-control {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background-color: var(--bg-card);
    color: var(--text-main);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    color: var(--text-light);
    position: fixed;
    height: 100vh;
    transition: transform 0.3s ease;
    z-index: 50;
}

.main-content {
    margin-left: var(--sidebar-width); /* Default LTR */
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* RT Support */
[dir="rtl"] .sidebar {
    right: 0;
    left: auto;
}
[dir="rtl"] .main-content {
    margin-left: 0;
    margin-right: var(--sidebar-width);
}
