/* ============================================
   BASE STYLES - Typography, Colors, Resets
   ============================================ */

/* Reset & Box Model */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Root Variables */
:root {
    /* Colors */
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-darker: #166534;
    --primary-light: #dcfce7;
    --primary-lighter: #f0fdf4;
    
    --secondary: #000000;
    --secondary-light: #333333;
    --secondary-lighter: #666666;
    
    --text-primary: #333333;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-highlight: #f0f0f0;
    
    --border-light: #e5e7eb;
    --border-medium: #e0e0e0;
    --border-dark: #ddd;
    
    --success: #22c55e;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 5rem;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-serif: 'Georgia', serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);
    
    --shadow-primary: 0 4px 12px rgba(22, 163, 74, 0.25);
    --shadow-primary-hover: 0 6px 16px rgba(22, 163, 74, 0.35);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 1000;
    --z-overlay: 999;
    --z-modal: 1000;
}

/* Typography */
body {
    font-family: var(--font-primary);
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--bg-primary);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-darker);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 800;
    letter-spacing: -1px;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: var(--spacing-lg);
}

h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 600;
}

h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 600;
}

p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-normal);
}

/* Utility Classes */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    width: 100%;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.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); }

.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); }

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection */
::selection {
    background: var(--primary-light);
    color: var(--primary-darker);
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* List Reset */
ul, ol {
    list-style: none;
}

/* Button Reset */
button {
    font-family: inherit;
    cursor: pointer;
}

/* Input Reset */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* Form Input Styles - Add this to your base.css or components.css */

/* Text Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="url"],
textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-normal);
    background: var(--bg-secondary);
    color: var(--text-primary);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
    background: var(--bg-primary);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="tel"]::placeholder,
input[type="number"]::placeholder,
input[type="url"]::placeholder,
textarea::placeholder {
    color: var(--text-light);
}

input[type="text"]:disabled,
input[type="email"]:disabled,
input[type="password"]:disabled,
input[type="tel"]:disabled,
input[type="number"]:disabled,
input[type="url"]:disabled,
textarea:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Checkbox and Radio Styles */
input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Textarea */
textarea {
    min-height: 120px;
    resize: vertical;
}

/* Input with icons */
.input-with-icon {
    position: relative;
}

.input-with-icon input {
    padding-left: 3rem;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
  /* Dropdown hover effects */
    nav [style*="padding: 0.75rem 1rem"]:hover {
        background: var(--primary-lighter);
        color: var(--primary-darker) !important;
    }
    
    nav [style*="padding: 0.75rem 1rem"] i {
        transition: transform 0.2s;
    }
    
    nav [style*="padding: 0.75rem 1rem"]:hover i {
        transform: translateX(3px);
    }
    
    /* Logout button hover */
    nav button[type="submit"]:hover {
        background: rgba(239, 68, 68, 0.1);
    }
    
    /* Mobile menu styles */
    @media (max-width: 768px) {
        .nav-links,
        .nav-buttons {
            display: none !important;
        }
        
        .mobile-menu-btn {
            display: flex !important;
            align-items: center;
            justify-content: center;
            width: 2.5rem;
            height: 2.5rem;
            background: none;
            border: none;
            color: var(--text-primary);
            font-size: 1.25rem;
            cursor: pointer;
        }
        
        .mobile-menu {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: white;
            border-top: 1px solid var(--border-light);
            box-shadow: 0 10px 25px rgba(0,0,0,0.1);
            padding: 1rem;
            z-index: 999;
        }
        
        .mobile-menu a {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 0;
            color: var(--text-secondary);
            text-decoration: none;
            border-bottom: 1px solid var(--border-light);
        }
        
        .mobile-menu a:last-child {
            border-bottom: none;
        }
        
        .mobile-menu i {
            width: 1.25rem;
            color: var(--primary);
        }
    }
    
    /* Active link */
    .nav-links a.active {
        color: var(--primary);
        font-weight: 600;
    }

    /* Wilaya select styling */
.form-group select {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-lighter);
}

.form-group select:hover {
    border-color: var(--primary-light);
}

.form-group select option {
    color: var(--text-primary);
    background: var(--bg-primary);
    padding: 0.5rem;
}

.form-group select option[value=""] {
    color: var(--text-muted);
}

/* ============================================
   LARAVEL PAGINATION - SVG ARROW FIX
   ============================================ */

/* Nuclear option: force ALL pagination SVGs to be small */
[role="navigation"] svg,
.pagination svg {
    width: 0.75rem !important;
    height: 0.75rem !important;
    display: inline-block !important;
    vertical-align: middle;
    flex-shrink: 0;
    pointer-events: none;
}

/* Tailwind pagination wrapper */
[role="navigation"] span,
[role="navigation"] a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-light);
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    line-height: 1;
}

/* Remove double-borders from nested spans */
[role="navigation"] span span,
[role="navigation"] span a {
    border: none !important;
    min-width: unset;
    height: unset;
    padding: 0;
    background: transparent;
}

/* Outer span is the styled pill */
[role="navigation"] > span,
[role="navigation"] > a {
    border: 1.5px solid var(--border-light);
}

/* Active page */
[role="navigation"] span[aria-current="page"] {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

/* Hover */
[role="navigation"] > a:hover {
    background: var(--primary-lighter);
    border-color: var(--primary);
    color: var(--primary-darker);
}

/* Disabled prev/next */
[role="navigation"] span:not([aria-current]) {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bootstrap simple pagination (« Previous / Next ») */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    padding: 0;
    margin: var(--spacing-lg) 0;
    flex-wrap: wrap;
}

.pagination .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.25rem;
    padding: 0 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-light);
    background: var(--bg-primary);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination .page-item .page-link:hover {
    background: var(--primary-lighter);
    border-color: var(--primary);
    color: var(--primary-darker);
}
[role="navigation"] > span,
[role="navigation"] > a {
    color: var(--secondary) !important;
    font-weight: 700 !important;
}