/* ==========================================================================
   MarsPlus Admin - Dedicated Local Login Stylesheet (Zero External Dependencies)
   Self-hosted Vazirmatn typography, layout, components, and animations.
   ========================================================================== */

/* 1. Self-hosted Vazirmatn Typography */
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-Light.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-Regular.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-Medium.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-SemiBold.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
}
@font-face {
    font-family: 'Vazirmatn';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/vazirmatn/Vazirmatn-Bold.woff2') format('woff2');
}

/* 2. Reset & Base Settings */
*, ::before, ::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e2e8f0;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}

body {
    margin: 0;
    line-height: inherit;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    background-color: #f1f5f9;
    color: #1e293b;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

::selection {
    background-color: #6366f1;
    color: #ffffff;
}

/* 3. Layout & Flex / Grid Utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none !important; }

.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }

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

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

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }

.space-y-4 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* 4. Sizing & Box Model */
.w-full { width: 100%; }
.max-w-md { max-width: 28rem; }
.max-w-xs { max-width: 20rem; }

.w-2 { width: 0.5rem; }
.h-2 { height: 0.5rem; }
.w-3\.5 { width: 0.875rem; }
.h-3\.5 { height: 0.875rem; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-7 { width: 1.75rem; }
.h-7 { height: 1.75rem; }
.w-14 { width: 3.5rem; }
.h-14 { height: 3.5rem; }
.w-20 { width: 5rem; }
.h-20 { height: 5rem; }
.w-44 { width: 11rem; }
.h-44 { height: 11rem; }
.w-48 { width: 12rem; }
.h-48 { height: 12rem; }

.h-12 { height: 3rem; }
.min-h-screen { min-height: 100vh; }
.min-h-\[48px\] { min-height: 48px; }

/* 5. Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0px; }
.right-0 { right: 0px; }
.left-0 { left: 0px; }
.inset-y-0 { top: 0px; bottom: 0px; }

.-top-12 { top: -3rem; }
.-right-12 { right: -3rem; }
.-bottom-8 { bottom: -2rem; }
.-left-8 { left: -2rem; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }

.pointer-events-none { pointer-events: none; }
.overflow-hidden { overflow: hidden; }

/* 6. Spacing (Margin & Padding) */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-auto { margin-top: auto; }

.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.-mt-7 { margin-top: -1.75rem; }

.mb-0\.5 { margin-bottom: 0.125rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-3\.5 { margin-bottom: 0.875rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-6 { padding: 1.5rem; }

@media (min-width: 640px) {
    .sm\:p-7 { padding: 1.75rem; }
}

.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }

.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }

.pt-1 { padding-top: 0.25rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-12 { padding-bottom: 3rem; }

.pr-3\.5 { padding-right: 0.875rem; }
.pr-11 { padding-right: 2.75rem; }
.pl-3\.5 { padding-left: 0.875rem; }
.pl-4 { padding-left: 1rem; }
.pl-11 { padding-left: 2.75rem; }

/* 7. Typography */
.text-\[9px\] { font-size: 9px; line-height: 12px; }
.text-\[11px\] { font-size: 11px; line-height: 15px; }
.text-\[11\.5px\] { font-size: 11.5px; line-height: 18px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }

.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-center { text-align: center; }
.text-right { text-align: right; }

.leading-5 { line-height: 1.25rem; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-none { user-select: none; }

/* 8. Colors: Backgrounds */
.bg-\[\#0d102f\] { background-color: #0d102f; }
.bg-slate-50 { background-color: #f8fafc; }
.bg-slate-100 { background-color: #f1f5f9; }
.bg-white { background-color: #ffffff; }

.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-indigo-500\/20 { background-color: rgba(99, 102, 241, 0.2); }
.bg-blue-600\/15 { background-color: rgba(37, 99, 235, 0.15); }

.bg-amber-50\/90 { background-color: rgba(254, 243, 199, 0.9); }
.bg-rose-50 { background-color: #fff1f2; }
.bg-emerald-50 { background-color: #ecfdf5; }
.bg-emerald-400 { background-color: #34d399; }
.bg-emerald-500 { background-color: #10b981; }

/* Gradients */
.bg-gradient-to-b {
    background-image: linear-gradient(to bottom, #0d102f, #141842, #1e2358);
}
.bg-gradient-to-tr {
    background-image: linear-gradient(to top right, #4338ca, #6366f1);
}
.bg-gradient-to-r {
    background-image: linear-gradient(to right, #4338ca, #4f46e5, #4338ca);
}

/* 9. Colors: Text */
.text-white { color: #ffffff; }
.text-slate-200 { color: #e2e8f0; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }

.text-indigo-200 { color: #c7d2fe; }
.text-indigo-600 { color: #4f46e5; }
.text-indigo-800 { color: #3730a3; }

.text-amber-400 { color: #fbbf24; }
.text-amber-600 { color: #d97706; }
.text-amber-900 { color: #78350f; }

.text-rose-600 { color: #e11d48; }
.text-rose-800 { color: #9f1239; }

.text-emerald-600 { color: #059669; }
.text-emerald-800 { color: #065f46; }

/* 10. Borders & Corners */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-t { border-top-width: 1px; }

.border-indigo-950\/60 { border-color: rgba(30, 27, 75, 0.6); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-white\/15 { border-color: rgba(255, 255, 255, 0.15); }
.border-indigo-400\/30 { border-color: rgba(129, 140, 248, 0.3); }

.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-slate-200\/80 { border-color: rgba(226, 232, 240, 0.8); }
.border-slate-300 { border-color: #cbd5e1; }

.border-amber-200\/80 { border-color: rgba(253, 230, 138, 0.8); }
.border-rose-200 { border-color: #fecdd3; }
.border-emerald-200 { border-color: #a7f3d0; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

/* 11. Shadows & Visual FX */
.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 -2px rgba(0, 0, 0, 0.1); }
.shadow-inner { box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06); }
.shadow-card-elevated {
    box-shadow: 0 12px 35px -8px rgba(15, 23, 42, 0.12), 0 4px 12px -4px rgba(15, 23, 42, 0.05);
}
.shadow-glow-indigo {
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.4);
}
.drop-shadow-md {
    filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.07)) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.06));
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.bg-opacity-95 {
    background-color: rgba(13, 16, 47, 0.95);
}

.blur-3xl { filter: blur(64px); }
.blur-2xl { filter: blur(40px); }

/* 12. Transforms & Animations */
.rotate-180 { transform: rotate(180deg); }

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}
.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.opacity-75 { opacity: 0.75; }

/* 13. Transitions & Interactivity */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.transition-colors {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
.duration-150 { transition-duration: 150ms; }

.tap-effect:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* Interactive pseudo states */
a {
    color: inherit;
    text-decoration: inherit;
}

.hover\:text-white:hover { color: #ffffff; }
.hover\:text-slate-600:hover { color: #475569; }
.hover\:text-indigo-800:hover { color: #3730a3; }
.hover\:underline:hover { text-decoration-line: underline; }
.hover\:brightness-105:hover { filter: brightness(1.05); }
.hover\:shadow-indigo-600\/50:hover {
    box-shadow: 0 10px 25px -5px rgba(79, 70, 229, 0.5);
}

.active\:scale-\[0\.98\]:active {
    transform: scale(0.98);
}

/* 14. Form Elements & Inputs */
input[type="text"],
input[type="tel"],
input[type="password"] {
    appearance: none;
    background-color: #f8fafc;
    border-color: #e2e8f0;
    border-width: 1px;
    border-radius: 0.75rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-family: inherit;
    outline: 2px solid transparent;
    outline-offset: 2px;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus {
    background-color: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25);
    outline: none;
}

input[type="checkbox"] {
    appearance: none;
    padding: 0;
    display: inline-block;
    vertical-align: middle;
    background-origin: border-box;
    user-select: none;
    flex-shrink: 0;
    height: 1rem;
    width: 1rem;
    color: #4f46e5;
    background-color: #fff;
    border-color: #cbd5e1;
    border-width: 1px;
    border-radius: 0.25rem;
    cursor: pointer;
    position: relative;
}

input[type="checkbox"]:checked {
    border-color: transparent;
    background-color: #4f46e5;
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
}

input::placeholder {
    color: #94a3b8;
    font-size: 0.875rem;
}

button {
    font-family: inherit;
    font-size: 100%;
    line-height: 1.15;
    margin: 0;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.focus\:outline-none:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.cursor-pointer { cursor: pointer; }
.object-contain { object-fit: contain; }
