/* ====================================
   ARX Development - Voting System
   Brand Identity Stylesheet
   ==================================== */

/* ==================
   CSS Variables
   ================== */
:root {
    /* Brand Colors */
    --arx-blue: #035a8d;
    --arx-blue-dark: #024a75;
    --arx-blue-light: #0470b3;
    --arx-gold: #e1a12c;
    --arx-gold-dark: #c89021;
    --arx-gold-light: #f0b849;
    
    /* Text Colors */
    --text-dark: #2c3e50;
    --text-medium: #4a5568;
    --text-light: #7f8c8d;
    --text-lighter: #a0aec0;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f5;
    --bg-light: #e9ecef;
    
    /* Border Colors */
    --border-light: #e9ecef;
    --border-medium: #dee2e6;
    --border-dark: #ced4da;
    
    /* Status Colors */
    --success: #28a745;
    --success-light: #d4edda;
    --danger: #dc3545;
    --danger-light: #f8d7da;
    --warning: #ffc107;
    --warning-light: #fff3cd;
    --info: #17a2b8;
    --info-light: #d1ecf1;
    
    /* Shadows */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 12px 35px rgba(0, 0, 0, 0.2);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: all 0.2s ease;
    --transition-base: all 0.3s ease;
    --transition-slow: all 0.4s ease;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 2.5rem;
    --spacing-2xl: 3rem;
}

/* ==================
   Base Styles
   ================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--arx-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--arx-blue-dark);
}

/* ==================
   Container
   ================== */
.container {
    width: 100%;
    min-height: 100vh;
    padding: 20px;
}

/* ==================
   Card Styles
   ================== */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-md);
    max-width: 1200px;
    margin: 40px auto;
}

.card h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: var(--spacing-lg);
}

.card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-md);
}

/* ==================
   Header with Logo
   ================== */
.page-header {
    background: linear-gradient(135deg, var(--arx-blue) 0%, var(--arx-blue-dark) 100%);
    border-radius: var(--radius-xl);
    padding: 50px 30px;
    text-align: center;
    color: white;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(225, 161, 44, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10%, -10%) scale(1.1); }
}

.page-header .logo {
    height: 80px;
    width: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* ==================
   Alert Styles
   ================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.alert svg,
.alert .alert-icon {
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-light);
    color: #155724;
    border-right: 4px solid var(--success);
}

.alert-error,
.alert-danger {
    background: var(--danger-light);
    color: #721c24;
    border-right: 4px solid var(--danger);
}

.alert-warning {
    background: var(--warning-light);
    color: #856404;
    border-right: 4px solid var(--warning);
}

.alert-info {
    background: var(--info-light);
    color: #0c5460;
    border-right: 4px solid var(--info);
}

/* ==================
   Form Styles
   ================== */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: var(--transition-base);
    background: white;
    color: var(--text-dark);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.form-control:focus {
    outline: none;
    border-color: var(--arx-blue);
    box-shadow: 0 0 0 3px rgba(3, 90, 141, 0.1);
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ==================
   Button Styles
   ================== */
.btn {
    display: inline-block;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--arx-gold) 0%, var(--arx-gold-dark) 100%);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-md);
    font-family: 'Cairo', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    padding: 18px 35px;
    font-size: 1.15rem;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--arx-blue) 0%, var(--arx-blue-dark) 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #218838 100%);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #c82333 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
}

.btn-info {
    background: linear-gradient(135deg, var(--info) 0%, #138496 100%);
}

/* ==================
   Navigation Links
   ================== */
.nav-links {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.nav-links a {
    flex: 1;
    min-width: 200px;
    padding: 16px 25px;
    background: white;
    color: var(--arx-blue);
    text-decoration: none;
    border: 2px solid var(--arx-blue);
    border-radius: var(--radius-md);
    font-weight: 700;
    text-align: center;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.nav-links a:hover {
    background: var(--arx-blue);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ==================
   Statistics Cards
   ================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    padding: 25px;
    border-radius: var(--radius-md);
    color: white;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card.blue {
    background: linear-gradient(135deg, var(--arx-blue) 0%, var(--arx-blue-dark) 100%);
}

.stat-card.gold {
    background: linear-gradient(135deg, var(--arx-gold) 0%, var(--arx-gold-dark) 100%);
}

.stat-card.green {
    background: linear-gradient(135deg, var(--success) 0%, #218838 100%);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.95;
}

/* ==================
   Table Styles
   ================== */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.admin-table th {
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-light) 100%);
    font-weight: 700;
    color: var(--text-dark);
    font-size: 1rem;
}

.admin-table tbody tr {
    transition: var(--transition-fast);
}

.admin-table tbody tr:hover {
    background: var(--bg-secondary);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==================
   Action Buttons
   ================== */
.action-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 5px;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    display: inline-block;
    transition: var(--transition-fast);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ==================
   Loading Spinner
   ================== */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(3, 90, 141, 0.1);
    border-top-color: var(--arx-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================
   Empty State
   ================== */
.empty-state {
    text-align: center;
    padding: 60px 30px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    margin: 20px 0;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* ==================
   Modal Styles
   ================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 35px;
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 550px;
    box-shadow: var(--shadow-xl);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--text-dark);
    font-size: 1.5rem;
}

/* ==================
   Responsive
   ================== */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .card {
        padding: 25px;
        margin: 20px auto;
    }
    
    .page-header {
        padding: 35px 20px;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .page-header .logo {
        height: 60px;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-links a {
        min-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-table {
        font-size: 0.9rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    .card {
        padding: 20px;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

/* ==================
   Utility Classes
   ================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }
