/* Admin Panel Styles - Premium Design with Dark Mode */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

:root {
    /* الألوان الرئيسية - الهوية البصرية الجديدة */
    --primary-color: #562728;         /* اللون الأساسي (70%) - بني غامق */
    --primary-light: #6e3436;
    --primary-dark: #3e1c1f;
    --secondary-color: #f48627;       /* اللون الثانوي (10%) - برتقالي */
    --secondary-dark: #d96f1a;
    --accent-color: #ea1952;          /* لون التمييز (20%) - أحمر وردي */
    --accent-light: #ee3e6c;
    --accent-dark: #c11543;
    
    /* الألوان الوظيفية */
    --text-color: #2c3e50;
    --text-light: #6c757d;
    --bg-color: #f4f6f9;
    --white: #ffffff;
    --border-color: #dee2e6;
    --success: #28a745;
    --danger: #ea1952;                /* استخدام لون التمييز للخطر */
    --warning: #f48627;               /* استخدام اللون الثانوي للتحذير */
    --info: #562728;                  /* استخدام اللون الأساسي للمعلومات */
    
    /* الأبعاد */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 70px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --text-color: #e0e0e0;
    --text-light: #b0b0b0;
    --bg-color: #1a1a1a;
    --white: #2d2d2d;
    --border-color: #404040;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(244, 134, 39, 0.15) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: var(--white);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border-top: 5px solid var(--accent-color);
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 800;
}

.login-header p {
    color: var(--text-light);
}

.login-footer {
    text-align: center;
    margin-top: 30px;
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

/* Admin Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: var(--topbar-height);
}

/* Top Bar */
.topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: var(--topbar-height);
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-logo img {
    height: 50px;
}

.topbar-logo h1 {
    font-size: 1.5em;
    font-weight: 800;
    color: #ffffff;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.topbar-user-info {
    text-align: left;
}

.topbar-user-name {
    font-weight: 700;
    font-size: 1.1em;
}

.topbar-user-role {
    font-size: 0.85em;
    opacity: 0.8;
}

.topbar-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary-dark);
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    position: fixed;
    right: 0;
    top: var(--topbar-height);
    height: calc(100vh - var(--topbar-height));
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    border-left: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.sidebar img {
    filter: none !important;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-nav a span {
    display: none;
}

.sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: 15px 10px;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    border-right: 3px solid transparent;
    font-weight: 600;
    white-space: nowrap;
}

.sidebar-nav a:hover {
    background: #f8f9fa;
    color: var(--primary-color);
}

[data-theme="dark"] .sidebar-nav a:hover {
    background: #3a3a3a;
}

.sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(86, 39, 40, 0.1), transparent);
    border-right-color: var(--accent-color);
    color: var(--primary-color);
}

[data-theme="dark"] .sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(86, 39, 40, 0.3), transparent);
}

/* Main Content */
.main-content {
    margin-right: var(--sidebar-width);
    padding: 40px;
    flex: 1;
    width: calc(100% - var(--sidebar-width));
    transition: all 0.3s ease;
}

.sidebar.collapsed~.main-content {
    margin-right: var(--sidebar-collapsed-width);
    width: calc(100% - var(--sidebar-collapsed-width));
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    color: var(--primary-color);
    font-size: 2em;
    font-weight: 800;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s, border-color 0.3s;
}

/* Modern Statistics Cards */
.stats-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px 25px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.stats-card .stats-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    color: white;
    border-radius: 12px;
    margin-left: 20px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.stats-card .stats-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(45deg);
}

.stats-card .stats-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-card h6 {
    font-size: 0.8em;
    font-weight: 600;
    color: #8b95a5;
    margin-bottom: 8px;
    text-transform: none;
    letter-spacing: 0;
}

.stats-card h2 {
    font-size: 2em;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
    line-height: 1;
}

