/* ============================================
   SHREEKUNDLI WEB - TAILWIND V4 THEME
   Primary: #d42020 (Red)
   Secondary: #fef3c7 (Cream/Gold)
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Poppins:wght@300;400;500;600;700&display=swap');

/* ============================================
   CSS VARIABLES - LIGHT MODE (DEFAULT)
   ============================================ */
:root {
    --background: #ffffff;
    --foreground: #1a1a1a;
    --card: #ffffff;
    --card-foreground: #1a1a1a;
    --popover: #faf7f5;
    --popover-foreground: #1a1a1a;
    --primary: #d42020;
    --primary-foreground: #ffffff;
    --secondary: #fef3c7;
    --secondary-foreground: #d42020;
    --muted: #f0ebe8;
    --muted-foreground: #57534e;
    --accent: #fef3c7;
    --accent-foreground: #d42020;
    --destructive: #d42020;
    --destructive-foreground: #ffffff;
    --border: #f5e8d2;
    --input: #f5e8d2;
    --ring: #d42020;
    --chart-1: #d42020;
    --chart-2: #9b2c2c;
    --chart-3: #7f1d1d;
    --chart-4: #b45309;
    --chart-5: #92400e;
    --sidebar: #ffffff;
    --sidebar-foreground: #1a1a1a;
    --sidebar-primary: #d42020;
    --sidebar-primary-foreground: #ffffff;
    --sidebar-accent: #fef3c7;
    --sidebar-accent-foreground: #d42020;
    --sidebar-border: #f5e8d2;
    --sidebar-ring: #d42020;
    --font-sans: 'Poppins', sans-serif;
    --font-serif: 'Libre Baskerville', serif;
    --font-mono: 'IBM Plex Mono', monospace;
    --radius: 0.5rem;
    --shadow-color: hsl(0 63% 18%);
    --shadow-2xs: 1px 1px 16px -2px hsl(0 63% 18% / 0.06);
    --shadow-xs: 1px 1px 16px -2px hsl(0 63% 18% / 0.06);
    --shadow-sm: 1px 1px 16px -2px hsl(0 63% 18% / 0.12), 1px 1px 2px -3px hsl(0 63% 18% / 0.12);
    --shadow: 1px 1px 16px -2px hsl(0 63% 18% / 0.12), 1px 1px 2px -3px hsl(0 63% 18% / 0.12);
    --shadow-md: 1px 1px 16px -2px hsl(0 63% 18% / 0.12), 1px 2px 4px -3px hsl(0 63% 18% / 0.12);
    --shadow-lg: 1px 1px 16px -2px hsl(0 63% 18% / 0.12), 1px 4px 6px -3px hsl(0 63% 18% / 0.12);
    --shadow-xl: 1px 1px 16px -2px hsl(0 63% 18% / 0.12), 1px 8px 10px -3px hsl(0 63% 18% / 0.12);
    --shadow-2xl: 1px 1px 16px -2px hsl(0 63% 18% / 0.30);
}

/* ============================================
   CSS VARIABLES - DARK MODE
   ============================================ */
.dark {
    --background: #1c1917;
    --foreground: #f5f5f4;
    --card: #292524;
    --card-foreground: #f5f5f4;
    --popover: #292524;
    --popover-foreground: #f5f5f4;
    --primary: #ef4444;
    --primary-foreground: #faf7f5;
    --secondary: #92400e;
    --secondary-foreground: #fef3c7;
    --muted: #1f1c1a;
    --muted-foreground: #d6d3d1;
    --accent: #b45309;
    --accent-foreground: #fef3c7;
    --destructive: #ef4444;
    --destructive-foreground: #ffffff;
    --border: #44403c;
    --input: #44403c;
    --ring: #ef4444;
    --chart-1: #f87171;
    --chart-2: #ef4444;
    --chart-3: #dc2626;
    --chart-4: #fbbf24;
    --chart-5: #f59e0b;
    --sidebar: #1c1917;
    --sidebar-foreground: #f5f5f4;
    --sidebar-primary: #ef4444;
    --sidebar-primary-foreground: #faf7f5;
    --sidebar-accent: #b45309;
    --sidebar-accent-foreground: #fef3c7;
    --sidebar-border: #44403c;
    --sidebar-ring: #ef4444;
}

