/**
 * ==========================================
 * 1. CORE STYLES
 * Base variables, resets, and typography
 * ==========================================
 */

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    /* Primary Colors */
    --primary-color: #6366f1;
    --primary-600: #4f46e5;
    --primary-500: #6366f1;
    --primary-400: #818cf8;
    --primary-300: #a5b4fc;
    
    /* Light Mode */
    --bg-light: #f8fafc;
    --bg-light-secondary: #f1f5f9;
    --text-light: #1e293b;
    --text-light-secondary: #475569;
    --border-light: #e2e8f0;
    --card-light: #ffffff;
    
    /* Dark Mode */
    --dark-bg: #0f172a;
    --dark-bg-secondary: #1e293b;
    --text-dark: #f1f5f9;
    --text-dark-secondary: #cbd5e1;
    --border-dark: #334155;
    --card-dark: #1e293b;
    
    /* Semantic Colors */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    
    --muted: rgba(30,42,59,0.6);
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --secondary-gradient: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
}

/* ============================================================
   BASE STYLES
   ============================================================ */
html {
    scroll-behavior: smooth;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Noto Sans Bengali', 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.fw-extrabold {
    font-weight: 800;
}

.small {
    font-size: 0.875rem;
}

.text-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.text-shadow-lg {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tracking-wider {
    letter-spacing: 0.2em;
}

/* ============================================================
   LAYOUT
   ============================================================ */
main {
    min-height: 80vh;
}

.section,
.bordered-section {
    border: 1px solid var(--border-light) !important;
    box-shadow: none;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.rounded-4 {
    border-radius: 0.75rem !important;
}

.rounded-bottom-5 {
    border-bottom-left-radius: 3rem !important;
    border-bottom-right-radius: 3rem !important;
}

.cursor-pointer {
    cursor: pointer;
}

.max-w-sm {
    max-width: 400px;
}

.object-fit-cover {
    object-fit: cover;
}

.transition-all {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   IMAGE UTILITIES
   ============================================================ */
.img-height-140 {
    height: 140px;
    object-fit: cover;
}

.img-height-180 {
    height: 180px;
    object-fit: cover;
}

.img-height-200 {
    height: 200px;
    object-fit: cover;
}

.img-height-220 {
    height: 220px;
    object-fit: cover;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--primary-600);
    transition: all var(--transition-fast);
}

.avatar-sm:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.avatar-md {
    width: 64px;
    height: 64px;
    object-fit: cover;
}

/* ============================================================
   TABLE UTILITIES
   ============================================================ */
.table-col-100 {
    width: 100px;
}

.table-col-120 {
    width: 120px;
}

.table-col-130 {
    width: 130px;
}

/* ============================================================
   PROGRESS & MISC
   ============================================================ */
.progress-sm {
    height: 10px;
}

.error-icon-circle {
    width: 64px;
    height: 64px;
}

.form-select-inline {
    width: auto;
}

.log-detail-value {
    font-size: 0.85rem;
    color: #666;
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar {
    width: 16px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
    transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-600);
}

* {
    scrollbar-color: var(--primary-color) var(--bg-light-secondary);
    scrollbar-width: thin;
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.btn:focus,
.form-select:focus,
a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.service-card,
.btn-filter,
.btn-service-action {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}