/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900&display=swap');

:root {
    /* iOS 26 Colors */
    --primary: #007AFF;
    --primary-hover: #0056b3;
    --secondary: #5856D6;
    --success: #34C759;
    --danger: #FF3B30;
    --warning: #FF9500;
    --info: #5AC8FA;
    --light: #F2F2F7;
    --dark: #1C1C1E;
    --white: #FFFFFF;
    --gray: #8E8E93;
    --gray-2: #AEAEB2;
    --gray-3: #C7C7CC;
    --gray-4: #D1D1D6;
    --gray-5: #E5E5EA;
    --gray-6: #F2F2F7;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --backdrop-blur: 20px;

    /* Spacing & Radius */
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --radius-xl: 40px;

    /* Font */
    --font-main: 'Cairo', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
}

body {
    background-color: #F5F5F7;
    /* iOS System Background */
    color: var(--dark);
    direction: rtl;
    /* For Arabic */
    text-align: right;
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* Layout */
.wrapper {
    display: flex;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    padding: 30px 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.02);
}

.brand {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 15px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 18px;
    color: var(--gray);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 122, 255, 0.3);
}

.nav-link i {
    font-size: 20px;
    width: 25px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-right: 280px;
    /* Sidebar width */
    width: calc(100% - 280px);
    padding: 40px;
    transition: margin-right 0.3s ease;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 700;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--white);
    padding: 8px 15px;
    border-radius: var(--radius-xl);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Cards */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--glass-shadow);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* Minimal border */
    background: #FAFAFC;
    color: var(--dark);
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.3);
}

.btn-success {
    background: var(--success);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.3);
}

.btn-info {
    background: var(--info);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(90, 200, 250, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: var(--radius-sm);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    /* Spacing between rows */
}

.table th {
    text-align: right;
    padding: 15px 20px;
    color: var(--gray);
    font-size: 14px;
    font-weight: 600;
}

.table td {
    background: var(--white);
    padding: 15px 20px;
    /* First and last child radius for row look */
}

.table tr td:first-child {
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
}

.table tr td:last-child {
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
}

.table tr {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease;
}

.table tr:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.d-flex {
    display: flex;
}

.gap-2 {
    gap: 0.5rem;
}

.justify-between {
    justify-content: space-between;
}

.w-full {
    width: 100%;
}

/* Grid for Dashboard */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 25px;
}