/* 
 * AtharPlus Brand Identity CSS
 * Official brand colors and styles for assessment system
 * Based on https://atharplus.ae branding
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* Brand Color Variables */
:root {
    /* Primary AtharPlus Colors */
    --athar-primary: #D6DE70;
    --athar-primary-light: #E5ED8C;
    --athar-primary-dark: #C4D05F;
    
    /* Secondary Colors */
    --athar-secondary: #1A2921;
    --athar-secondary-light: #2B4A3A;
    --athar-secondary-dark: #0F1A15;
    
    /* Neutral Colors */
    --athar-white: #FFFFFF;
    --athar-light-gray: #F5F7FA;
    --athar-gray: #E0E0E0;
    --athar-dark-gray: #666666;
    --athar-text: #1A2921;
    
    /* Gradients */
    --athar-gradient-primary: linear-gradient(135deg, #D6DE70 0%, #A8B85A 100%);
    --athar-gradient-secondary: linear-gradient(135deg, #1A2921 0%, #2B4A3A 100%);
    --athar-gradient-hero: linear-gradient(135deg, #D6DE70 0%, #1A2921 100%);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-arabic: 'Noto Kufi Arabic', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(26, 41, 33, 0.1);
    --shadow-md: 0 4px 8px rgba(26, 41, 33, 0.15);
    --shadow-lg: 0 10px 20px rgba(26, 41, 33, 0.2);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
}

/* Global Typography */
body {
    font-family: var(--font-primary) !important;
    color: var(--athar-text) !important;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary) !important;
    color: var(--athar-secondary) !important;
    font-weight: 600;
}

/* Logo Styles */
.athar-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.athar-logo:hover {
    opacity: 0.8;
}

.athar-logo img {
    height: 40px;
    width: auto;
}

.athar-logo-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--athar-primary);
    margin-left: 10px;
    letter-spacing: -0.5px;
}

/* Header/Navigation Overrides */
.header, .login-header, nav {
    background: var(--athar-gradient-secondary) !important;
    color: var(--athar-white) !important;
    border-bottom: 3px solid var(--athar-primary);
}

.header h1, .header h2, .header p,
.login-header h1, .login-header h2, .login-header p {
    color: var(--athar-white) !important;
}

/* Button Styles */
.btn, button {
    font-family: var(--font-primary) !important;
    font-weight: 500;
    border-radius: var(--radius-md) !important;
    padding: 12px 24px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer;
}

.btn-primary, .login-btn, .submit-btn, button[type="submit"] {
    background: var(--athar-primary) !important;
    color: var(--athar-secondary) !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover, .login-btn:hover, .submit-btn:hover, button[type="submit"]:hover {
    background: var(--athar-primary-dark) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--athar-secondary) !important;
    color: var(--athar-white) !important;
}

.btn-secondary:hover {
    background: var(--athar-secondary-light) !important;
    transform: translateY(-2px);
}

.logout-btn {
    background: rgba(214, 222, 112, 0.2) !important;
    color: var(--athar-primary) !important;
    border: 1px solid var(--athar-primary) !important;
}

.logout-btn:hover {
    background: var(--athar-primary) !important;
    color: var(--athar-secondary) !important;
}

/* Form Elements */
input, select, textarea {
    font-family: var(--font-primary) !important;
    border: 2px solid var(--athar-gray) !important;
    border-radius: var(--radius-md) !important;
    transition: all 0.3s ease !important;
}

input:focus, select:focus, textarea:focus {
    outline: none !important;
    border-color: var(--athar-primary) !important;
    box-shadow: 0 0 0 3px rgba(214, 222, 112, 0.2) !important;
}

label {
    color: var(--athar-secondary) !important;
    font-weight: 500 !important;
}

/* Cards and Containers */
.card, .stat-card, .container, .login-container, .modal-content {
    background: var(--athar-white) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
}

/* Progress Bars */
.progress-bar {
    background: var(--athar-gray) !important;
    border-radius: var(--radius-sm) !important;
}

.progress-fill {
    background: var(--athar-gradient-primary) !important;
}

