@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
    --bg-main: #050a0a;
    --bg-card: #0a1313;
    --bg-card-glass: rgba(10, 19, 19, 0.82);
    --bg-nav: rgba(5, 10, 10, 0.88);
    --text-main: #e2e8f0;
    --text-muted: rgba(226, 232, 240, 0.65);
    --accent-green: #00ff87;
    --accent-glow: rgba(0, 255, 135, 0.28);
    --border-neon: rgba(0, 255, 135, 0.18);
    --border-subtle: rgba(255, 255, 255, 0.07);
    --scroll-track: #050a0a;
    --scroll-thumb: #112828;
    --theme-toggle-bg: rgba(10, 19, 19, 0.9);
    --theme-toggle-color: #00ff87;
}

/* Light theme: same layout, softer palette, easy on the eyes. */
[data-theme="light"] {
    --bg-main: #f3fbf6;
    --bg-card: #ffffff;
    --bg-card-glass: rgba(255, 255, 255, 0.9);
    --bg-nav: rgba(255, 255, 255, 0.94);
    --text-main: #0b3d2c;
    --text-muted: #3f7a63;
    --accent-green: #059669;
    --accent-glow: rgba(5, 150, 105, 0.18);
    --border-neon: rgba(5, 150, 105, 0.24);
    --border-subtle: rgba(5, 150, 105, 0.14);
    --scroll-track: #e7f8ee;
    --scroll-thumb: #9fd8bd;
    --theme-toggle-bg: #ffffff;
    --theme-toggle-color: #047857;
}

* {
    box-sizing: border-box;
}

html {
    background-color: var(--bg-main);
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    direction: rtl;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Glassmorphism & Neon Shadows */
.glass-nav {
    background: var(--bg-nav);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-neon);
}

.glass-card {
    background: var(--bg-card-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-neon);
    border-radius: 1.25rem;
}

.glow-card {
    box-shadow: 0 0 25px var(--accent-glow);
}

.glow-text {
    text-shadow: 0 0 12px var(--accent-glow);
}

[data-theme="light"] .glow-text {
    text-shadow: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--scroll-thumb);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-green);
}

/* Light-theme overrides for the hard-coded dark utility colours used across the
   Blade views (Tailwind arbitrary values). Keeps the layout untouched, only the
   palette is softened so the light theme is readable everywhere. */
[data-theme="light"] .text-white,
[data-theme="light"] .text-gray-100,
[data-theme="light"] .text-gray-200,
[data-theme="light"] .text-slate-100,
[data-theme="light"] .text-slate-200 {
    color: var(--text-main) !important;
}

[data-theme="light"] .text-gray-300,
[data-theme="light"] .text-gray-400,
[data-theme="light"] .text-gray-500,
[data-theme="light"] .text-slate-300,
[data-theme="light"] .text-slate-400,
[data-theme="light"] .text-slate-500 {
    color: var(--text-muted) !important;
}

[data-theme="light"] .text-gray-600,
[data-theme="light"] .text-slate-600 {
    color: #35705a !important;
}

