/* admin/assets/css/admin.css */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&display=swap');

:root {
    --sidebar-width: 250px;
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --sidebar-hover: #334155;
    --sidebar-active: #2563eb;
    --topbar-height: 60px;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --bg-main: #f1f5f9;
    --white: #ffffff;
    --text-main: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
}

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

body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout */
.wrapper {
    display: flex;
    width: 100%;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    font-size: 1.5rem;
    font-weight: 800;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    gap: 15px;
    transition: all 0.2s;
}

.sidebar-menu li a:hover {
    background: var(--sidebar-hover);
}

.sidebar-menu li.active a {
    background: var(--sidebar-active);
    color: var(--white);
    border-right: 4px solid var(--white);
}

.main-content {
    margin-right: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 99;
}

.topbar-right, .topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Cards */
.page-content {
    padding: 20px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--sidebar-bg);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-info h4 {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

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

.stat-icon {
    font-size: 2rem;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 15px;
    border-radius: 8px;
}

/* Basic Form / Table elements */
.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 20px;
}

.table-responsive {
    overflow-x: auto;
}

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

.table th, .table td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--bg-main);
    color: var(--text-muted);
    font-weight: 600;
}

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

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-primary { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: #e2e8f0; color: #475569; }

.btn {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
}
.btn-primary { background: var(--primary) !important; color: #ffffff !important; }
.btn-primary * { color: #ffffff !important; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-success { background: var(--success); color: var(--white); }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-main); }
.btn-outline:hover { background: var(--bg-main); }
.btn-lg { padding: 12px 25px; font-size: 1.05rem; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--white);
    margin-bottom: 20px;
    transition: all 0.3s;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="date"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: #475569;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--white);
    transition: all 0.3s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

/* Flash Messages */
.flash-success { background: #d1fae5; color: #065f46; padding: 12px 20px; border-radius: 8px; border: 1px solid #a7f3d0; margin-bottom: 20px; font-weight: 600; }
.flash-error { background: #fee2e2; color: #991b1b; padding: 12px 20px; border-radius: 8px; border: 1px solid #fca5a5; margin-bottom: 20px; font-weight: 600; }
.flash-warning { background: #fef3c7; color: #92400e; padding: 12px 20px; border-radius: 8px; border: 1px solid #fde68a; margin-bottom: 20px; font-weight: 600; }

.text-muted { color: var(--text-muted) !important; }
.text-center { text-align: center !important; }
.text-sm { font-size: 0.85rem !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.card-body.p-0 { padding: 0; }
.alert-info { background: #dbeafe; padding: 12px 16px; border-radius: 8px; color: #1e40af; border: 1px solid #bfdbfe; font-weight: 600; margin-bottom: 15px; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; flex-wrap: wrap; gap: 10px; }

/* Mobile Responsive for Admin pages */
@media (max-width: 768px) {
    .page-content { padding: 15px; }
    .page-title { font-size: 1.3rem; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .card-header { padding: 12px 15px; font-size: 1rem; flex-wrap: wrap; }
    .card-body { padding: 15px; }
    .table th, .table td { padding: 10px 8px; font-size: 0.85rem; }
    div[style*="display:flex"][style*="gap:15px"] {
        flex-direction: column !important;
    }
    input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], select, textarea, .form-control {
        font-size: 16px !important;
    }
}
