/* Entry Blackout - Main Stylesheet */
/* Native CSS replacement for Tailwind CSS */

/* ==================== */
/* BASE & RESET */
/* ==================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.5;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #f3f4f6;
    color: #374151;
    text-align: right;
    direction: rtl;
    line-height: 1.6;
}

/* ============================= */
/* FORMS & INPUTS & HTML RESET.  */
/* ============================= */

button {
    background-color: transparent;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    appearance: none;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    padding: 0.5rem 0.75rem;
    width: 100%;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #374151;
    /* background-color: #ffffff; */
    direction: rtl;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
    border-color: #3b82f6;
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: #ffffff;
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: #2563eb;
    border-color: #2563eb;
}

ul {
    list-style: none;
}

/* ==================== */
/* TYPOGRAPHY */
/* ==================== */

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
}

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

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

.uppercase { text-transform: uppercase; }
.lowercase { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

.italic { font-style: italic; }

.leading-normal { line-height: 1.5; }
.leading-tight { line-height: 1.25; }
.leading-6 { line-height: 1.5rem; }

.tracking-normal { letter-spacing: 0; }

.whitespace-nowrap { white-space: nowrap; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== */
/* COLORS - TEXT */
/* ==================== */

.text-white { color: #ffffff; }
.text-black { color: #000000; }

.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }

.text-red-400 { color: #f87171; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }
.text-red-800 { color: #991b1b; }

.text-blue-600 { color: #2563eb; }
.text-blue-800 { color: #1e40af; }

.text-green-500 { color: #22c55e; }
.text-green-600 { color: #16a34a; }
.text-green-700 { color: #15803d; }

.text-orange-600 { color: #ea580c; }

.text-purple-500 { color: #a855f7; }
.text-purple-600 { color: #9333ea; }

.text-yellow-600 { color: #ca8a04; }

/* ==================== */
/* COLORS - BACKGROUNDS */
/* ==================== */

.bg-white { background-color: #ffffff; }
.bg-black { background-color: #000000; }

.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-500 { background-color: #6b7280; }
.bg-gray-600 { background-color: #4b5563; }
.bg-gray-700 { background-color: #374151; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-900 { background-color: #111827; }

.bg-red-50 { background-color: #fef2f2; }
.bg-red-100 { background-color: #fee2e2; }
.bg-red-200 { background-color: #fecaca; }
.bg-red-500 { background-color: #ef4444; }
.bg-red-600 { background-color: #dc2626; }
.bg-red-700 { background-color: #b91c1c; }

.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-200 { background-color: #bfdbfe; }
.bg-blue-600 { background-color: #2563eb; }
.bg-blue-700 { background-color: #1d4ed8; }

.bg-orange-50 { background-color: #fff7ed; }

.bg-green-50 { background-color: #f0fdf4; }
.bg-green-100 { background-color: #dcfce7; }
.bg-green-200 { background-color: #bbf7d0; }
.bg-green-600 { background-color: #16a34a; }
.bg-green-700 { background-color: #15803d; }

.bg-purple-50 { background-color: #faf5ff; }
.bg-purple-100 { background-color: #f3e8ff; }
.bg-purple-200 { background-color: #e9d5ff; }
.bg-purple-600 { background-color: #9333ea; }
.bg-purple-700 { background-color: #7e22ce; }

.text-purple-800 { color: #6b21a8; }
.text-purple-900 { color: #581c87; }

.bg-indigo-100 { background-color: #e0e7ff; }
.bg-indigo-600 { background-color: #4f46e5; }
.bg-indigo-700 { background-color: #4338ca; }
.text-indigo-800 { color: #3730a3; }

.bg-yellow-200 { background-color: #fef08a; }

.bg-orange-600 { color: #ea580c; }

/* Background opacity */
.bg-opacity-50 {
    background-color: rgba(75, 85, 99, 0.5);
}

/* ==================== */
/* SPACING - MARGIN */
/* ==================== */

.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 0.75rem; }
.m-4 { margin: 1rem; }
.m-6 { margin: 1.5rem; }
.m-8 { margin: 2rem; }

.mx-auto { margin-left: auto; margin-right: auto; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }

.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }

.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

.ml-2 { margin-left: 0.5rem; }
.ml-3 { margin-left: 0.75rem; }
.ml-4 { margin-left: 1rem; }

.-mb-px { margin-bottom: -1px; }
.-mx-2 { margin-left: -0.5rem; margin-right: -0.5rem; }

/* ==================== */
/* SPACING - PADDING */
/* ==================== */

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

.pt-2 { padding-top: 0.5rem; }
.pt-20 { padding-top: 5rem; }

.pr-2 { padding-right: 0.5rem; }

.pb-8 { padding-bottom: 2rem; }

/* ==================== */
/* LAYOUT */
/* ==================== */

.min-h-full {
    min-height: 100%;
}
.min-h-screen {
    min-height: 100vh;
}
.min-h-dvh {
    min-height: 100dvh;
}
.min-h-dvw {
    min-height: 100dvw;
}
.min-h-lvh {
    min-height: 100lvh;
}
.min-h-lvw {
    min-height: 100lvw;
}

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container { max-width: 640px; }
}

@media (min-width: 768px) {
    .container { max-width: 768px; }
}

@media (min-width: 1024px) {
    .container { max-width: 1024px; }
}

@media (min-width: 1280px) {
    .container { max-width: 1280px; }
}

.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }

.w-full { width: 100%; }
.w-1\/2 { width: 50%; }
.w-4 { width: 1rem; }
.w-48 { width: 12rem; }
.w-80 { width: 20rem; }
.w-96 { width: 24rem; }

.h-full { height: 100%; }
.h-screen { height: 100vh; }

.min-w-full { min-width: 100%; }

.max-w-sm { max-width: 24rem; }
.max-w-full { max-width: 100%; }

/* ==================== */
/* FLEXBOX */
/* ==================== */

.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }

.flex-col { flex-direction: column; }
.flex-row-reverse { flex-direction: row-reverse; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }

.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.item-center { align-items: center; }

/* ==================== */
/* GRID */
/* ==================== */

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* ==================== */
/* BORDERS */
/* ==================== */

.border { border: 1px solid #e5e7eb; }
.border-2 { border: 2px solid #e5e7eb; }
.border-b { border-bottom: 1px solid #e5e7eb; }
.border-b-2 { border-bottom: 2px solid; }
.border-t { border-top: 1px solid #e5e7eb; }

.border-transparent { border-color: transparent; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-blue-500 { border-color: #3b82f6; }
.border-blue-600 { border-color: #2563eb; }
.border-purple-200 { border-color: #e9d5ff; }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t-lg { border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }

/* ==================== */
/* SHADOWS */
/* ==================== */

.shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-outline:focus {
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* ==================== */
/* POSITIONING */
/* ==================== */

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }

.top-0 { top: 0; }
.top-20 { top: 5rem; }
.top-40 { top: 10rem; }
.top-full { top: 100%; }

.left-0 { left: 0; }

.z-10 { z-index: 10; }
.z-50 { z-index: 50; }

.form-checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    cursor: pointer;
}

label {
    display: block;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.appearance-none {
    appearance: none;
}

.focus\:outline-none:focus {
    outline: none;
}

.focus\:shadow-outline:focus {
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* ==================== */
/* BUTTONS */
/* ==================== */

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
    font-size: inherit;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button Color Variants */
.bg-blue-600 {
    background-color: #2563eb;
    color: #ffffff;
}

.bg-blue-600:hover,
.hover\:bg-blue-700:hover {
    background-color: #1d4ed8;
}

.bg-blue-100:hover,
.hover\:bg-blue-100:hover {
    background-color: #dbeafe;
}

.bg-red-600 {
    background-color: #dc2626;
    color: #ffffff;
}

.bg-red-600:hover,
.hover\:bg-red-700:hover {
    background-color: #b91c1c;
}

.bg-green-600 {
    background-color: #16a34a;
    color: #ffffff;
}

.bg-green-600:hover,
.hover\:bg-green-700:hover {
    background-color: #15803d;
}

.bg-gray-500 {
    background-color: #6b7280;
    color: #ffffff;
}

.bg-gray-500:hover,
.hover\:bg-gray-600:hover {
    background-color: #4b5563;
}

.bg-gray-800 {
    background-color: #1f2937;
    color: #ffffff;
}

.bg-gray-800:hover,
.hover\:bg-gray-700:hover {
    background-color: #374151;
}

.bg-gray-800:hover,
.hover\:bg-gray-900:hover {
    background-color: #111827;
}

/* ==================== */
/* LINKS */
/* ==================== */

a {
    color: inherit;
    text-decoration: none;
}

.no-underline {
    text-decoration: none;
}

.hover\:underline:hover {
    text-decoration: underline;
}

.hover\:no-underline:hover {
    text-decoration: none;
}

.hover\:text-white:hover {
    color: #ffffff;
}

.hover\:text-gray-200:hover {
    color: #e5e7eb;
}

.hover\:text-gray-600:hover {
    color: #4b5563;
}

.hover\:text-gray-800:hover {
    color: #1f2937;
}

.hover\:text-blue-800:hover {
    color: #1e40af;
}

.hover\:text-purple-500:hover {
    color: #a855f7;
}

.hover\:text-red-500:hover {
    color: #ef4444;
}

.hover\:text-red-700:hover {
    color: #b91c1c;
}

.hover\:text-red-800:hover {
    color: #991b1b;
}

.hover\:text-green-700:hover {
    color: #15803d;
}

.hover\:border-gray-300:hover {
    border-color: #d1d5db;
}

.hover\:bg-gray-700:hover {
    background-color: #374151;
}

/* ==================== */
/* TABLES */
/* ==================== */

table {
    border-collapse: collapse;
    width: 100%;
}

.table-auto {
    table-layout: auto;
}

.min-w-full {
    min-width: 100%;
}

thead {
    background-color: #e5e7eb;
}

tbody tr {
    border-bottom: 1px solid #e5e7eb;
}

th, td {
    padding: 0.75rem 1.5rem;
}

/* ==================== */
/* TRANSITIONS */
/* ==================== */

.transition {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-150 {
    transition-duration: 150ms;
}

.transform {
    transform: translateX(0) translateY(0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1);
}

.hover\:scale-110:hover {
    transform: scale(1.1);
}

.hover\:bg-gray-50:hover {
    background-color: #f9fafb;
}

.hover\:bg-gray-100:hover {
    background-color: #f3f4f6;
}

.hover\:bg-gray-600:hover {
    background-color: #4b5563;
}

.hover\:bg-blue-700:hover {
    background-color: #1d4ed8;
}

.hover\:bg-red-600:hover {
    background-color: #dc2626;
}

.hover\:bg-red-700:hover {
    background-color: #b91c1c;
}

.hover\:bg-green-700:hover {
    background-color: #15803d;
}

.hover\:bg-purple-100:hover {
    background-color: #f3e8ff;
}

.hover\:bg-purple-700:hover {
    background-color: #7e22ce;
}

.hover\:bg-indigo-700:hover {
    background-color: #4338ca;
}

.hover\:bg-green-100:hover {
    background-color: #dcfce7;
}

.hover\:bg-red-100:hover {
    background-color: #fee2e2;
}

/* ==================== */
/* OVERFLOW */
/* ==================== */

.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
}

.overflow-y-auto {
    overflow-y: auto;
}

/* ==================== */
/* CURSOR */
/* ==================== */

.cursor-pointer {
    cursor: pointer;
}

/* ==================== */
/* OPACITY */
/* ==================== */

.hover\:bg-opacity-75:hover {
    background-color: rgba(0, 0, 0, 0.75);
}

/* ==================== */
/* UTILITY CLASSES */
/* ==================== */

.list-reset {
    list-style: none;
    padding: 0;
    margin: 0;
}

.font-sans {
    font-family: 'Cairo', sans-serif;
}

.font-mono {
    font-family: 'Courier New', monospace;
}

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

.ltr {
    direction: ltr;
}

/* ==================== */
/* NAVIGATION DROPDOWN */
/* ==================== */

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
}

/* ==================== */
/* RESPONSIVE - SM (640px+) */
/* ==================== */

@media (min-width: 640px) {
    .sm\:rounded-lg { border-radius: 0.5rem; }
}

/* ==================== */
/* RESPONSIVE - MD (768px+) */
/* ==================== */

@media (min-width: 768px) {
    .md\:w-1\/2 { width: 50%; }
    .md\:w-1\/3 { width: 33.333333%; }
    .md\:w-1\/4 { width: 25%; }
    .md\:w-1\/6 { width: 16.666667%; }

    .md\:flex-none { flex: none; }
    .md\:justify-start { justify-content: flex-start; }
    .md\:justify-end { justify-content: flex-end; }

    .md\:mb-0 { margin-bottom: 0; }
    .md\:mt-0 { margin-top: 0; }

    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==================== */
/* PRINT STYLES */
/* ==================== */

@media print {
    .print\:hidden {
        display: none;
    }

    .print\:pt-0 {
        padding-top: 0;
    }

    .print\:w-full {
        width: 100%;
    }

    .print\:max-w-full {
        max-width: 100%;
    }
}

/* ==================== */
/* BADGE COMPONENTS */
/* ==================== */

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ==================== */
/* CARD COMPONENTS */
/* ==================== */

.card {
    background-color: #ffffff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
}

/* ==================== */
/* MODAL OVERLAY */
/* ==================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(75, 85, 99, 0.5);
    z-index: 50;
}

/* ==================== */
/* GRADIENTS */
/* ==================== */

.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-from), var(--tw-gradient-to)); }
.from-purple-50 { --tw-gradient-from: #faf5ff; --tw-gradient-to: #faf5ff; }
.to-blue-50 { --tw-gradient-to: #eff6ff; }

/* ==================== */
/* MISC UTILITIES */
/* ==================== */

.group:hover .group-hover\:block {
    display: block;
}

/* Status badge colors */
.status-badge {
    padding: 0.125rem 0.625rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

/* Custom color for specific use cases */
dir[ltr] {
    direction: ltr;
}

/* Focus states */
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* Additional width utilities */
.w-1\/3 { width: 33.333333%; }
.w-1\/4 { width: 25%; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }

/* Additional spacing utilities */
.space-x-2 > * + * { margin-left: 0.5rem; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-4 > * + * { margin-left: 1rem; }
.space-x-reverse > * + * { margin-right: 0.75rem; margin-left: 0; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.mr-4 { margin-right: 1rem; }
.top-24 { top: 6rem; }
.sticky { position: sticky; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

/* Additional grid utilities */
.md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.md\:col-span-1 { grid-column: span 1 / span 1; }
.md\:col-span-2 { grid-column: span 2 / span 2; }

@media (min-width: 768px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .md\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .md\:col-span-1 {
        grid-column: span 1 / span 1;
    }
    .md\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* Additional text utilities */
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.whitespace-pre-line { white-space: pre-line; }

/* Additional color utilities */
.text-yellow-500 { color: #eab308; }
.text-purple-800 { color: #6b21a8; }
.text-green-800 { color: #166534; }
.text-blue-800 { color: #1e40af; }
.bg-yellow-50 { background-color: #fefce8; }
.bg-yellow-100 { background-color: #fef9c3; }
.bg-yellow-500 { background-color: #eab308; }
.bg-yellow-600 { background-color: #ca8a04; }
.text-yellow-800 { color: #854d0e; }
.hover\:bg-yellow-600:hover { background-color: #ca8a04; }
.bg-gray-300 { background-color: #d1d5db; }
.bg-gray-400 { background-color: #9ca3af; }
.hover\:bg-gray-400:hover { background-color: #9ca3af; }
.bg-purple-800 { color: #6b21a8; }
.bg-green-800 { color: #166534; }
.border-gray-300 { border-color: #d1d5db; }
.border-blue-500 { border-color: #3b82f6; }
.border-red-500 { border-color: #ef4444; }

/* Ring utilities for focus states */
.focus\:ring:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.focus\:ring-2:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.focus\:ring-blue-500:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.focus\:ring-red-500:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.5);
}

.focus\:ring-green-500:focus {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.5);
}

.focus\:ring-purple-500:focus {
    box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.5);
}

.focus\:ring-opacity-50:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.focus\:border-blue-500:focus {
    border-color: #3b82f6;
}

/* Cursor utilities */
.cursor-not-allowed {
    cursor: not-allowed;
}

/* Additional padding utilities */
.pb-2 { padding-bottom: 0.5rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }

/* Print-specific utilities */
@media print {
    .print\:shadow-none {
        box-shadow: none;
    }

    .space-x-reverse.print\:hidden {
        display: none;
    }
}

/* ==================== */
/* ANIMATIONS - GLOBAL (SUBTLE & PROFESSIONAL) */
/* ==================== */

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

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Page Load Animation */
.container {
    animation: fadeIn 0.4s ease-out;
}

/* Card Hover Elevation */
.bg-white {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.15);
}

/* Button Animations */
button,
.bg-blue-600,
.bg-red-600,
.bg-green-600,
.bg-gray-800,
.bg-gray-500 {
    transition: all 0.2s ease;
    position: relative;
}

button:active {
    transform: scale(0.98);
}

/* Form Input Focus Glow */
input:focus,
select:focus,
textarea:focus {
    transition: all 0.3s ease;
}

/* Table Row Smooth Hover */
tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

tbody tr:hover {
    transform: translateX(-3px);
}

/* Modal Animations */
.fixed.inset-0 {
    animation: fadeIn 0.3s ease-out;
}

.fixed.inset-0 > div {
    animation: scaleIn 0.3s ease-out;
}

/* Badge Animations */
span.rounded-full {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

span.rounded-full:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Staggered Table Rows */
tbody tr:nth-child(1) { animation: slideInRight 0.3s ease-out; }
tbody tr:nth-child(2) { animation: slideInRight 0.4s ease-out; }
tbody tr:nth-child(3) { animation: slideInRight 0.5s ease-out; }
tbody tr:nth-child(4) { animation: slideInRight 0.6s ease-out; }
tbody tr:nth-child(5) { animation: slideInRight 0.7s ease-out; }

/* Dashboard Grid Stagger */
.grid > .bg-white:nth-child(1) { animation: slideInUp 0.4s ease-out; }
.grid > .bg-white:nth-child(2) { animation: slideInUp 0.5s ease-out; }
.grid > .bg-white:nth-child(3) { animation: slideInUp 0.6s ease-out; }
.grid > .bg-white:nth-child(4) { animation: slideInUp 0.7s ease-out; }

/* Icon Rotation */
i.fa-chevron-down {
    transition: transform 0.3s ease;
}

.dropdown:hover i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Dropdown Animation */
.dropdown-menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Link Underline Animation */
nav a {
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    right: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
    left: 0;
}

/* ==================== */
/* ANIMATIONS - LOGIN PAGE (BOLD & EYE-CATCHING) */
/* ==================== */

/* Login Page Specific Animations */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes slideInBounce {
    0% {
        opacity: 0;
        transform: translateY(100px) scale(0.8);
    }
    60% {
        opacity: 1;
        transform: translateY(-10px) scale(1.02);
    }
    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes logoGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(59, 130, 246, 0.5),
                     0 0 20px rgba(59, 130, 246, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(59, 130, 246, 0.8),
                     0 0 40px rgba(59, 130, 246, 0.5),
                     0 0 60px rgba(59, 130, 246, 0.3);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5),
                    0 0 10px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.8),
                    0 0 30px rgba(59, 130, 246, 0.6),
                    0 0 40px rgba(59, 130, 246, 0.4);
    }
}

/* Login Page Body */
body.login-page {
    background: linear-gradient(-45deg, #1f2937, #374151, #4b5563, #1f2937);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

/* Floating Particles */
body.login-page::before,
body.login-page::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1), transparent);
    border-radius: 50%;
    animation: floatUp 20s linear infinite;
}

body.login-page::before {
    left: 20%;
    animation-delay: 0s;
}

body.login-page::after {
    right: 20%;
    animation-delay: 10s;
}

/* Login Card */
.login-page .bg-white {
    animation: slideInBounce 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                0 0 100px rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Login Logo/Title Glow */
/* .login-page h1 {
    animation: logoGlow 3s ease-in-out infinite;
} */

/* Login Input Glow on Focus */
.login-page input:focus {
    animation: glow 2s ease-in-out infinite;
    border-color: #3b82f6;
}

/* Login Button Ripple */
.login-page button {
    overflow: hidden;
}

.login-page button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-page button:active::before {
    width: 300px;
    height: 300px;
}

/* Error Message Shake */
.login-page #errorMessage:not(.hidden) {
    animation: shake 0.5s;
}

/* Login Icon Pulse */
/* .login-page .fa-moon {
    animation: logoGlow 2s ease-in-out infinite;
    display: inline-block;
} */


/* ========================================================== */
/* RESPONSIVE & MOBILE-FIRST ENHANCEMENTS                     */
/* ========================================================== */

/* ==================== */
/* MOBILE NAVIGATION    */
/* ==================== */

/* Hamburger Toggle Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    line-height: 1;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn:hover {
    background: none;
    transform: none;
    box-shadow: none;
}

/* Navigation list - mobile collapsible */
@media (max-width: 767px) {
    .mobile-menu-btn {
        display: block;
    }

    /* Nav container: stack vertically on mobile */
    nav .container {
        flex-wrap: wrap;
        padding: 0.5rem 1rem;
    }

    /* Logo row: always visible, with hamburger */
    nav .container > div:first-child {
        width: auto;
        flex: 1;
        justify-content: flex-start;
    }

    /* Nav links wrapper: hidden by default on mobile */
    nav .container > div:last-child {
        display: none;
        width: 100%;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 0.5rem;
    }

    nav .container > div:last-child.mobile-nav-open {
        display: block;
    }

    /* Stack nav items vertically */
    nav .container > div:last-child ul {
        flex-direction: column;
        width: 100%;
    }

    nav .container > div:last-child ul li {
        margin-left: 0;
        width: 100%;
    }

    nav .container > div:last-child ul li a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 0.375rem;
    }

    nav .container > div:last-child ul li a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Dropdown menus in mobile nav */
    nav .dropdown .dropdown-menu {
        position: static;
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 0.375rem;
        margin-top: 0.25rem;
        width: 100%;
        box-shadow: none;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        display: none;
    }

    nav .dropdown.mobile-dropdown-open .dropdown-menu {
        display: block;
    }

    nav .dropdown .dropdown-menu a {
        padding-right: 2rem;
    }
}

/* ==================== */
/* MOBILE BASE OVERRIDES */
/* ==================== */

/* Disable card hover lift on touch devices - prevents sticky hover states */
@media (hover: none) {
    .bg-white:hover {
        transform: none;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    }

    tbody tr:hover {
        transform: none;
    }
}

/* Better touch targets on mobile */
@media (max-width: 767px) {
    /* Increase tap targets */
    button,
    a.inline-block,
    [role="tab"] {
        min-height: 44px;
        min-width: 44px;
    }

    /* Stack page header and actions vertically */
    .bg-white > .flex.justify-between.items-center:first-child {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .bg-white > .flex.justify-between.items-center:first-child h1 {
        text-align: center;
    }

    /* Action buttons: wrap and fill width on mobile */
    .bg-white > .flex.justify-between.items-center:first-child > .flex.gap-2 {
        flex-wrap: wrap;
        justify-content: center;
    }

    .bg-white > .flex.justify-between.items-center:first-child > .flex.gap-2 > a,
    .bg-white > .flex.justify-between.items-center:first-child > .flex.gap-2 > button {
        flex: 1 1 auto;
        min-width: 140px;
        text-align: center;
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }

    /* Finance tabs: horizontal scroll on mobile */
    [role="tablist"] {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    [role="tablist"]::-webkit-scrollbar {
        display: none;
    }

    [role="tablist"] li {
        flex-shrink: 0;
    }

    [role="tab"] {
        white-space: nowrap;
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    /* Modal: full-width on mobile */
    .fixed.inset-0 > div,
    .relative.top-20.mx-auto.w-96,
    .relative.top-20.mx-auto.w-80 {
        width: calc(100% - 2rem) !important;
        max-width: 100%;
        margin: 1rem auto;
        top: 0;
    }

    /* Filter sections: stack vertically */
    .mb-4.bg-white .flex.items-center.gap-4 {
        flex-direction: column;
        align-items: stretch;
    }

    /* Table improvements for mobile */
    table {
        font-size: 0.8125rem;
    }

    th, td {
        padding: 0.5rem 0.75rem;
    }

    /* Reduce card padding on mobile */
    .p-6 {
        padding: 1rem;
    }

    .p-8 {
        padding: 1.25rem;
    }

    /* Stack form grids */
    .grid.grid-cols-2 {
        grid-template-columns: 1fr;
    }

    /* Container less padding on small screens */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Smaller text on mobile for dense content */
    .text-2xl {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }

    .text-3xl {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .text-4xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }

    /* Dashboard quick links: 2 cols on mobile instead of 2 */
    .grid.grid-cols-2.gap-4 a.block {
        padding: 1rem;
    }

    .grid.grid-cols-2.gap-4 a.block .text-3xl {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    /* Toast notifications: full width on mobile */
    #toastContainer {
        left: 0.5rem;
        right: 0.5rem;
        top: auto;
        bottom: 1rem;
    }

    #toastContainer > div {
        padding: 0.75rem 1rem;
    }

    /* Reduce top padding under fixed nav */
    .pt-20 {
        padding-top: 4.5rem;
    }
}

/* Very small screens (320px-480px) */
@media (max-width: 480px) {
    /* Single column for dashboard cards */
    .grid.grid-cols-2.gap-4 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Even smaller font sizes */
    body {
        font-size: 0.875rem;
    }

    .text-xl {
        font-size: 1.125rem;
    }

    .text-2xl {
        font-size: 1.125rem;
        line-height: 1.5rem;
    }

    /* Tighter padding */
    .px-4 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Table: allow horizontal scroll with hint */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    /* Hide less important table columns on very small screens */
    th:nth-child(n+5),
    td:nth-child(n+5) {
        display: none;
    }

    /* Simpler badge sizing */
    .badge,
    .status-badge {
        padding: 0.125rem 0.5rem;
        font-size: 0.6875rem;
    }
}

/* ==================== */
/* RESPONSIVE - SM (640px+) */
/* ==================== */

@media (min-width: 640px) {
    .sm\\:block { display: block; }
    .sm\\:hidden { display: none; }
    .sm\\:flex { display: flex; }
    .sm\\:grid { display: grid; }
    .sm\\:inline-flex { display: inline-flex; }

    .sm\\:w-full { width: 100%; }
    .sm\\:w-auto { width: auto; }
    .sm\\:w-1\\2 { width: 50%; }
    .sm\\:w-1\\3 { width: 33.333333%; }

    .sm\\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .sm\\:flex-row { flex-direction: row; }
    .sm\\:flex-col { flex-direction: column; }

    .sm\\:items-center { align-items: center; }
    .sm\\:justify-between { justify-content: space-between; }
    .sm\\:justify-center { justify-content: center; }
    .sm\\:justify-start { justify-content: flex-start; }
    .sm\\:justify-end { justify-content: flex-end; }

    .sm\\:gap-3 { gap: 0.75rem; }
    .sm\\:gap-4 { gap: 1rem; }
    .sm\\:gap-6 { gap: 1.5rem; }

    .sm\\:p-4 { padding: 1rem; }
    .sm\\:p-6 { padding: 1.5rem; }
    .sm\\:px-4 { padding-left: 1rem; padding-right: 1rem; }
    .sm\\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .sm\\:py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }

    .sm\\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
    .sm\\:text-base { font-size: 1rem; line-height: 1.5rem; }
    .sm\\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
    .sm\\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
    .sm\\:text-2xl { font-size: 1.5rem; line-height: 2rem; }

    .sm\\:text-left { text-align: left; }
    .sm\\:text-center { text-align: center; }
    .sm\\:text-right { text-align: right; }

    .sm\\:mb-0 { margin-bottom: 0; }
    .sm\\:mt-0 { margin-top: 0; }
    .sm\\:ml-3 { margin-left: 0.75rem; }
    .sm\\:mr-3 { margin-right: 0.75rem; }

    .sm\\:max-w-sm { max-width: 24rem; }
    .sm\\:max-w-md { max-width: 28rem; }
    .sm\\:max-w-lg { max-width: 32rem; }
}

/* ==================== */
/* RESPONSIVE - MD (768px+) - EXTENDED */
/* ==================== */

@media (min-width: 768px) {
    .md\\:block { display: block; }
    .md\\:hidden { display: none; }
    .md\\:flex { display: flex; }
    .md\\:grid { display: grid; }
    .md\\:inline-flex { display: inline-flex; }

    .md\\:w-full { width: 100%; }
    .md\\:w-auto { width: auto; }

    .md\\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .md\\:flex-row { flex-direction: row; }
    .md\\:flex-col { flex-direction: column; }
    .md\\:flex-wrap { flex-wrap: wrap; }
    .md\\:flex-nowrap { flex-wrap: nowrap; }
    .md\\:flex-1 { flex: 1 1 0%; }

    .md\\:items-center { align-items: center; }
    .md\\:items-start { align-items: flex-start; }
    .md\\:justify-between { justify-content: space-between; }
    .md\\:justify-center { justify-content: center; }

    .md\\:gap-4 { gap: 1rem; }
    .md\\:gap-6 { gap: 1.5rem; }

    .md\\:p-4 { padding: 1rem; }
    .md\\:p-6 { padding: 1.5rem; }
    .md\\:p-8 { padding: 2rem; }
    .md\\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .md\\:py-4 { padding-top: 1rem; padding-bottom: 1rem; }

    .md\\:text-sm { font-size: 0.875rem; line-height: 1.25rem; }
    .md\\:text-base { font-size: 1rem; line-height: 1.5rem; }
    .md\\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
    .md\\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
    .md\\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .md\\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

    .md\\:text-left { text-align: left; }
    .md\\:text-center { text-align: center; }
    .md\\:text-right { text-align: right; }

    .md\\:mb-0 { margin-bottom: 0; }
    .md\\:mb-4 { margin-bottom: 1rem; }
    .md\\:mt-0 { margin-top: 0; }

    .md\\:max-w-md { max-width: 28rem; }
    .md\\:max-w-lg { max-width: 32rem; }
    .md\\:max-w-xl { max-width: 36rem; }
    .md\\:max-w-2xl { max-width: 42rem; }
}

/* ==================== */
/* RESPONSIVE - LG (1024px+) */
/* ==================== */

@media (min-width: 1024px) {
    .lg\\:block { display: block; }
    .lg\\:hidden { display: none; }
    .lg\\:flex { display: flex; }
    .lg\\:grid { display: grid; }
    .lg\\:inline-flex { display: inline-flex; }

    .lg\\:w-full { width: 100%; }
    .lg\\:w-auto { width: auto; }
    .lg\\:w-1\\2 { width: 50%; }
    .lg\\:w-1\\3 { width: 33.333333%; }
    .lg\\:w-1\\4 { width: 25%; }
    .lg\\:w-1\\5 { width: 20%; }

    .lg\\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .lg\\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

    .lg\\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\\:col-span-3 { grid-column: span 3 / span 3; }

    .lg\\:flex-row { flex-direction: row; }
    .lg\\:flex-col { flex-direction: column; }
    .lg\\:flex-none { flex: none; }
    .lg\\:flex-1 { flex: 1 1 0%; }

    .lg\\:items-center { align-items: center; }
    .lg\\:justify-between { justify-content: space-between; }
    .lg\\:justify-start { justify-content: flex-start; }
    .lg\\:justify-end { justify-content: flex-end; }

    .lg\\:gap-4 { gap: 1rem; }
    .lg\\:gap-6 { gap: 1.5rem; }
    .lg\\:gap-8 { gap: 2rem; }

    .lg\\:p-6 { padding: 1.5rem; }
    .lg\\:p-8 { padding: 2rem; }
    .lg\\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .lg\\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\\:py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }

    .lg\\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
    .lg\\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
    .lg\\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .lg\\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

    .lg\\:mb-0 { margin-bottom: 0; }
    .lg\\:mt-0 { margin-top: 0; }

    .lg\\:max-w-4xl { max-width: 56rem; }
    .lg\\:max-w-5xl { max-width: 64rem; }
    .lg\\:max-w-6xl { max-width: 72rem; }
}

/* ==================== */
/* RESPONSIVE - XL (1280px+) */
/* ==================== */

@media (min-width: 1280px) {
    .xl\\:block { display: block; }
    .xl\\:hidden { display: none; }
    .xl\\:flex { display: flex; }
    .xl\\:grid { display: grid; }

    .xl\\:w-full { width: 100%; }
    .xl\\:w-auto { width: auto; }
    .xl\\:w-1\\2 { width: 50%; }
    .xl\\:w-1\\3 { width: 33.333333%; }
    .xl\\:w-1\\4 { width: 25%; }
    .xl\\:w-1\\5 { width: 20%; }

    .xl\\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .xl\\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .xl\\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .xl\\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .xl\\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

    .xl\\:col-span-1 { grid-column: span 1 / span 1; }
    .xl\\:col-span-2 { grid-column: span 2 / span 2; }
    .xl\\:col-span-3 { grid-column: span 3 / span 3; }

    .xl\\:flex-row { flex-direction: row; }
    .xl\\:flex-none { flex: none; }
    .xl\\:flex-1 { flex: 1 1 0%; }

    .xl\\:gap-6 { gap: 1.5rem; }
    .xl\\:gap-8 { gap: 2rem; }

    .xl\\:p-8 { padding: 2rem; }
    .xl\\:px-8 { padding-left: 2rem; padding-right: 2rem; }

    .xl\\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .xl\\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
    .xl\\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }

    .xl\\:max-w-6xl { max-width: 72rem; }
    .xl\\:max-w-7xl { max-width: 80rem; }
}

/* ==================== */
/* RESPONSIVE TABLES    */
/* ==================== */

/* Responsive table wrapper - horizontal scroll with fade hint */
.overflow-x-auto {
    position: relative;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {
    /* Scroll shadow hint for tables */
    .overflow-x-auto::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 2rem;
        background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
        pointer-events: none;
        z-index: 1;
        opacity: 1;
        transition: opacity 0.3s;
    }

    /* Sticky first column for tables */
    .overflow-x-auto table th:first-child,
    .overflow-x-auto table td:first-child {
        position: sticky;
        right: 0;
        background-color: inherit;
        z-index: 2;
    }

    .overflow-x-auto table thead th:first-child {
        background-color: #e5e7eb;
    }

    .overflow-x-auto table tbody tr:nth-child(odd) td:first-child {
        background-color: #ffffff;
    }

    .overflow-x-auto table tbody tr:nth-child(even) td:first-child {
        background-color: #f9fafb;
    }
}

/* ==================== */
/* RESPONSIVE MODALS    */
/* ==================== */

@media (max-width: 639px) {
    /* Full-screen modal on small devices */
    .modal-overlay > div,
    .fixed.inset-0 > .relative {
        width: calc(100% - 1rem);
        max-width: 100%;
        margin: 0.5rem auto;
        max-height: calc(100vh - 1rem);
        overflow-y: auto;
        border-radius: 0.75rem;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    .modal-overlay > div,
    .fixed.inset-0 > .relative {
        max-width: 28rem;
    }
}

/* ==================== */
/* RESPONSIVE FORMS     */
/* ==================== */

@media (max-width: 767px) {
    /* Stack form fields vertically */
    .grid.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .grid.md\\:grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .grid.md\\:grid-cols-5 {
        grid-template-columns: 1fr;
    }

    /* Larger input fields on mobile for easier touch */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        padding: 0.625rem 0.875rem;
        font-size: 1rem; /* Prevents iOS zoom on focus */
    }

    /* Full-width form buttons on mobile */
    form button[type="submit"] {
        width: 100%;
    }

    label {
        font-size: 0.8125rem;
        margin-bottom: 0.25rem;
    }
}

/* ==================== */
/* SAFE AREA INSETS     */
/* ==================== */

/* Support for devices with notches / rounded corners */
@supports (padding: max(0px)) {
    nav.fixed {
        padding-left: max(0.5rem, env(safe-area-inset-left));
        padding-right: max(0.5rem, env(safe-area-inset-right));
        padding-top: max(0.5rem, env(safe-area-inset-top));
    }

    .container {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }

    #toastContainer {
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }
}

/* ==================== */
/* RESPONSIVE VISIBILITY */
/* ==================== */

/* Hide on specific breakpoints only */
.hidden-mobile {
    display: none;
}

.hidden-desktop {
    display: block;
}

@media (min-width: 768px) {
    .hidden-mobile {
        display: block;
    }

    .hidden-desktop {
        display: none;
    }
}

/* ==================== */
/* FLUID CONTAINER      */
/* ==================== */

@media (min-width: 1536px) {
    .container {
        max-width: 1536px;
    }
}

/* ==================== */
/* RESPONSIVE PRINT     */
/* ==================== */

@media print {
    /* Reset all animations for print */
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }

    /* Hide mobile elements in print */
    .mobile-menu-btn {
        display: none !important;
    }

    nav {
        position: static !important;
    }

    body {
        font-size: 12pt;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .shadow, .shadow-sm, .shadow-md, .shadow-lg {
        box-shadow: none;
    }

    /* Keep table readable in print */
    table {
        font-size: 10pt;
    }

    th, td {
        padding: 0.25rem 0.5rem;
    }

    /* Show all table columns in print */
    th:nth-child(n+5),
    td:nth-child(n+5) {
        display: table-cell;
    }
}