/* Status Badges */
.status-badge {
    border-radius: var(--radius-xl) !important;
    font-weight: 500 !important;
    padding: 6px 12px !important;
}

.status-submitted {
    background: var(--athar-primary) !important;
    color: var(--athar-secondary) !important;
}

.status-pending {
    background: #FFF3CD !important;
    color: #856404 !important;
}

.status-reviewing {
    background: #D1ECF1 !important;
    color: #0C5460 !important;
}

.status-draft {
    background: var(--athar-light-gray) !important;
    color: var(--athar-dark-gray) !important;
}

/* Chips and Tags */
.chip {
    background: var(--athar-light-gray) !important;
    color: var(--athar-secondary) !important;
    border: 2px solid transparent !important;
    border-radius: var(--radius-xl) !important;
    transition: all 0.3s ease !important;
}

.chip:hover {
    background: var(--athar-gray) !important;
}

.chip.selected {
    background: var(--athar-primary) !important;
    color: var(--athar-secondary) !important;
    border-color: var(--athar-primary-dark) !important;
}

/* Tables */
table thead th {
    background: var(--athar-light-gray) !important;
    color: var(--athar-secondary) !important;
    font-weight: 600 !important;
    border-bottom: 2px solid var(--athar-primary) !important;
}

table tbody tr:hover {
    background: rgba(214, 222, 112, 0.1) !important;
}

/* Quick Select Buttons */
.quick-btn {
    background: var(--athar-white) !important;
    border: 2px solid var(--athar-gray) !important;
    color: var(--athar-secondary) !important;
}

.quick-btn:hover {
    border-color: var(--athar-primary) !important;
    background: rgba(214, 222, 112, 0.1) !important;
}

.quick-btn.active {
    background: var(--athar-primary) !important;
    border-color: var(--athar-primary) !important;
    color: var(--athar-secondary) !important;
}

/* Stat Cards */
.stat-value {
    color: var(--athar-primary) !important;
    font-weight: 700 !important;
}

.stat-label {
    color: var(--athar-dark-gray) !important;
}

/* Checkboxes and Radio Buttons */
input[type="checkbox"]:checked,
input[type="radio"]:checked {
    accent-color: var(--athar-primary) !important;
}

/* Links */
a {
    color: var(--athar-primary-dark) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--athar-secondary) !important;
    text-decoration: underline;
}

/* Backgrounds */
body {
    background: var(--athar-light-gray) !important;
}

.login-container body,
body.login-page {
    background: linear-gradient(135deg, rgba(214, 222, 112, 0.1) 0%, rgba(26, 41, 33, 0.05) 100%) !important;
}

/* Alerts and Messages */
.error-message {
    color: #DC3545 !important;
    background: #F8D7DA !important;
    border: 1px solid #F5C6CB !important;
    padding: 10px !important;
    border-radius: var(--radius-md) !important;
}

.success-message {
    color: var(--athar-secondary) !important;
    background: var(--athar-primary) !important;
    border: 1px solid var(--athar-primary-dark) !important;
    padding: 10px !important;
    border-radius: var(--radius-md) !important;
}

/* Info Box */
.info-box {
    background: rgba(214, 222, 112, 0.1) !important;
    border-left: 4px solid var(--athar-primary) !important;
}

.info-box h3 {
    color: var(--athar-secondary) !important;
}

/* Geometric Pattern Background */
.geometric-pattern {
    position: relative;
    overflow: hidden;
}

.geometric-pattern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(214, 222, 112, 0.03) 10px,
        rgba(214, 222, 112, 0.03) 20px
    );
    transform: rotate(30deg);
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .athar-logo img {
        height: 32px;
    }
    
    .athar-logo-text {
        font-size: 20px;
    }
    
    .btn, button {
        padding: 10px 20px !important;
    }
}

/* Accessibility */
*:focus-visible {
    outline: 3px solid var(--athar-primary) !important;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header, .logout-btn, .btn-secondary {
        background: var(--athar-secondary) !important;
        color: var(--athar-white) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}