/* ============================================
   BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    color: var(--foreground);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

/* Cosmic Background Layers */
.cosmic-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(212, 32, 32, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(254, 243, 199, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(212, 32, 32, 0.1) 0%, transparent 60%),
        linear-gradient(180deg,
            #ffffff 0%,
            #fff5f5 30%,
            #fef3c7 60%,
            #ffe8e8 100%
        );
}

.texture-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.6;
    pointer-events: none;
}

.stars-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #d42020;
    border-radius: 50%;
    opacity: 0.6;
    animation: blink 2s ease-in-out infinite;
}

.star.bright {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 8px rgba(212, 32, 32, 0.8);
    animation: blink-bright 1.5s ease-in-out infinite;
}

.star.dim {
    opacity: 0.3;
    animation-duration: 3s;
}

@keyframes blink {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

@keyframes blink-bright {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.glow-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: orbit 25s ease-in-out infinite;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 32, 32, 0.1) 0%, transparent 70%);
    top: 10%;
    left: 15%;
    animation-duration: 30s;
}

.orb-2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(254, 243, 199, 0.15) 0%, transparent 70%);
    bottom: 20%;
    right: 20%;
    animation-duration: 35s;
    animation-delay: -10s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(212, 32, 32, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    animation-duration: 40s;
    animation-delay: -20s;
}

@keyframes orbit {
    0%, 100% {
        transform: translate(0, 0);
    }
    25% {
        transform: translate(30px, -20px);
    }
    50% {
        transform: translate(-20px, 30px);
    }
    75% {
        transform: translate(20px, 20px);
    }
}

.cosmic-dust {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.dust-particle {
    position: absolute;
    width: 1px;
    height: 1px;
    background: rgba(254, 243, 199, 0.4);
    border-radius: 50%;
    animation: drift 30s linear infinite;
}

@keyframes drift {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translate(100px, 100vh);
        opacity: 0;
    }
}

.zodiac-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.zodiac-symbol {
    position: absolute;
    font-size: 120px;
    color: #fef3c7;
    opacity: 0.02;
    animation: float-symbol 40s linear infinite;
}

.zodiac-symbol:nth-child(2) {
    font-size: 100px;
    animation-duration: 50s;
    animation-delay: -10s;
}

.zodiac-symbol:nth-child(3) {
    font-size: 140px;
    animation-duration: 45s;
    animation-delay: -20s;
}

@keyframes float-symbol {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.02;
    }
    90% {
        opacity: 0.02;
    }
    100% {
        transform: translateY(-120px) rotate(360deg);
        opacity: 0;
    }
}

/* ============================================
   INTL-TEL-INPUT CUSTOMIZATION
   ============================================ */
.iti {
    width: 100%;
    display: block;
}

.iti__tel-input {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-left: 90px;
    font-size: 1rem;
    font-family: var(--font-sans);
    border: 1px solid var(--input);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.iti__tel-input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px rgba(212, 32, 32, 0.1);
}

.iti__selected-country {
    padding: 0 12px;
    background-color: var(--secondary);
    border-right: 1px solid var(--border);
    transition: background-color 0.2s ease;
}

.iti__selected-country:hover {
    background-color: rgba(254, 243, 199, 0.8);
}

.iti__arrow {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--foreground);
}

.iti__arrow--up {
    border-top: none;
    border-bottom: 5px solid var(--foreground);
}

.iti__country-list {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    z-index: 9999;
    font-family: var(--font-sans);
}

.iti__country {
    padding: 8px 12px;
    transition: background-color 0.15s ease;
}

.iti__country:hover,
.iti__country.iti__highlight {
    background-color: var(--secondary);
}

