/* ============================================================
   Newtsiou — Velzon-inspired Bootstrap 5 theme (custom, no paid assets)
   ============================================================ */
:root {
    --nt-primary: #405189;
    --nt-primary-rgb: 64, 81, 137;
    --nt-secondary: #3577f1;
    --nt-success: #0ab39c;
    --nt-info: #299cdb;
    --nt-warning: #f7b84b;
    --nt-danger: #f06548;
    --nt-dark: #212529;
    --nt-body-bg: #f3f3f9;
    --nt-sidebar-bg: #405189;
    --nt-sidebar-link: #abb9e8;
    --nt-sidebar-link-active: #fff;
    --nt-card-border: #e9ebec;
    --nt-text-muted: #878a99;
    --nt-topbar-h: 70px;
    --nt-sidebar-w: 250px;
}

body {
    background-color: var(--nt-body-bg);
    font-family: "Inter", "Segoe UI", -apple-system, system-ui, sans-serif;
    font-size: 0.875rem;
    color: #212529;
}

a { text-decoration: none; }

.text-muted-2 { color: var(--nt-text-muted) !important; }

/* ---------- Buttons / utilities ---------- */
.btn-primary { background-color: var(--nt-primary); border-color: var(--nt-primary); }
.btn-primary:hover, .btn-primary:focus { background-color: #364673; border-color: #364673; }
.btn-soft-primary { background-color: rgba(var(--nt-primary-rgb), .1); color: var(--nt-primary); border: none; }
.btn-soft-primary:hover { background-color: var(--nt-primary); color: #fff; }
.bg-primary { background-color: var(--nt-primary) !important; }
.text-primary { color: var(--nt-primary) !important; }
.link-primary { color: var(--nt-primary) !important; }

/* ---------- App layout ---------- */
.nt-wrapper { min-height: 100vh; }

.nt-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--nt-sidebar-w);
    background: var(--nt-sidebar-bg);
    color: #fff;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease;
}
.nt-sidebar .nt-brand {
    height: var(--nt-topbar-h);
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 0 1.25rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .5px;
}
.nt-sidebar .nt-brand i { color: #fff; }
.nt-menu { padding: .5rem 0; overflow-y: auto; flex: 1; }
.nt-menu .nt-menu-title {
    padding: .75rem 1.5rem .35rem;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #7386c4;
    font-weight: 600;
}
.nt-menu a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .62rem 1.5rem;
    color: var(--nt-sidebar-link);
    font-weight: 500;
    font-size: .875rem;
    transition: color .15s, background .15s;
}
.nt-menu a i { font-size: 1.05rem; width: 1.25rem; text-align: center; }
.nt-menu a:hover { color: #fff; }
.nt-menu a.active { color: var(--nt-sidebar-link-active); background: rgba(255,255,255,.06); }
.nt-menu a .badge { margin-left: auto; }

/* ---------- Topbar ---------- */
.nt-main { margin-left: var(--nt-sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.nt-topbar {
    height: var(--nt-topbar-h);
    background: #fff;
    border-bottom: 1px solid var(--nt-card-border);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}
.nt-content { padding: 1.5rem; flex: 1; }
.nt-page-title { font-size: 1.05rem; font-weight: 600; margin: 0; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--nt-card-border); box-shadow: 0 1px 2px rgba(56,65,74,.05); border-radius: .5rem; margin-bottom: 1.25rem; }
.card-header { background: #fff; border-bottom: 1px solid var(--nt-card-border); font-weight: 600; padding: .9rem 1.1rem; }
.card-body { padding: 1.1rem; }

/* ---------- Stat / KPI tiles ---------- */
.nt-stat { display: flex; align-items: center; gap: 1rem; }
.nt-stat-icon {
    width: 48px; height: 48px; border-radius: .5rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
}
.nt-stat .nt-stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
.nt-stat .nt-stat-label { color: var(--nt-text-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; }

.bg-soft-primary { background: rgba(var(--nt-primary-rgb), .12); color: var(--nt-primary); }
.bg-soft-success { background: rgba(10,179,156,.15); color: var(--nt-success); }
.bg-soft-warning { background: rgba(247,184,75,.18); color: #d9a13b; }
.bg-soft-danger  { background: rgba(240,101,72,.15); color: var(--nt-danger); }
.bg-soft-info    { background: rgba(41,156,219,.15); color: var(--nt-info); }

/* ---------- Tables ---------- */
.table { --bs-table-color: #212529; }
.table > thead { background: #f3f6f9; }
.table > thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .02em; color: var(--nt-text-muted); font-weight: 600; border-bottom: 1px solid var(--nt-card-border); }
.table > tbody td { vertical-align: middle; }

/* ---------- Badges ---------- */
.badge { font-weight: 600; padding: .32em .6em; }
.badge.bg-soft-success { background: rgba(10,179,156,.15) !important; color: var(--nt-success); }
.badge.bg-soft-warning { background: rgba(247,184,75,.18) !important; color: #d9a13b; }
.badge.bg-soft-danger  { background: rgba(240,101,72,.15) !important; color: var(--nt-danger); }
.badge.bg-soft-info    { background: rgba(41,156,219,.15) !important; color: var(--nt-info); }
.badge.bg-soft-primary { background: rgba(var(--nt-primary-rgb),.12) !important; color: var(--nt-primary); }
.badge.bg-soft-secondary { background: rgba(135,138,153,.15) !important; color: var(--nt-text-muted); }

/* ---------- Forms ---------- */
.form-label { font-weight: 500; margin-bottom: .35rem; font-size: .8rem; color: #495057; }
.form-control, .form-select { border-color: #ced4da; font-size: .875rem; padding: .5rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--nt-primary); box-shadow: 0 0 0 .15rem rgba(var(--nt-primary-rgb), .15); }

/* ---------- Auth pages ---------- */
.nt-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem;
    background: linear-gradient(135deg, #405189 0%, #0f172a 100%); }
.nt-auth-card { width: 100%; max-width: 460px; }
.nt-auth-brand { text-align: center; color: #fff; margin-bottom: 1.5rem; font-size: 1.6rem; font-weight: 700; letter-spacing: .5px; }

/* ---------- Public site ---------- */
.nt-public-header { background: #fff; border-bottom: 1px solid var(--nt-card-border); position: sticky; top: 0; z-index: 1020; }
.nt-hero { background: linear-gradient(135deg, #405189 0%, #2a3a6b 100%); color: #fff; padding: 4.5rem 0; }
.nt-hero h1 { font-weight: 700; }
.nt-listing-card { transition: box-shadow .15s, transform .15s; height: 100%; }
.nt-listing-card:hover { box-shadow: 0 .5rem 1.2rem rgba(56,65,74,.12); transform: translateY(-2px); }
.nt-listing-thumb { height: 190px; background: #eef0f5 center/cover no-repeat; border-radius: .5rem .5rem 0 0; display: flex; align-items: center; justify-content: center; color: #b5bcc9; font-size: 2.5rem; }
.nt-cat-card { text-align: center; padding: 1.5rem 1rem; border-radius: .5rem; background: #fff; border: 1px solid var(--nt-card-border); transition: .15s; height: 100%; }
.nt-cat-card:hover { border-color: var(--nt-primary); box-shadow: 0 .4rem 1rem rgba(56,65,74,.1); }
.nt-cat-icon { width: 60px; height: 60px; margin: 0 auto 1rem; border-radius: 50%; display:flex; align-items:center; justify-content:center; font-size: 1.6rem; }

/* ---------- Chatbot / smart search widget ---------- */
.nt-chatbot { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 1080; }
.nt-chatbot-toggle {
    width: 56px; height: 56px; border-radius: 50%; border: none;
    background: var(--nt-primary); color: #fff; font-size: 1.4rem;
    box-shadow: 0 .5rem 1.2rem rgba(56,65,74,.25); display: flex; align-items: center; justify-content: center;
}
.nt-chatbot-panel {
    position: absolute; right: 0; bottom: 0; width: 340px; max-width: calc(100vw - 2rem);
    background: #fff; border-radius: .75rem; box-shadow: 0 .75rem 2rem rgba(0,0,0,.2);
    display: none; flex-direction: column; overflow: hidden; max-height: 480px;
}
.nt-chatbot-panel.show { display: flex; }
.nt-chatbot-header { background: var(--nt-primary); color: #fff; padding: .85rem 1rem; display: flex; align-items: center; justify-content: space-between; }
.nt-chatbot-messages { flex: 1; overflow-y: auto; padding: .85rem; background: #f4f5f8; display: flex; flex-direction: column; gap: .6rem; min-height: 240px; }
.nt-chat-msg { display: flex; }
.nt-chat-msg-user { justify-content: flex-end; }
.nt-chat-bubble { max-width: 88%; padding: .55rem .75rem; border-radius: .75rem; font-size: .82rem; line-height: 1.45; }
.nt-chat-msg-user .nt-chat-bubble { background: var(--nt-primary); color: #fff; border-bottom-right-radius: .2rem; }
.nt-chat-msg-bot .nt-chat-bubble { background: #fff; color: #38414a; border: 1px solid var(--nt-card-border); border-bottom-left-radius: .2rem; }
.nt-chat-results { margin-top: .5rem; display: flex; flex-direction: column; gap: .4rem; }
.nt-chat-result { display: block; padding: .5rem .6rem; border: 1px solid var(--nt-card-border); border-radius: .5rem; text-decoration: none; color: inherit; background: #fbfbfd; }
.nt-chat-result:hover { border-color: var(--nt-primary); background: #fff; }
.nt-chat-result-title { display: block; font-weight: 600; font-size: .8rem; color: #2a3a6b; }
.nt-chat-result-meta { display: block; font-size: .72rem; color: var(--nt-text-muted); margin-top: .1rem; }
.nt-chat-viewall { display: inline-block; margin-top: .55rem; font-size: .78rem; font-weight: 600; color: var(--nt-primary); text-decoration: none; }
.nt-chatbot-form { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid var(--nt-card-border); background: #fff; }
.nt-chatbot-form .form-control { font-size: .82rem; }
#ntChatMic.nt-chat-mic-active { color: #fff; background: var(--nt-danger); border-color: var(--nt-danger); }
@media (max-width: 420px) { .nt-chatbot-panel { width: calc(100vw - 2rem); } }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .nt-sidebar { transform: translateX(-100%); }
    .nt-sidebar.show { transform: translateX(0); }
    .nt-main { margin-left: 0; }
}

.nt-sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1025; }
.nt-sidebar-backdrop.show { display: block; }