.stats-card p {
    font-size: 0.8em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Gradient Backgrounds for Icons */
.bg-gradient-primary {
    background: linear-gradient(135deg, #562728 0%, #6e3436 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, #562728 0%, #6e3436 100%);
}

.bg-gradient-success-alt {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
}

.bg-gradient-warning {
    background: linear-gradient(135deg, #f48627 0%, #ff9a3c 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, #ea1952 0%, #ff3366 100%);
}

.bg-gradient-info {
    background: linear-gradient(135deg, #562728 0%, #6e3436 100%);
}

.bg-gradient-purple {
    background: linear-gradient(135deg, #f48627 0%, #ff9a3c 100%);
}

.bg-gradient-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
}

/* Dark Mode Stats Cards */
[data-theme="dark"] .stats-card {
    background: #2d2d2d;
    border: 1px solid #404040;
}

[data-theme="dark"] .stats-card h2 {
    color: #e0e0e0;
}

[data-theme="dark"] .stats-card h6 {
    color: #b0b0b0;
}

.card-header {
    padding: 25px 30px;
    border-bottom: 3px solid var(--accent-color);
    background: #f8f9fa;
}

[data-theme="dark"] .card-header {
    background: #2d2d2d;
}

.card-header h2,
.card-header h5 {
    color: var(--primary-color);
    font-size: 1.4em;
    font-weight: 700;
    margin: 0;
}

.card-body {
    padding: 30px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, var(--white), #fafafa);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    border-right: 4px solid var(--accent-color);
}

[data-theme="dark"] .stat-card {
    background: linear-gradient(135deg, #2d2d2d, #353535);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 3em;
    filter: grayscale(0.3);
}

.stat-info h3 {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 800;
}

.stat-info p {
    color: var(--text-light);
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1em;
    transition: all 0.3s;
    background: var(--white);
    color: var(--text-color);
}

.form-control:focus {
    border-color: var(--accent-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(234, 25, 82, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(86, 39, 40, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 39, 40, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: #ffffff;
}

.btn-success {
    background: var(--success);
    color: #ffffff;
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.9em;
}

.btn-block {
    width: 100%;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: linear-gradient(135deg, #fafafa, #ffffff);
}

[data-theme="dark"] .data-table thead {
    background: linear-gradient(135deg, #2d2d2d, #353535);
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 700;
    color: var(--primary-color);
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

[data-theme="dark"] .data-table tbody tr:hover {
    background: #3a3a3a;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
}

.badge-pending {
    background: #fff3cd;
    color: #856404;
}

.badge-accepted {
    background: #d4edda;
    color: #155724;
}

.badge-rejected {
    background: #f8d7da;
    color: #721c24;
}

.badge-interview {
    background: #d1ecf1;
    color: #0c5460;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-right: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-right-color: #28a745;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-right-color: #dc3545;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-right-color: #17a2b8;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.info-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-right: 3px solid var(--accent-color);
    transition: background-color 0.3s;
}

[data-theme="dark"] .info-item {
    background: #3a3a3a;
}

.info-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 700;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s;
    background: var(--white);
}

.pagination a:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.pagination .active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        top: 0;
    }

    .sidebar.collapsed {
        width: 100%;
    }

    .main-content {
        margin-right: 0;
        padding: 20px;
        width: 100%;
    }

    .sidebar.collapsed~.main-content {
        margin-right: 0;
        width: 100%;
    }

    .admin-wrapper {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .topbar {
        padding: 0 15px;
    }

    .topbar-logo h1 {
        font-size: 1.2em;
    }

    .topbar-user-info {
        display: none;
    }
}

/* Additional Card Header Styling */
.card-header i,
.card-header .fas,
.card-header .far {
    color: var(--primary-color);
}

.card-header button,
.card-header .btn {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
}

.card-header button:hover,
.card-header .btn:hover {
    background: var(--bg-color);
    border-color: var(--accent-color);
}

.dark-mode .developer-logo {
    filter: brightness(0) invert(1);
}
