@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap');


body, html {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important; /* Regular */
  font-weight: 400 !important;
}

h1, h2 {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important; /* Black */
  font-weight: 900 !important;
}

h3, h4 {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important; /* Bold */
  font-weight: 700 !important;
}

p {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important; /* Light */
  font-weight: 300 !important;
}

strong, b {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important; /* ExtraBold */
  font-weight: 800 !important;
}

em {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important; /* ExtraLight */
  font-weight: 200 !important;
}

a {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important; /* Medium */
  font-weight: 500 !important;
}

small, .caption {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important; /* Thin */
  font-weight: 100 !important;
}

button, input, textarea, select {
  font-family: 'IBM Plex Sans Arabic', sans-serif !important; /* SemiBold */
  font-weight: 600 !important;
}
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #0ea5e9;
    --background: #f8fafc;
    --text: #0f172a;
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --sidebar-width: 280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}

body {
    background: var(--background);
    min-height: 100vh;
    direction: rtl;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    padding: 24px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    border-radius: 12px;
    transition: all 0.3s ease;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-item:hover,
.nav-item.active {
    background: #f1f5f9;
}

.nav-item:hover .nav-link,
.nav-item.active .nav-link {
    color: var(--primary);
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.user-profile {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: var(--text);
}

.logout-btn {
    color: var(--error);
    cursor: pointer;
    font-size: 1.2rem;
}

/* Main Content */
.main-content {
    margin-right: var(--sidebar-width);
    padding: 32px;
    min-height: 100vh;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.breadcrumb {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue {
    background: #dbeafe;
    color: var(--primary);
}

.stat-icon.green {
    background: #dcfce7;
    color: var(--success);
}

.stat-icon.yellow {
    background: #fef3c7;
    color: var(--warning);
}

.stat-icon.red {
    background: #fee2e2;
    color: var(--error);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.stat-label {
    color: var(--secondary);
    font-size: 0.9rem;
}

/* Section */
.section {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    
}

.btn-primary {
    background: linear-gradient(to left, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--text);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

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

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    background: white;
}

.btn-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: #f8fafc;
}

/* Form */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--text);
    margin-top: 10px;
    width: 50%;
}

.form-control {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;

}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

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

/* Table */
.table-container {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 16px;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    color: var(--secondary);
    font-weight: 500;
    background: #f8fafc;
}

.data-table tbody tr {
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* Badge */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.badge-success {
    background: #dcfce7;
    color: var(--success);
}

.badge-warning {
    background: #fef3c7;
    color: var(--warning);
}

.badge-danger {
    background: #fee2e2;
    color: var(--error);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--secondary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #f1f5f9;
    color: var(--text);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Alert */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #dcfce7;
    color: var(--success);
    border: 1px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: var(--error);
    border: 1px solid var(--error);
}

.alert-warning {
    background: #fef3c7;
    color: var(--warning);
    border: 1px solid var(--warning);
}

.alert-info {
    background: #dbeafe;
    color: var(--primary);
    border: 1px solid var(--primary);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo i {
    font-size: 4rem;
    color: var(--primary);
}

.login-logo h1 {
    font-size: 1.5rem;
    color: var(--text);
    margin-top: 16px;
}

/* Payment Page */
.payment-container {
    min-height: 100vh;
    padding: 20px;
    background: var(--background);
}

.payment-box {
    max-width: 600px;
    margin: 0px auto;
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

.payment-header {
    text-align: center;
    margin-bottom: 32px;
}

.payment-header h1 {
    font-size: 1.5rem;
    color: var(--text);
    margin-bottom: 8px;
}

.debt-info {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.debt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.debt-item:last-child {
    border-bottom: none;
}

.debt-label {
    color: var(--secondary);
    font-weight: 500;
}

.debt-value {
    color: var(--text);
    font-weight: 600;
}

.debt-amount {
    font-size: 2rem;
    color: var(--primary);
}

/* Menu Button (Mobile) */
.menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: white;
    border: none;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--primary);
    transition: 0.3s ease;
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.overlay.active {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .menu-btn {
        display: flex;
    }

    .sidebar {
        transform: translateX(100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0;
        padding: 1rem;
        padding-top: 5rem;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .data-table {
        font-size: 0.9rem;
    }

    .data-table th,
    .data-table td {
        padding: 12px 8px;
    }

    .login-box {
        padding: 32px 24px;
    }

    .payment-box {
        padding: 24px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}