:root {
    --ios-background: #f2f2f7;
    --ios-card: #ffffff;
    --ios-primary: #007AFF;
    --ios-secondary: #5856D6;
    --ios-success: #34C759;
    --ios-danger: #FF3B30;
    --ios-warning: #FF9500;
    --ios-text-primary: #000000;
    --ios-text-secondary: #8e8e93;
    --ios-border: #d1d1d6;
    --ios-sidebar: rgba(242, 242, 247, 0.9);
    --ios-primary-alpha: rgba(0, 122, 255, 0.2);
}

/* General Styles */
body {
    background-color: var(--ios-background);
    color: var(--ios-text-primary);
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    background: var(--ios-sidebar) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 1px solid var(--ios-border);
    color: var(--ios-text-primary) !important;
    min-height: 100vh;
    padding: 1.5rem;
}

.sidebar .nav-link {
    color: var(--ios-text-primary) !important;
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.sidebar .nav-link:hover {
    background-color: rgba(0, 122, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: var(--ios-primary);
    color: white !important;
}

.sidebar .nav-link.text-danger {
    color: var(--ios-danger) !important;
}

/* Card Styles */
.card {
    background: var(--ios-card);
    border: none;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: var(--ios-card);
    border-bottom: 1px solid var(--ios-border);
    border-radius: 15px 15px 0 0 !important;
    padding: 1.25rem;
}

/* Form Controls */
.form-control, .form-select {
    border: 1px solid var(--ios-border);
    border-radius: 10px;
    padding: 12px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--ios-primary);
    box-shadow: 0 0 0 3px var(--ios-primary-alpha);
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--ios-primary) 0%, var(--ios-secondary) 100%);
    border: none;
    box-shadow: 0 4px 12px var(--ios-primary-alpha);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px var(--ios-primary-alpha);
}

.btn-danger {
    background-color: var(--ios-danger);
    border-color: var(--ios-danger);
}

.btn-warning {
    background-color: var(--ios-warning);
    border-color: var(--ios-warning);
}

.btn-success {
    background-color: var(--ios-success);
    border-color: var(--ios-success);
}

/* Tables */
.table {
    border-radius: 10px;
    overflow: hidden;
}

.table thead th {
    background-color: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--ios-border);
    color: var(--ios-text-secondary);
    font-weight: 600;
    padding: 1rem;
}

.table td {
    border-bottom: 1px solid var(--ios-border);
    padding: 1rem;
    vertical-align: middle;
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 500;
}

/* Alerts */
.alert {
    position: relative;
    padding: 1rem;
    text-align: right;
    min-height: 60px;
    display: block;
    border-radius: 12px;
    border: none;
}

.alert-success {
    background-color: rgba(52, 199, 89, 0.1);
    color: var(--ios-success);
}

.alert-danger {
    background-color: rgba(255, 59, 48, 0.1);
    color: var(--ios-danger);
}

.alert .btn-close {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    margin: 0;
    padding: 0.5rem;
}

.alert-content {
    margin-left: 2rem;
    margin-right: 0;
}

.alert i {
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Modals */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal-header {
    border-bottom: 1px solid var(--ios-border);
    padding: 20px;
}

.modal-footer {
    border-top: 1px solid var(--ios-border);
    padding: 20px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--ios-background);
}

::-webkit-scrollbar-thumb {
    background: var(--ios-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ios-text-secondary);
}

/* RTL Specific Adjustments */
[dir="rtl"] .sidebar {
    border-left: none;
    border-right: 1px solid var(--ios-border);
}

[dir="rtl"] .modal-header .btn-close {
    margin: -0.5rem auto -0.5rem -0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        border-left: none;
        border-bottom: 1px solid var(--ios-border);
    }
    
    .login-container {
        margin: 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Login Page Specific Styles */
.login-container {
    background: var(--ios-card);
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.login-container footer {
    background-color: rgba(242, 242, 247, 0.5);
    border-top: 1px solid var(--ios-border);
    margin-top: auto;
}

.login-container footer .text-primary {
    color: var(--ios-primary) !important;
}

.login-container .form-control {
    border: 1px solid var(--ios-border) !important;
    border-radius: 12px !important;
    padding: 0.75rem 1rem !important;
    background-color: var(--ios-background) !important;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.login-container .form-control:focus {
    border-color: var(--ios-primary) !important;
    box-shadow: 0 0 0 3px var(--ios-primary-alpha) !important;
}

.login-container .brand-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--ios-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container .brand-logo i {
    font-size: 2.5rem;
    color: white;
}

.login-container .btn-primary {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    background: var(--ios-primary);
    border: none;
    transition: all 0.3s ease;
}

.login-container .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--ios-primary-alpha);
}

.login-container .copyright {
    color: var(--ios-text-secondary);
    font-size: 0.875rem;
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--ios-border);
    background-color: rgba(242, 242, 247, 0.5);
    margin-top: 1rem;
}

/* RTL Specific Login Adjustments */
[dir="rtl"] .login-container .form-control {
    text-align: right;
} 