.iti__country.iti__active {
    background-color: rgba(212, 32, 32, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.iti__divider {
    border-bottom: 1px solid var(--border);
    margin: 4px 0;
}

.iti__search-input {
    width: calc(100% - 16px);
    margin: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.875rem;
}

.iti__search-input:focus {
    outline: none;
    border-color: var(--ring);
}

.iti__dial-code {
    color: var(--muted-foreground);
    font-family: var(--font-mono);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .iti__country-list {
        width: 100vw;
        left: 0 !important;
        right: 0;
        max-width: 100vw;
    }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    color: var(--foreground);
    line-height: 1.3;
    margin: 0 0 0.5rem 0;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

.font-serif {
    font-family: var(--font-serif);
}

.font-mono {
    font-family: var(--font-mono);
}

p {
    margin: 0 0 1rem 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--chart-2);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px hsl(0 63% 48% / 0.3);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--chart-2);
    border-color: var(--chart-2);
    color: var(--primary-foreground);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: #fde68a;
    border-color: #fde68a;
}

.btn-outline {
    background-color: transparent;
    color: var(--foreground);
    border-color: var(--border);
}

.btn-outline:hover {
    background-color: var(--muted);
    border-color: var(--muted-foreground);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.btn-ghost {
    background-color: transparent;
    color: var(--foreground);
    border-color: transparent;
}

.btn-ghost:hover {
    background-color: var(--muted);
}

.btn-destructive {
    background-color: var(--destructive);
    color: var(--destructive-foreground);
    border-color: var(--destructive);
}

.btn-destructive:hover {
    background-color: var(--chart-3);
    border-color: var(--chart-3);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-icon {
    padding: 0.625rem;
    width: 2.5rem;
    height: 2.5rem;
}

.btn-icon.btn-sm {
    width: 2rem;
    height: 2rem;
    padding: 0.375rem;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background-color: var(--card);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.card-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0.25rem 0 0 0;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background-color: var(--muted);
}

/* Card hover effect */
.card-hover {
    transition: all 0.2s ease;
}

.card-hover:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ============================================
   FORMS
   ============================================ */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.375rem;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    padding: 0.625rem 0.875rem;
    background-color: var(--background);
    border: 1px solid var(--input);
    border-radius: var(--radius);
    color: var(--foreground);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px hsl(0 63% 48% / 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--muted-foreground);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background-color: var(--muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 0.25rem;
}

.form-error {
    font-size: 0.75rem;
    color: var(--destructive);
    margin-top: 0.25rem;
}

/* Checkbox and Radio */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--foreground);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
}

.badge-primary {
    background-color: var(--primary);
    color: var(--primary-foreground);
}

.badge-secondary {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
}

.badge-muted {
    background-color: var(--muted);
    color: var(--muted-foreground);
}

.badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-danger {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    border-radius: var(--radius);
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--foreground);
    background-color: var(--muted);
}

.nav-link.active {
    color: var(--primary);
    background-color: var(--accent);
}

.nav-link i {
    font-size: 1.125rem;
}

/* ============================================
   DROPDOWN
   ============================================ */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    min-width: 12rem;
    padding: 0.5rem 0;
    background-color: var(--popover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: all 0.2s ease;
}

.dropdown.open .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
[data-dropdown].open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu.left {
    left: 0;
    right: auto;
}

.dropdown-header {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Page Header Styling */
.page-header {
    background-color: var(--card);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: var(--popover-foreground);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.dropdown-item:hover {
    background-color: var(--muted);
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border);
    margin: 0.5rem 0;
}

/* ============================================
   MODAL/DIALOG
   ============================================ */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    z-index: 1050;
    width: 100%;
    max-width: 32rem;
    max-height: 90vh;
    background-color: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-2xl);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    padding: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-foreground);
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--foreground);
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    font-weight: 600;
    background-color: var(--muted);
    color: var(--foreground);
}

.table tbody tr:hover {
    background-color: var(--muted);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   AVATAR
   ============================================ */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background-color: var(--muted);
    color: var(--muted-foreground);
    font-weight: 600;
    font-size: 0.875rem;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
}

/* ============================================
   LOADING/SPINNER
   ============================================ */
.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 9999px;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner-sm {
    width: 1rem;
    height: 1rem;
}

.spinner-lg {
    width: 2.5rem;
    height: 2.5rem;
    border-width: 3px;
}

/* ============================================
   UTILITIES
   ============================================ */