[data-theme="light"] .bg-\[\#050a0a\],
[data-theme="light"] .bg-\[\#060911\],
[data-theme="light"] .bg-\[\#070b11\],
[data-theme="light"] .bg-\[\#081816\],
[data-theme="light"] .bg-\[\#090d18\],
[data-theme="light"] .bg-\[\#091515\],
[data-theme="light"] .bg-\[\#0a1313\],
[data-theme="light"] .bg-\[\#0b241a\],
[data-theme="light"] .bg-\[\#0c1322\],
[data-theme="light"] .bg-\[\#1c170d\],
[data-theme="light"] .bg-\[\#2a1214\],
[data-theme="light"] .bg-black,
[data-theme="light"] .bg-black\/40,
[data-theme="light"] .bg-black\/50,
[data-theme="light"] .bg-gray-900,
[data-theme="light"] .bg-slate-900 {
    background-color: var(--bg-card) !important;
}

[data-theme="light"] .text-\[\#00ff87\] {
    color: var(--accent-green) !important;
}

[data-theme="light"] .border-\[\#00ff87\] {
    border-color: var(--border-neon) !important;
}

[data-theme="light"] .bg-\[\#00ff87\] {
    background-color: var(--accent-green) !important;
    color: #ffffff !important;
}

[data-theme="light"] .border-white\/5,
[data-theme="light"] .border-white\/10,
[data-theme="light"] .border-gray-800,
[data-theme="light"] .border-slate-800 {
    border-color: var(--border-subtle) !important;
}

/* Hover / focus and opacity variants of the hard-coded neon utility colours. */
[data-theme="light"] .hover\:text-\[\#00ff87\]:hover,
[data-theme="light"] .group:hover .group-hover\:text-\[\#00ff87\] {
    color: var(--accent-green) !important;
}

[data-theme="light"] .hover\:border-\[\#00ff87\]:hover,
[data-theme="light"] .focus\:border-\[\#00ff87\]:focus,
[data-theme="light"] .border-t-\[\#00ff87\] {
    border-color: rgba(5, 150, 105, 0.4) !important;
}

[data-theme="light"] .border-\[\#00ff87\]\/50 {
    border-color: var(--border-neon) !important;
}

[data-theme="light"] .bg-\[\#00ff87\]\/5,
[data-theme="light"] .bg-\[\#00ff87\]\/10,
[data-theme="light"] .bg-\[\#00ff87\]\/15,
[data-theme="light"] .bg-\[\#00ff87\]\/20 {
    background-color: rgba(5, 150, 105, 0.1) !important;
}

[data-theme="light"] .bg-\[\#00ff87\]\/20:hover {
    background-color: rgba(5, 150, 105, 0.16) !important;
}

[data-theme="light"] .text-\[\#5db85d\],
[data-theme="light"] .text-\[\#8ab4f8\] {
    color: #047857 !important;
}

[data-theme="light"] .text-\[\#ff8a88\] {
    color: #b91c1c !important;
}

[data-theme="light"] .border-\[\#eb4d4b\]\/50 {
    border-color: rgba(185, 28, 28, 0.4) !important;
}

[data-theme="light"] .bg-\[\#060911\]\/95,
[data-theme="light"] .bg-\[\#081816\]\/95,
[data-theme="light"] .bg-\[\#0c1322\]\/95,
[data-theme="light"] .bg-\[\#1c170d\]\/95 {
    background-color: rgba(255, 255, 255, 0.96) !important;
}

[data-theme="light"] .via-\[\#091122\],
[data-theme="light"] .via-\[\#0c1222\] {
    --tw-gradient-via: #f0fdf6 !important;
    --tw-gradient-stops: var(--tw-gradient-from), #f0fdf6, var(--tw-gradient-to) !important;
}

/* Hide scrollbar (used by the weekly calendar row on mobile) */
.no-scrollbar {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* --- Shared form fields: identical white + green palette everywhere --- */
[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="hidden"]),
[data-theme="light"] textarea,
[data-theme="light"] select {
    background-color: #ffffff !important;
    color: #0b3d2c !important;
    border: 1px solid rgba(5, 150, 105, 0.28) !important;
    caret-color: #059669;
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
    color: #3f7a63 !important;
    opacity: 1;
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
    outline: 2px solid rgba(5, 150, 105, 0.45) !important;
    outline-offset: 1px;
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15) !important;
}

[data-theme="light"] select option {
    background: #ffffff;
    color: #0b3d2c;
}

[data-theme="light"] input[type="checkbox"],
[data-theme="light"] input[type="radio"] {
    accent-color: #059669;
}

/* Toggle is always LTR-anchored (visible in the same corner of the screen). */
.theme-toggle {
    direction: ltr;
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: auto;
    z-index: 60;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid var(--border-neon);
    border-radius: 9999px;
    background: var(--theme-toggle-bg);
    color: var(--theme-toggle-color);
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.25s ease;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 18px var(--accent-glow);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

.theme-toggle .fa-sun,
.theme-toggle[data-theme="light"] .fa-moon {
    display: none;
}

.theme-toggle[data-theme="light"] .fa-sun {
    display: inline-block;
}
