@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #0f7a42;
    --primary-dark: #0b5f33;
    --bg: #f4f7fb;
    --card: #ffffff;
    --border: #e5e7eb;
    --text: #233142;
    --muted: #6b7280;
}

* {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    box-sizing: border-box;
}

body.simobel-body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.d-flex {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--card);
    border-right: 1px solid var(--border);
    padding: 22px 16px;
    box-shadow: 1px 0 0 rgba(0, 0, 0, 0.02);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.logo i {
    font-size: 30px;
}

.logo h5 {
    margin: 0;
    font-weight: 700;
    color: #1f2937;
}

.logo small {
    display: block;
    color: var(--muted);
}

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

.menu li {
    margin-bottom: 6px;
}

.menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #4b5563;
    padding: 8px 10px;
    border-radius: 10px;
    transition: 0.2s ease;
}

.menu li.active a,
.menu a:hover {
    background: #eaf7ef;
    color: var(--primary);
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg);
}

.topbar {
    background: var(--card);
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.topbar h4 {
    margin: 0;
    font-weight: 700;
    color: #111827;
}

.topbar .text-muted {
    color: var(--muted) !important;
    font-size: 0.92rem;
}

.top-action {
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
    width: auto;
    min-width: 0;
}

.top-action .btn {
    border-radius: 8px;
    padding: 8px 12px;
}

.top-action .btn-light {
    background: #f8fafc;
    border: 1px solid var(--border);
    color: #374151;
}

.btn-success {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.btn-success:hover {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
}

.card {
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

.table thead {
    background: #f8fafc;
}

body.dark {
    background: #020617;
    color: #e2e8f0;
}

body.dark aside,
body.dark nav,
body.dark .bg-white,
body.dark .bg-white\/90,
body.dark .rounded-2xl,
body.dark .rounded-lg,
body.dark .rounded-xl,
body.dark .rounded-md {
    background-color: #111827 !important;
    color: #e5e7eb;
}

body.dark .bg-slate-50 {
    background-color: #0f172a !important;
}

body.dark .bg-slate-100 {
    background-color: #1f2937 !important;
}

body.dark .border-slate-200 {
    border-color: #374151 !important;
}

body.dark .text-slate-900,
body.dark .text-slate-800,
body.dark .text-slate-700,
body.dark .text-slate-600,
body.dark .text-slate-500 {
    color: #f8fafc !important;
}

body.dark .text-slate-400 {
    color: #94a3b8 !important;
}

body.dark .bg-emerald-50,
body.dark .bg-emerald-100 {
    background-color: #134e4a !important;
}

body.dark button:hover,
body.dark .hover\:bg-emerald-50:hover,
body.dark .hover\:border-emerald-300:hover {
    background-color: #1f2937 !important;
    border-color: #34d399 !important;
    color: #6ee7b7 !important;
}

body.dark .bg-emerald-600 {
    background-color: #10b981 !important;
}

body.dark .hover\:bg-emerald-700:hover {
    background-color: #059669 !important;
}

body.dark .text-emerald-700 {
    color: #6ee7b7 !important;
}

body.dark .text-emerald-600 {
    color: #34d399 !important;
}

body.dark .leaflet-container {
    background: #0f172a;
}

.ts-wrapper{
    width:100%;
}

.ts-wrapper .ts-control{
    min-height:42px;
    width:100%;
    border:1px solid rgb(226 232 240); /* slate-200 */
    border-radius:.75rem;              /* rounded-xl */
    background:#fff;
    padding:.5rem .75rem;
    font-size:.875rem;                 /* text-sm */
    color:rgb(15 23 42);               /* slate-900 */
    box-shadow:none;
    display:flex;
    align-items:center;
}

.ts-wrapper.focus .ts-control{
    border-color:rgb(59 130 246);      /* blue-500 */
    box-shadow:0 0 0 3px rgb(59 130 246 / .15);
}

.ts-control input{
    font-size:.875rem;
    color:rgb(15 23 42);
}

.ts-control > .item{
    color:rgb(15 23 42);
}

.ts-dropdown{
    margin-top:4px;
    border:1px solid rgb(226 232 240);
    border-radius:.75rem;
    overflow:hidden;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
}

.ts-dropdown .option{
    padding:.6rem .75rem;
    font-size:.875rem;
}

.ts-dropdown .active{
    background:rgb(239 246 255);
    color:rgb(29 78 216);
}

body.dark table tbody tr:hover {
    background-color: #1e293b !important;
}