/* Colors */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary-foreground) !important; }
.text-muted { color: var(--muted-foreground) !important; }
.text-foreground { color: var(--foreground) !important; }
.text-success { color: #16a34a !important; }
.text-warning { color: #ca8a04 !important; }
.text-danger { color: var(--destructive) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-muted { background-color: var(--muted) !important; }
.bg-accent { background-color: var(--accent) !important; }
.bg-card { background-color: var(--card) !important; }

/* Spacing */
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.25rem !important; }
.p-6 { padding: 1.5rem !important; }

.px-0 { padding-left: 0 !important; padding-right: 0 !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.py-5 { padding-top: 1.25rem !important; padding-bottom: 1.25rem !important; }
.py-6 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }

.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 0.75rem !important; }
.m-4 { margin: 1rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.25rem !important; }
.mb-6 { margin-bottom: 1.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-auto { margin-top: auto !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }

/* Flexbox */
.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }
.flex-col { flex-direction: column !important; }
.flex-row { flex-direction: row !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-1 { flex: 1 1 0% !important; }
.flex-grow { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

.items-center { align-items: center !important; }
.items-start { align-items: flex-start !important; }
.items-end { align-items: flex-end !important; }
.items-stretch { align-items: stretch !important; }

.justify-center { justify-content: center !important; }
.justify-start { justify-content: flex-start !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-5 { gap: 1.25rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }

/* Grid */
.grid { display: grid !important; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }

/* Width & Height */
.w-full { width: 100% !important; }
.w-auto { width: auto !important; }
.h-full { height: 100% !important; }
.h-screen { height: 100vh !important; }
.min-h-screen { min-height: 100vh !important; }

/* Position */
.relative { position: relative !important; }
.absolute { position: absolute !important; }
.fixed { position: fixed !important; }
.sticky { position: sticky !important; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0 !important; }
.right-0 { right: 0 !important; }
.bottom-0 { bottom: 0 !important; }
.left-0 { left: 0 !important; }

/* Z-index */
.z-10 { z-index: 10 !important; }
.z-20 { z-index: 20 !important; }
.z-30 { z-index: 30 !important; }
.z-40 { z-index: 40 !important; }
.z-50 { z-index: 50 !important; }

/* Display */
.hidden { display: none !important; }
.block { display: block !important; }
.inline-block { display: inline-block !important; }

/* Text */
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.875rem !important; }
.text-base { font-size: 1rem !important; }
.text-lg { font-size: 1.125rem !important; }
.text-xl { font-size: 1.25rem !important; }
.text-2xl { font-size: 1.5rem !important; }
.text-3xl { font-size: 1.875rem !important; }
.text-4xl { font-size: 2.25rem !important; }

.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }

.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

.uppercase { text-transform: uppercase !important; }
.lowercase { text-transform: lowercase !important; }
.capitalize { text-transform: capitalize !important; }

.truncate {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Border */
.border { border: 1px solid var(--border) !important; }
.border-0 { border: 0 !important; }
.border-t { border-top: 1px solid var(--border) !important; }
.border-b { border-bottom: 1px solid var(--border) !important; }
.border-l { border-left: 1px solid var(--border) !important; }
.border-r { border-right: 1px solid var(--border) !important; }

.rounded { border-radius: var(--radius) !important; }
.rounded-sm { border-radius: calc(var(--radius) - 2px) !important; }
.rounded-lg { border-radius: calc(var(--radius) + 2px) !important; }
.rounded-full { border-radius: 9999px !important; }
.rounded-none { border-radius: 0 !important; }

/* Shadow */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

/* Overflow */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-x-auto { overflow-x: auto !important; }
.overflow-y-auto { overflow-y: auto !important; }

/* Cursor */
.cursor-pointer { cursor: pointer !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

/* Opacity */
.opacity-0 { opacity: 0 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* Transitions */
.transition {
    transition-property: color, background-color, border-color, box-shadow, transform;
    transition-duration: 0.2s;
    transition-timing-function: ease;
}

.transition-all {
    transition: all 0.2s ease;
}

/* Hover effects */
.hover\:bg-muted:hover { background-color: var(--muted) !important; }
.hover\:bg-primary:hover { background-color: var(--primary) !important; }
.hover\:text-primary:hover { color: var(--primary) !important; }
.hover\:shadow-lg:hover { box-shadow: var(--shadow-lg) !important; }

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (min-width: 640px) {
    .sm\:flex { display: flex !important; }
    .sm\:hidden { display: none !important; }
    .sm\:block { display: block !important; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .sm\:flex-row { flex-direction: row !important; }
}

@media (min-width: 768px) {
    .md\:flex { display: flex !important; }
    .md\:hidden { display: none !important; }
    .md\:block { display: block !important; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .md\:flex-row { flex-direction: row !important; }
}

@media (min-width: 1024px) {
    .lg\:flex { display: flex !important; }
    .lg\:hidden { display: none !important; }
    .lg\:block { display: block !important; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}

@media (min-width: 1280px) {
    .xl\:flex { display: flex !important; }
    .xl\:hidden { display: none !important; }
    .xl\:block { display: block !important; }
    .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
    .xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
}

/* ============================================
   SCREEN READER ONLY
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   CUSTOM MODAL STYLES (for inline modals)
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

.modal-container {
    position: relative;
    background-color: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-2xl);
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    z-index: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: var(--foreground);
}

.modal-close {
    padding: 0.375rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted-foreground);
    border-radius: var(--radius);
    transition: all 0.15s ease;
}

.modal-close:hover {
    background-color: var(--muted);
    color: var(--foreground);
}

.modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background-color: var(--muted);
}

/* ============================================
   APP LAYOUT SPECIFIC STYLES
   ============================================ */
.app-header {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
}

.app-sidebar {
    background-color: var(--card);
    border-right: 1px solid var(--border);
}

/* ============================================
   ANIMATION UTILITIES
   ============================================ */
.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ============================================
   SPACE-Y UTILITIES
   ============================================ */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* ============================================
   RING UTILITIES
   ============================================ */
.ring-2 {
    box-shadow: 0 0 0 2px var(--ring);
}

/* ============================================
   OVERFLOW UTILITIES
   ============================================ */
.overflow-visible {
    overflow: visible !important;
}

.overflow-hidden {
    overflow: hidden !important;
}

/* ============================================
   TRANSFORM UTILITIES
   ============================================ */
.-translate-x-1\/2 {
    transform: translateX(-50%);
}

.-translate-y-1\/2 {
    transform: translateY(-50%);
}

.left-1\/2 {
    left: 50%;
}

/* ============================================
   CMS CONTENT PROSE STYLING
   Styles for rendered CMS page content
   ============================================ */
.cms-content.prose {
    color: var(--foreground);
    line-height: 1.8;
    font-size: 1.0625rem;
}

.cms-content.prose > *:first-child {
    margin-top: 0;
}

.cms-content.prose > *:last-child {
    margin-bottom: 0;
}

/* Headings */
.cms-content.prose h1 {
    font-family: var(--font-serif);
    font-size: 2.25rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--foreground);
    line-height: 1.2;
}

.cms-content.prose h2 {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.875rem;
    color: var(--foreground);
    line-height: 1.3;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.cms-content.prose h3 {
    font-family: var(--font-sans);
    font-size: 1.375rem;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--foreground);
    line-height: 1.4;
}

.cms-content.prose h4 {
    font-family: var(--font-sans);
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.cms-content.prose h5,
.cms-content.prose h6 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

/* Paragraphs */
.cms-content.prose p {
    margin-bottom: 1.25rem;
    color: var(--foreground);
}

/* Lead paragraph (first paragraph styling) */
.cms-content.prose > p:first-of-type {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    line-height: 1.7;
}

/* Links */
.cms-content.prose a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
    transition: all 0.2s ease;
}

.cms-content.prose a:hover {
    color: var(--chart-2);
    text-decoration-thickness: 2px;
}

/* Lists */
.cms-content.prose ul,
.cms-content.prose ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.cms-content.prose ul {
    list-style-type: disc;
}

.cms-content.prose ol {
    list-style-type: decimal;
}

.cms-content.prose li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.cms-content.prose li::marker {
    color: var(--primary);
}

.cms-content.prose ul ul,
.cms-content.prose ol ol,
.cms-content.prose ul ol,
.cms-content.prose ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Blockquotes */
.cms-content.prose blockquote {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--primary);
    background: linear-gradient(135deg, var(--muted) 0%, var(--background) 100%);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--muted-foreground);
}

.cms-content.prose blockquote p {
    margin-bottom: 0;
}

.cms-content.prose blockquote cite {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 500;
    color: var(--foreground);
}

.cms-content.prose blockquote cite::before {
    content: "— ";
}

/* Code */
.cms-content.prose code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background-color: var(--muted);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: var(--primary);
}

.cms-content.prose pre {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    background-color: var(--foreground);
    color: var(--background);
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.6;
}

.cms-content.prose pre code {
    background: transparent;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Tables */
.cms-content.prose table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.cms-content.prose th,
.cms-content.prose td {
    padding: 0.75rem 1rem;
    text-align: left;
    border: 1px solid var(--border);
}

.cms-content.prose th {
    background-color: var(--muted);
    font-weight: 600;
    color: var(--foreground);
}

.cms-content.prose tbody tr:nth-child(even) {
    background-color: var(--muted);
}

.cms-content.prose tbody tr:hover {
    background-color: var(--accent);
}

/* Images */
.cms-content.prose img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.cms-content.prose figure {
    margin: 2rem 0;
}

.cms-content.prose figcaption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    text-align: center;
    font-style: italic;
}

/* Horizontal Rule */
.cms-content.prose hr {
    margin: 2.5rem 0;
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), var(--primary), var(--border), transparent);
}

/* Strong and Emphasis */
.cms-content.prose strong {
    font-weight: 600;
    color: var(--foreground);
}

.cms-content.prose em {
    font-style: italic;
}

/* Definition Lists */
.cms-content.prose dl {
    margin: 1.5rem 0;
}

.cms-content.prose dt {
    font-weight: 600;
    color: var(--foreground);
    margin-top: 1rem;
}

.cms-content.prose dd {
    margin-left: 1.5rem;
    color: var(--muted-foreground);
}

/* Abbreviations */
.cms-content.prose abbr {
    text-decoration: underline dotted;
    cursor: help;
}

/* Mark/Highlight */
.cms-content.prose mark {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    padding: 0.1em 0.3em;
    border-radius: 2px;
}

/* Small text */
.cms-content.prose small {
    font-size: 0.875em;
    color: var(--muted-foreground);
}

/* Superscript and Subscript */
.cms-content.prose sup,
.cms-content.prose sub {
    font-size: 0.75em;
}

/* Embedded Content */
.cms-content.prose iframe,
.cms-content.prose video,
.cms-content.prose embed {
    max-width: 100%;
    margin: 1.5rem 0;
    border-radius: var(--radius);
}

/* CMS-specific buttons */
.cms-content.prose .btn,
.cms-content.prose a.btn {
    text-decoration: none;
}

/* Callout boxes (if used in CMS) */
.cms-content.prose .callout {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border-left: 4px solid;
}

.cms-content.prose .callout-info {
    background-color: #eff6ff;
    border-color: #3b82f6;
}

.cms-content.prose .callout-warning {
    background-color: #fffbeb;
    border-color: #f59e0b;
}

.cms-content.prose .callout-danger {
    background-color: #fef2f2;
    border-color: #ef4444;
}

.cms-content.prose .callout-success {
    background-color: #f0fdf4;
    border-color: #22c55e;
}

/* ============================================
   BLOG LISTING STYLES
   ============================================ */
.blog-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.blog-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.blog-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.25rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
}

.blog-card-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.blog-card-title a:hover {
    color: var(--primary);
}

.blog-card-excerpt {
    font-size: 0.9375rem;
    color: var(--muted-foreground);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   SECTION DIVIDER - Elegant Page Separator
   ============================================ */

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    margin: 0.5rem 0;
}

.section-divider .divider-ornament {
    color: var(--primary);
    font-size: 0.5625rem;
    letter-spacing: 0.6em;
    opacity: 0.3;
}

@media print {
    .section-divider {
        padding: 1rem 0;
    }

    .section-divider .divider-ornament {
        color: #999;
    }
}
