@import 'tailwindcss';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';
@source '../**/*.blade.php';
@source '../**/*.js';
@source '../**/*.vue';

@theme {
    --font-sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
    --font-display: 'Manrope', 'DM Sans', ui-sans-serif, system-ui, sans-serif;
}

@layer base {
    * { -webkit-tap-highlight-color: transparent; }
    body { font-family: var(--font-sans); }
    button, a, input, textarea { transition-property: color, background-color, border-color, box-shadow, opacity, transform; transition-duration: 160ms; }
    button { cursor: pointer; }
    button:disabled { cursor: not-allowed; }
    ::selection { background: #dcefe5; color: #124c3d; }
}

@layer components {
    .nav-link { @apply inline-flex items-center gap-2 rounded-full px-4 py-2.5 text-[13px] font-bold text-slate-500 hover:bg-white hover:text-slate-800; }
    .nav-link-active { @apply bg-white text-[#176b57] shadow-sm; }
    .nav-post { @apply inline-flex items-center gap-1.5 rounded-full bg-[#176b57] px-5 py-2.5 text-[13px] font-extrabold text-white shadow-sm hover:bg-[#105744] hover:shadow-md; }
    .icon-button { @apply relative grid size-10 place-items-center rounded-full text-slate-500 hover:bg-slate-100 hover:text-slate-800; }
    .mobile-tabbar { @apply fixed inset-x-0 bottom-0 z-40 grid grid-cols-5 items-center border-t border-slate-200/80 bg-white/95 px-1 pb-[max(.5rem,env(safe-area-inset-bottom))] pt-2 backdrop-blur-xl; }
    .mobile-tab { @apply flex flex-col items-center justify-center gap-1 py-1 text-[9px] font-bold text-slate-400; }
    .mobile-tab-active { @apply text-[#176b57]; }
    .mobile-post { @apply relative mx-auto -mt-5 flex flex-col items-center gap-1 bg-transparent text-[10px] font-extrabold leading-none text-[#176b57]; }
    .mobile-post-icon { @apply grid size-[50px] place-items-center rounded-[18px] bg-gradient-to-b from-[#21866c] to-[#176b57] text-white shadow-[0_8px_20px_rgba(23,107,87,.3)] ring-[5px] ring-white transition duration-200 group-hover:-translate-y-0.5 group-hover:shadow-[0_11px_24px_rgba(23,107,87,.34)] group-active:scale-95; }
    .mobile-post-label { @apply tracking-[.02em]; }
    .avatar { @apply grid size-10 shrink-0 place-items-center rounded-full bg-[#e0ede5] bg-cover bg-center text-sm font-extrabold text-[#176b57]; }
    .avatar-sm { @apply size-8 text-xs; }
    .avatar-lg { @apply size-12 text-base; }
    .avatar-overlap { @apply ring-[3px] ring-white; }
    .post-card { @apply rounded-[22px] border border-slate-100 bg-white p-4 shadow-[0_5px_20px_rgba(22,51,37,.035)] sm:p-5; }
    .post-card-featured { @apply border-[#e7eee8]; }
    .category-badge { @apply inline-flex items-center rounded-full px-2.5 py-1 text-[10px] font-extrabold; }
    .badge-help { @apply bg-amber-50 text-amber-700; }
    .badge-alert { @apply bg-rose-50 text-rose-700; }
    .badge-looking { @apply bg-violet-50 text-violet-700; }
    .badge-service { @apply bg-sky-50 text-sky-700; }
    .badge-market { @apply bg-orange-50 text-orange-700; }
    .badge-event { @apply bg-emerald-50 text-emerald-700; }
    .post-action { @apply inline-flex min-w-12 items-center justify-center gap-1.5 rounded-lg px-2 py-2 text-xs font-bold text-slate-400 hover:bg-slate-50 hover:text-slate-700; }
    .quick-action { @apply flex min-w-0 flex-col items-center gap-2 rounded-2xl bg-white px-1 py-3 text-center text-[10px] font-bold leading-4 text-slate-500 ring-1 ring-slate-100 transition hover:-translate-y-0.5 hover:shadow-sm sm:text-[11px]; }
    .quick-icon { @apply grid size-10 place-items-center rounded-[15px]; }
    .quick-help { @apply bg-amber-50 text-amber-700; }
    .quick-alert { @apply bg-rose-50 text-rose-700; }
    .quick-find { @apply bg-violet-50 text-violet-700; }
    .quick-offer { @apply bg-sky-50 text-sky-700; }
    .quick-market { @apply bg-orange-50 text-orange-700; }
    .quick-event { @apply bg-emerald-50 text-emerald-700; }
    .filter-chip { @apply shrink-0 rounded-full border border-slate-200 bg-white px-3.5 py-2 text-[11px] font-bold text-slate-500 hover:border-slate-300; }
    .filter-chip-active { @apply border-[#176b57] bg-[#176b57] text-white hover:bg-[#105744]; }
    .side-card { @apply rounded-[22px] border border-slate-100 bg-white shadow-[0_5px_20px_rgba(22,51,37,.03)]; }
    .explore-tile { @apply flex min-h-[75px] flex-col items-start justify-between rounded-2xl p-3 text-[11px] font-extrabold text-slate-700 transition hover:-translate-y-0.5 hover:shadow-sm; }
    .empty-card { @apply flex flex-col items-center rounded-[22px] border border-dashed border-slate-200 bg-white px-5 py-11 text-center; }
    .button-primary { @apply inline-flex items-center gap-2 rounded-xl bg-[#176b57] px-4 py-2.5 text-sm font-extrabold text-white shadow-sm hover:bg-[#105744] disabled:opacity-50; }
    .button-soft { @apply inline-flex items-center gap-2 rounded-xl border border-slate-200 bg-white px-3.5 py-2.5 text-sm font-bold text-slate-600 hover:border-slate-300 hover:bg-slate-50; }
    .form-label { @apply block text-xs font-extrabold text-slate-700; }
    .form-input { @apply block w-full rounded-xl border border-slate-200 bg-white px-3.5 py-3 text-sm font-medium text-slate-800 outline-none placeholder:font-normal placeholder:text-slate-400 focus:border-[#176b57]/50 focus:ring-4 focus:ring-[#176b57]/[.08]; }
    .form-error { @apply mt-1 block text-xs font-semibold text-rose-600; }
    .modal-scrim { @apply fixed inset-0 z-[70] grid place-items-center overflow-y-auto bg-slate-900/45 p-3 backdrop-blur-sm sm:p-6; }
    .modal-card { @apply w-full overflow-hidden rounded-[24px] bg-white shadow-[0_24px_90px_rgba(15,35,27,.25)]; }
    .category-choice { @apply flex items-center gap-3 rounded-2xl border border-slate-100 p-3 transition hover:border-[#176b57]/25 hover:bg-[#fbfcfa] hover:shadow-sm; }
    .fade-enter-active, .fade-leave-active { transition: opacity .18s ease, transform .18s ease; }
    .fade-enter-from, .fade-leave-to { opacity: 0; }
    .fade-enter-from .modal-card { transform: translateY(10px) scale(.985); }
    .hide-scrollbar { scrollbar-width: none; }
    .hide-scrollbar::-webkit-scrollbar { display: none; }
    .search-input { @apply h-[58px] w-full rounded-2xl border border-slate-200 bg-white pl-14 pr-28 text-sm outline-none shadow-[0_5px_20px_rgba(22,51,37,.03)] placeholder:text-slate-400 focus:border-[#176b57]/40 focus:ring-4 focus:ring-[#176b57]/[.06]; }
    .discover-filter { @apply inline-flex shrink-0 items-center gap-2 rounded-full border border-slate-200 bg-white px-4 py-2.5 text-xs font-bold text-slate-500 hover:border-slate-300; }
    .discover-filter-active { @apply border-[#176b57] bg-[#176b57] text-white hover:bg-[#105744]; }
    .explore-card { @apply relative min-h-40 rounded-[22px] p-4 text-slate-800 transition hover:-translate-y-1 hover:shadow-md; }
    .discover-green { @apply bg-[#eaf4ec] text-[#176b57]; }
    .discover-orange { @apply bg-[#fff0df] text-[#a96434]; }
    .discover-violet { @apply bg-[#f1edfa] text-violet-800; }
    .discover-blue { @apply bg-[#e9f1f7] text-sky-800; }
    .person-card { @apply flex items-center gap-3 rounded-2xl border border-slate-100 bg-white p-4; }
    .popular-card { @apply flex items-center gap-3 rounded-2xl border border-slate-100 bg-white p-4 transition hover:border-emerald-100 hover:shadow-sm; }
    .message-shell { @apply grid min-h-[620px] overflow-hidden rounded-[22px] border border-slate-200 bg-white shadow-[0_5px_22px_rgba(22,51,37,.04)] lg:grid-cols-[340px_minmax(0,1fr)]; }
    .message-list { @apply border-b border-slate-100 lg:border-b-0 lg:border-r; }
    .conversation-row { @apply flex w-full items-center gap-3 border-b border-slate-50 px-4 py-4 text-slate-600 transition hover:bg-slate-50; }
    .conversation-row-active { @apply bg-[#f1f6f1] text-slate-800; }
    .chat-panel { @apply flex min-h-[620px] flex-col; }
    .auth-page { @apply grid min-h-screen place-items-center bg-[#f5f7f3] p-3 sm:p-6; }
    .auth-frame { @apply grid min-h-[min(780px,calc(100vh-24px))] w-full max-w-[1080px] overflow-hidden rounded-[28px] bg-white shadow-[0_30px_90px_rgba(17,44,33,.12)] md:grid-cols-[.95fr_1.05fr]; }
    .auth-story { @apply flex flex-col bg-[#176b57] p-7 text-white sm:p-10 lg:p-12; }
    .auth-kicker { @apply inline-flex items-center gap-2 rounded-full bg-white/10 px-3 py-2 text-[10px] font-extrabold uppercase tracking-[1.1px] text-emerald-50; }
    .auth-avatar { @apply grid size-9 place-items-center rounded-full text-xs font-extrabold text-slate-700 ring-[3px] ring-[#176b57]; }
    .auth-form-wrap { @apply flex items-center justify-center p-6 sm:p-10; }
    .auth-form-box { @apply w-full max-w-[390px]; }
    .profile-banner { @apply relative mb-4 overflow-hidden rounded-[24px] bg-[#176b57] p-5 sm:p-7; }
    .profile-banner-pattern { @apply absolute -right-8 -top-24 size-72 rounded-full border-[42px] border-white/[.05]; }
    .profile-avatar { @apply grid size-[76px] shrink-0 place-items-center rounded-[25px] border-4 border-white/20 bg-[#e0ede5] font-display text-3xl font-extrabold text-[#176b57] shadow-lg; }
    .stat-tile { @apply rounded-2xl border border-slate-100 bg-white px-4 py-4 text-center shadow-[0_3px_12px_rgba(22,51,37,.025)]; }
    .stat-tile-reputation { @apply border-amber-100 bg-gradient-to-br from-amber-50 to-white shadow-[0_4px_14px_rgba(180,130,30,.08)]; }
    .stat-tile-reputation strong { @apply text-amber-800; }
    .stat-tile-reputation span { @apply text-amber-700/70; }
    .stat-tile strong { @apply block font-display text-xl font-extrabold text-slate-800; }
    .stat-tile span { @apply mt-1 block text-[10px] font-semibold text-slate-400; }
    .profile-tab { @apply shrink-0 border-b-2 border-transparent px-3 py-3 text-xs font-bold text-slate-400 hover:text-slate-700; }
    .profile-tab-active { @apply border-[#176b57] text-[#176b57]; }
    .profile-menu { @apply flex w-full items-center gap-3 rounded-xl px-2 py-3 text-left text-xs font-bold text-slate-600 transition hover:bg-slate-50; }
}

@media (min-width: 768px) {
    .mobile-tabbar { display: none; }
}
@media (max-width: 1023px) {
    .message-shell { min-height: 560px; }
    .message-list { min-height: 300px; }
}

.leaflet-container { font-family: inherit; z-index: 0; }
.leaflet-control-attribution { font-size: 9px !important; }
.neighbor-map-marker-shell { background: transparent; border: 0; }
.neighbor-map-marker { position: relative; display: grid; width: 34px; height: 34px; place-items: center; border: 3px solid #fff; border-radius: 50% 50% 50% 8px; background: var(--marker-color); box-shadow: 0 3px 10px #16281f55; transform: rotate(-45deg); }
.neighbor-map-marker span { width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #ffffff70; }
.leaflet-div-icon { background: transparent; border: 0; }

/* Persistent dark theme. The token overrides cover utility colors; component rules
   handle surfaces declared through @apply so every page shares the same palette. */
html.dark { color-scheme: dark; background: #101815; }
html.dark body { background: #101815; color: #e5eee8; }
html.dark .app-shell { background-color: #101815 !important; color: #e5eee8; }
html.dark .auth-page { background-color: #101815 !important; }
html.dark .auth-frame { background-color: #17231d; }
html.dark .auth-form-box { color: #e5eee8; }

html.dark [class~="bg-white"],
html.dark [class~="bg-white/90"],
html.dark [class~="bg-white/95"] { background-color: #18231e !important; }
html.dark [class~="bg-slate-50"],
html.dark [class~="bg-slate-50/50"] { background-color: #1d2923 !important; }
html.dark [class~="bg-slate-100"],
html.dark [class~="bg-slate-100/80"] { background-color: #24322b !important; }
html.dark [class~="bg-slate-200"] { background-color: #34443b !important; }

html.dark [class~="bg-emerald-50"] { background-color: #1c382c !important; }
html.dark [class~="bg-emerald-100"] { background-color: #244b39 !important; }
html.dark [class~="bg-amber-50"] { background-color: #392f1d !important; }
html.dark [class~="bg-amber-100"] { background-color: #4a3b22 !important; }
html.dark [class~="bg-rose-50"] { background-color: #3b2529 !important; }
html.dark [class~="bg-rose-100"] { background-color: #512b31 !important; }
html.dark [class~="bg-violet-50"] { background-color: #30283f !important; }
html.dark [class~="bg-sky-50"] { background-color: #203642 !important; }
html.dark [class~="bg-orange-50"] { background-color: #3c2d21 !important; }

html.dark [class~="bg-[#f7f8f6]"],
html.dark [class~="bg-[#f5f7f3]"] { background-color: #101815 !important; }
html.dark [class~="bg-[#f4f7f3]"],
html.dark [class~="bg-[#f4f8f4]"],
html.dark [class~="bg-[#f3f8f3]"],
html.dark [class~="bg-[#f3f7f2]"],
html.dark [class~="bg-[#f0f5ef]"],
html.dark [class~="bg-[#f1f6f1]"],
html.dark [class~="bg-[#eff7f2]"],
html.dark [class~="bg-[#edf5f0]"],
html.dark [class~="bg-[#fbfcfa]"] { background-color: #1d2a23 !important; }
html.dark [class~="bg-[#eaf4ec]"],
html.dark [class~="bg-[#eef6f0]"],
html.dark [class~="bg-[#e3f0e7]"] { background-color: #203a2d !important; }
html.dark [class~="bg-[#e0ede5]"],
html.dark [class~="bg-[#bad4ca]"] { background-color: #29483a !important; }
html.dark [class~="bg-[#fff0df]"],
html.dark [class~="bg-[#fff4e9]"],
html.dark [class~="bg-[#fff8f0]"],
html.dark [class~="bg-[#f1d6a9]"] { background-color: #382b1e !important; }
html.dark [class~="bg-[#f1edfa]"],
html.dark [class~="bg-[#f2effa]"],
html.dark [class~="bg-[#d9c8ef]"] { background-color: #2d263a !important; }
html.dark [class~="bg-[#e9f1f7]"],
html.dark [class~="bg-[#edf3fa]"],
html.dark [class~="bg-[#e5ece5]"],
html.dark [class~="bg-[#edf2ec]"] { background-color: #21313b !important; }

html.dark [class~="text-slate-900"] { color: #f1f5f2 !important; }
html.dark [class~="text-slate-800"] { color: #e2eae5 !important; }
html.dark [class~="text-slate-700"] { color: #d1dcd5 !important; }
html.dark [class~="text-slate-600"] { color: #bac8bf !important; }
html.dark [class~="text-slate-500"] { color: #9eafa4 !important; }
html.dark [class~="text-slate-400"] { color: #899a90 !important; }
html.dark [class~="text-[#176b57]"] { color: #83dcb2 !important; }
html.dark [class~="text-emerald-700"], html.dark [class~="text-emerald-800"] { color: #83ddb0 !important; }
html.dark [class~="text-amber-600"], html.dark [class~="text-amber-700"], html.dark [class~="text-amber-800"] { color: #f4cd78 !important; }
html.dark [class~="text-rose-600"], html.dark [class~="text-rose-700"] { color: #fda4af !important; }
html.dark [class~="text-violet-700"], html.dark [class~="text-violet-800"] { color: #c4b5fd !important; }
html.dark [class~="text-sky-700"], html.dark [class~="text-sky-800"] { color: #7dd3fc !important; }
html.dark [class~="text-orange-700"] { color: #fdba74 !important; }

html.dark [class~="border-slate-50"],
html.dark [class~="border-slate-100"],
html.dark [class~="border-slate-200"],
html.dark [class~="border-slate-200/70"],
html.dark [class~="border-slate-200/80"],
html.dark [class~="border-slate-300"] { border-color: #2b3b32 !important; }
html.dark [class~="divide-slate-100"] > :not(:last-child) { border-color: #2b3b32 !important; }

html.dark .nav-link { color: #9eafa4; }
html.dark .nav-link:hover, html.dark .nav-link-active { background-color: #24362c; color: #8cdfb8; }
html.dark .icon-button { color: #a6b5ab; }
html.dark .icon-button:hover { background-color: #26362d; color: #f1f5f2; }
html.dark .mobile-tabbar { background-color: rgb(22 33 27 / 96%); border-color: #2b3b32; }
html.dark .mobile-tab { color: #91a197; }
html.dark .mobile-tab-active, html.dark .mobile-post { color: #91e1ba; }
html.dark .mobile-post-icon { --tw-ring-color: #101815; }
html.dark .avatar { background-color: #29483a; color: #b7eed0; }
html.dark .post-card, html.dark .side-card, html.dark .empty-card,
html.dark .person-card, html.dark .popular-card, html.dark .message-shell,
html.dark .modal-card, html.dark .auth-frame { background-color: #18231e; border-color: #2b3b32; }
html.dark .post-card-featured { border-color: #31513e; }
html.dark .post-action { color: #9eafa4; }
html.dark .post-action:hover { background-color: #24322b; color: #d1dcd5; }
html.dark .quick-action {
    color: #d1dcd5;
    background: linear-gradient(155deg, #1c2922, #17221d);
    border: 1px solid #2d4035;
    box-shadow: 0 5px 14px rgb(0 0 0 / 14%);
    --tw-ring-color: #2d4035;
}
html.dark .quick-action:hover {
    background: linear-gradient(155deg, #24352b, #1c2b23);
    border-color: #42634f;
    box-shadow: 0 9px 20px rgb(0 0 0 / 23%);
}
html.dark .quick-action:active { transform: translateY(0) scale(.98); }
html.dark .quick-action:focus-visible, html.dark .explore-card:focus-visible { outline: 2px solid #79d7a6; outline-offset: 3px; }
html.dark .quick-icon { box-shadow: inset 0 1px 0 rgb(255 255 255 / 7%); }
html.dark .explore-tile { color: #d1dcd5; }
html.dark .explore-card { border: 1px solid rgb(255 255 255 / 8%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 3%); }
html.dark .discover-green { background: linear-gradient(145deg, #1c3b2b, #172c22); color: #a5e8bd; }
html.dark .discover-orange { background: linear-gradient(145deg, #3c2e20, #2a2119); color: #ffd09a; }
html.dark .discover-violet { background: linear-gradient(145deg, #302942, #231f30); color: #d1c2ff; }
html.dark .discover-blue { background: linear-gradient(145deg, #223845, #1a2b35); color: #a5dcf5; }
html.dark .explore-card:hover { border-color: rgb(255 255 255 / 16%); filter: brightness(1.12); }
html.dark .explore-card > span:first-child { background: rgb(255 255 255 / 8%) !important; border: 1px solid rgb(255 255 255 / 10%); }
html.dark .filter-chip, html.dark .discover-filter { background-color: #18231e; border-color: #35463c; color: #b5c2b9; }
html.dark .filter-chip:hover, html.dark .discover-filter:hover { border-color: #547663; }
html.dark .side-card, html.dark .empty-card, html.dark .popular-card, html.dark .person-card { color: #e2eae5; }
html.dark .button-soft { background-color: #202d26; border-color: #35463c; color: #d1dcd5; }
html.dark .button-soft:hover { background-color: #2a3a31; border-color: #4b6254; }
html.dark .form-label { color: #d1dcd5; }
html.dark .form-input, html.dark .search-input { background-color: #111b16; border-color: #35463c; color: #e5eee8; }
html.dark .form-input::placeholder, html.dark .search-input::placeholder { color: #829389; }
html.dark .category-choice { border-color: #2b3b32; }
html.dark .category-choice:hover { background-color: #1d2a23; }
html.dark .message-list { border-color: #2b3b32; }
html.dark .conversation-row { border-color: #26362d; color: #bac8bf; }
html.dark .conversation-row:hover, html.dark .conversation-row-active { background-color: #203229; color: #e2eae5; }
html.dark .chat-panel { color: #e2eae5; }
html.dark .theme-toggle { color: #c5d2c9; }
html.dark .modal-scrim { background-color: rgb(2 8 5 / 72%); }
html.dark .badge-help { background-color: #392f1d; color: #f4cd78; }
html.dark .badge-alert { background-color: #3b2529; color: #fda4af; }
html.dark .badge-looking { background-color: #30283f; color: #c4b5fd; }
html.dark .badge-service { background-color: #203642; color: #7dd3fc; }
html.dark .badge-market { background-color: #3c2d21; color: #fdba74; }
html.dark .badge-event { background-color: #1c382c; color: #83ddb0; }
html.dark .quick-help { background-color: #392f1d; color: #f4cd78; }
html.dark .quick-alert { background-color: #3b2529; color: #fda4af; }
html.dark .quick-find { background-color: #30283f; color: #c4b5fd; }
html.dark .quick-offer { background-color: #203642; color: #7dd3fc; }
html.dark .quick-market { background-color: #3c2d21; color: #fdba74; }
html.dark .quick-event { background-color: #1c382c; color: #83ddb0; }
html.dark .profile-tab { color: #91a197; }
html.dark .profile-tab-active { border-color: #58bd8a; color: #91e1ba; }
html.dark .profile-menu { color: #bac8bf; }
html.dark .profile-menu:hover { background-color: #24322b; }
html.dark .stat-tile-reputation {
    border-color: #59492b;
    background: linear-gradient(145deg, #342b1d, #24251f 72%);
    box-shadow: inset 0 1px 0 rgb(255 230 168 / 7%), 0 7px 18px rgb(0 0 0 / 16%);
}
html.dark .stat-tile-reputation strong { color: #ffdc8c; }
html.dark .stat-tile-reputation span { color: #d8bd7a; }
html.dark .reputation-panel { background: #17221d; border-color: #2e4b39; box-shadow: 0 14px 38px rgb(0 0 0 / 25%); }
html.dark .reputation-hero { background-image: radial-gradient(circle at 92% 12%, rgb(255 211 129 / 13%), transparent 27%), linear-gradient(130deg, #1d5039, #173e2e 58%, #122e24); }
html.dark .reputation-score { background: rgb(5 24 16 / 29%); border-color: rgb(255 222 153 / 24%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 9%); }
html.dark .reputation-rating { background: linear-gradient(145deg, #342a1c, #25231d) !important; border-color: #59482a; }
html.dark .reputation-rating [class~="text-amber-700/70"] { color: #d9bd7b !important; }
html.dark .reputation-how { background: linear-gradient(145deg, #202d26, #1c2822); border-color: #33463a; }

html.dark [class~="hover:bg-white"]:hover { background-color: #24322b !important; }
html.dark [class~="hover:bg-slate-50"]:hover,
html.dark [class~="hover:bg-slate-100"]:hover,
html.dark [class~="hover:bg-[#fbfcfa]"]:hover { background-color: #24322b !important; }
