/* ServisHub shared application theme */
:root {
    --sh-orange: #F06B3F;
    --sh-orange-hover: #D9532A;
    --sh-navy: #17324D;
    --sh-navy-deep: #10283F;
    --sh-gold: #F2B84B;
    --sh-canvas: #F4F6F8;
    --sh-surface: #FFFFFF;
    --sh-border: #E2E8EE;
    --sh-text: #192B3A;
    --sh-muted: #71808D;
    --sh-success: #27866D;
    --sh-warning: #B97516;
    --sh-error: #C64B4B;
    --sh-info: #3579A6;
}

.app-shell,
.public-shell {
    color: var(--sh-text);
    background: var(--sh-canvas);
    font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
}

.app-shell .bg-slate-50,
.public-shell .bg-slate-50 { background-color: var(--sh-canvas) !important; }
.app-shell .bg-slate-100,
.public-shell .bg-slate-100 { background-color: #EDF1F4 !important; }
.app-shell .bg-slate-900,
.public-shell .bg-slate-900 { background-color: var(--sh-navy) !important; }
.app-shell .bg-slate-950,
.public-shell .bg-slate-950 { background-color: var(--sh-navy-deep) !important; }
.app-shell .bg-slate-800,
.public-shell .bg-slate-800 { background-color: #24435D !important; }

.app-shell .text-slate-900,
.public-shell .text-slate-900,
.app-shell .text-slate-800,
.public-shell .text-slate-800 { color: var(--sh-text) !important; }
.app-shell .text-slate-700,
.public-shell .text-slate-700,
.app-shell .text-slate-600,
.public-shell .text-slate-600 { color: #52616D !important; }
.app-shell .text-slate-500,
.public-shell .text-slate-500 { color: var(--sh-muted) !important; }

.app-shell .border-slate-50,
.public-shell .border-slate-50,
.app-shell .border-slate-100,
.public-shell .border-slate-100,
.app-shell .border-slate-200,
.public-shell .border-slate-200,
.app-shell .border-slate-300,
.public-shell .border-slate-300 { border-color: var(--sh-border) !important; }

.app-shell .bg-white.rounded-xl,
.app-shell .bg-white.rounded-2xl,
.app-shell .bg-white.rounded-3xl,
.public-shell .bg-white.rounded-xl,
.public-shell .bg-white.rounded-2xl,
.public-shell .bg-white.rounded-3xl {
    border-color: var(--sh-border);
    box-shadow: 0 2px 8px rgba(23, 50, 77, 0.05);
}

:is(.app-shell, .public-shell) :is(a, button, input[type="submit"]).bg-teal-600 {
    background-color: var(--sh-orange) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(240, 107, 63, 0.16);
}
:is(.app-shell, .public-shell) :is(a, button, input[type="submit"]).bg-teal-600:hover,
:is(.app-shell, .public-shell) :is(a, button, input[type="submit"]).bg-teal-700:hover {
    background-color: var(--sh-orange-hover) !important;
    color: #FFFFFF !important;
}

.app-shell input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.app-shell select,
.app-shell textarea,
.public-shell input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
.public-shell select,
.public-shell textarea {
    border-color: var(--sh-border);
    border-radius: 12px;
    background-color: var(--sh-surface);
    color: var(--sh-text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.app-shell input::placeholder,
.app-shell textarea::placeholder,
.public-shell input::placeholder,
.public-shell textarea::placeholder { color: #9AA7B1; }

.app-shell input:focus,
.app-shell select:focus,
.app-shell textarea:focus,
.public-shell input:focus,
.public-shell select:focus,
.public-shell textarea:focus {
    border-color: var(--sh-info);
    outline: none;
    box-shadow: 0 0 0 3px rgba(53, 121, 166, 0.14);
}

.app-shell input[type="checkbox"],
.app-shell input[type="radio"],
.public-shell input[type="checkbox"],
.public-shell input[type="radio"] { accent-color: var(--sh-orange); }

.app-shell button,
.app-shell a,
.public-shell button,
.public-shell a { transition-duration: 0.18s; }

.app-shell table,
.public-shell table { border-collapse: separate; border-spacing: 0; }

.app-shell thead th,
.public-shell thead th {
    background-color: #F8FAFB;
    color: #52616D;
    border-bottom: 1px solid var(--sh-border);
}

.app-shell tbody td,
.public-shell tbody td { border-bottom-color: var(--sh-border); }

.app-shell tr:hover td,
.public-shell tr:hover td { background-color: #FAFBFC; }

#app-sidebar {
    background-color: var(--sh-navy) !important;
    border-right-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 8px 0 28px rgba(16, 40, 63, 0.08);
}

#app-sidebar .app-sidebar-brand,
#app-sidebar .app-sidebar-footer { background-color: var(--sh-navy-deep) !important; }

#app-sidebar .app-brand-mark {
    background: var(--sh-orange) !important;
    box-shadow: 0 6px 16px rgba(240, 107, 63, 0.2);
}

#app-sidebar .text-slate-300 { color: #D7E1E9 !important; }
#app-sidebar .text-slate-400 { color: #AFC0CC !important; }
#app-sidebar .text-slate-500 { color: #9AB0BE !important; }

#app-sidebar .bg-sky-600 {
    background-color: var(--sh-orange) !important;
    color: #FFFFFF !important;
    box-shadow: 0 6px 18px rgba(240, 107, 63, 0.2);
}

#app-sidebar a:hover:not(.bg-sky-600) {
    background-color: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.app-topbar {
    border-color: var(--sh-border) !important;
    box-shadow: 0 2px 8px rgba(23, 50, 77, 0.035);
}

.app-main { background-color: var(--sh-canvas); }

.app-shell :focus-visible,
.public-shell :focus-visible {
    outline-color: var(--sh-info);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .app-shell *,
    .public-shell * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
