/* ============================================================
   Land Unit (LDU) - Custom Theme
   Amber / orange accent · dark navbar · clean cards
   ============================================================ */
:root {
    --ldu-bg:      #0d0f12;
    --ldu-card:    #14171c;
    --ldu-card-2:  #1b1f25;
    --ldu-border:  #2a2f37;
    --ldu-accent:  #FF6B00;
    --ldu-accent2: #FFB300;
    --ldu-text:    #e9ecef;
    --ldu-mute:    #8a909a;
    --ldu-side:   #0a0c0f;
    --ldu-green:   #00C853;
}

html[data-bs-theme="dark"] body,
body { background: var(--ldu-bg); color: var(--ldu-text); }

/* ---------- Brand mark ---------- */
.brand-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--ldu-accent), #d4570a);
    color: #fff; font-weight: 800; border-radius: 10px; letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(255,107,0,.25);
}

/* ---------- Navbar ---------- */
.ldu-navbar {
    background: var(--ldu-side) !important;
    border-bottom: 1px solid var(--ldu-border);
    height: 64px;
}
.ldu-top-search { width: 320px; }
.ldu-top-search input:focus { box-shadow: 0 0 0 .15rem rgba(255,107,0,.25); }
.ldu-notif-menu { min-width: 320px; }

/* ---------- Avatar ---------- */
.avatar-sm {
    width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--ldu-accent), #d4570a);
    color: #fff; font-weight: 700; font-size: .85rem;
}
.avatar-md {
    width: 42px; height: 42px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--ldu-accent), #d4570a);
    color: #fff; font-weight: 700; font-size: 1rem;
    border: 2px solid var(--ldu-border);
}
.avatar-lg {
    width: 64px; height: 64px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--ldu-accent), #d4570a);
    color: #fff; font-weight: 800; font-size: 1.6rem;
}

/* ---------- Layout: sidebar + main ---------- */
.ldu-layout { display: flex; min-height: 100vh; padding-top: 64px; }

.ldu-sidebar {
    background: var(--ldu-side);
    border-right: 1px solid var(--ldu-border);
    width: 260px; min-height: calc(100vh - 64px);
    display: flex; flex-direction: column; position: sticky; top: 64px;
    flex-shrink: 0;
    transition: transform .25s ease;
    z-index: 1020;
}
.ldu-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.sidebar-user { padding: 1rem; border-bottom: 1px solid var(--ldu-border); }
.sidebar-nav { overflow-y: auto; padding: .5rem; flex: 1 1 auto; }

.sidebar-section {
    font-size: .7rem; letter-spacing: .15em; text-transform: uppercase;
    color: var(--ldu-mute); padding: .9rem .9rem .35rem; margin-top: .25rem;
}
.ldu-sidebar .nav-link {
    color: #cfd3da; padding: .55rem .9rem; border-radius: .45rem;
    display: flex; align-items: center; gap: .65rem; font-size: .9rem;
    transition: background .15s ease, color .15s ease;
}
.ldu-sidebar .nav-link i { font-size: 1rem; color: var(--ldu-mute); width: 22px; text-align: center; }
.ldu-sidebar .nav-link:hover { background: rgba(255,255,255,.04); color: #fff; }
.ldu-sidebar .nav-link.active {
    background: rgba(255,107,0,.15);
    color: var(--ldu-accent2);
}
.ldu-sidebar .nav-link.active i { color: var(--ldu-accent); }

.kyc-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 6px; }

/* Mobile sidebar */
.ldu-sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1010;
    display: none;
}
@media (max-width: 991.98px) {
    .ldu-sidebar {
        position: fixed; left: 0; top: 64px; transform: translateX(-100%);
        min-height: calc(100vh - 64px); box-shadow: 4px 0 18px rgba(0,0,0,.3);
    }
    .ldu-layout.ldu-nav-open .ldu-sidebar { transform: translateX(0); }
    .ldu-layout.ldu-nav-open .ldu-sidebar-backdrop { display: block; }
}

/* ---------- Cards ---------- */
.ldu-card {
    background: var(--ldu-card); border: 1px solid var(--ldu-border);
    border-radius: .75rem;
}
.ldu-card .card-body { padding: 1.25rem; }
.card { background: var(--ldu-card); border-color: var(--ldu-border); color: var(--ldu-text); }
.card-title { color: var(--ldu-text); font-weight: 600; }

/* ---------- Stat blocks ---------- */
.stat-block {
    background: var(--ldu-card); border: 1px solid var(--ldu-border);
    border-radius: .75rem; padding: 1.25rem;
    display: flex; align-items: center; gap: 1rem;
    transition: transform .15s ease, border-color .15s ease;
}
.stat-block:hover { transform: translateY(-2px); border-color: var(--ldu-accent); }
.stat-block .stat-icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,107,0,.12); color: var(--ldu-accent);
    font-size: 1.5rem;
}
.stat-block .stat-label { font-size: .8rem; color: var(--ldu-mute); text-transform: uppercase; letter-spacing: .06em; }
.stat-block .stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }

/* ---------- Buttons ---------- */
.btn-warning { background: var(--ldu-accent); border-color: var(--ldu-accent); color: #fff; font-weight: 600; }
.btn-warning:hover { background: #d4570a; border-color: #d4570a; color: #fff; }
.btn-outline-light { border-color: #404750; color: #cfd3da; }
.btn-outline-light:hover { background: rgba(255,255,255,.06); color: #fff; }
.btn-light { background: #e9ecef; color: #14171c; }
.btn-light:hover { background: #d4d8dc; color: #14171c; }

/* ---------- Tables ---------- */
.table { color: var(--ldu-text); }
.table > :not(caption) > * > * { background-color: transparent; border-color: var(--ldu-border); color: var(--ldu-text); }
.table thead th { background: var(--ldu-card-2); border-color: var(--ldu-border); color: var(--ldu-mute); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.table-hover > tbody > tr:hover > * { background-color: rgba(255,107,0,.04); color: #fff; }

/* ---------- Forms ---------- */
.form-control, .form-select {
    background: var(--ldu-card-2); border-color: var(--ldu-border); color: var(--ldu-text);
}
.form-control:focus, .form-select:focus {
    background: var(--ldu-card-2); border-color: var(--ldu-accent);
    color: var(--ldu-text); box-shadow: 0 0 0 .15rem rgba(255,107,0,.2);
}
.form-control::placeholder { color: #6a6f79; }
.input-group-text { background: var(--ldu-card-2); border-color: var(--ldu-border); color: var(--ldu-mute); }
label, .form-label { color: #c9ced5; font-weight: 500; font-size: .9rem; }

/* ---------- Badges ---------- */
.badge.bg-secondary { background: #2a2f37 !important; color: #c9ced5; }

/* ---------- Map ---------- */
.ldu-map { width: 100%; height: 480px; border-radius: .75rem; overflow: hidden; border: 1px solid var(--ldu-border); }
.leaflet-popup-content { color: #14171c; }
.leaflet-popup-content-wrapper { background: #fff; }

/* ---------- Marketplace card ---------- */
.land-card {
    background: var(--ldu-card); border: 1px solid var(--ldu-border);
    border-radius: .75rem; overflow: hidden;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
    height: 100%; display: flex; flex-direction: column;
}
.land-card:hover {
    transform: translateY(-3px); border-color: var(--ldu-accent);
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.land-card .thumb {
    height: 180px; position: relative; overflow: hidden;
    background: linear-gradient(135deg, #1b1f25, #2a2f37);
    display: flex; align-items: center; justify-content: center;
}
.land-card .thumb .thumb-icon { font-size: 3rem; color: rgba(255,107,0,.35); }
.land-card .price-pill {
    position: absolute; top: .75rem; right: .75rem;
    background: rgba(0,0,0,.75); color: #fff;
    padding: .35rem .75rem; border-radius: 2rem; font-size: .85rem; font-weight: 700;
    backdrop-filter: blur(4px);
}
.land-card .body { padding: 1rem; flex: 1 1 auto; display: flex; flex-direction: column; }
.land-card .body .title { font-weight: 600; margin-bottom: .25rem; }
.land-card .body .loc { color: var(--ldu-mute); font-size: .85rem; }
.land-card .body .meta { display: flex; gap: 1rem; font-size: .8rem; color: var(--ldu-mute); margin-top: .5rem; }
.land-card .body .meta i { color: var(--ldu-accent); }

/* ---------- Title deed (digital certificate) ---------- */
.title-deed-card {
    background: linear-gradient(135deg, #fffdf7, #f5efde);
    color: #1a1a1a; border-radius: 8px; padding: 2rem;
    border: 2px solid #b08a4a; position: relative; overflow: hidden;
    box-shadow: 0 0 0 4px #fffdf7, 0 0 0 6px #b08a4a, 0 10px 30px rgba(0,0,0,.3);
}
.title-deed-card::before {
    content: ""; position: absolute; inset: 6px; border: 1px dashed #b08a4a; border-radius: 4px; pointer-events: none;
}
.title-deed-card .seal {
    position: absolute; bottom: 16px; right: 16px;
    width: 100px; height: 100px; border-radius: 50%;
    background: radial-gradient(circle, #FFB300, #b08a4a);
    display: flex; align-items: center; justify-content: center; text-align: center;
    color: #fff; font-weight: 800; font-size: .65rem; line-height: 1.1; padding: 8px;
    border: 3px dashed #fffdf7; box-shadow: 0 4px 12px rgba(0,0,0,.3); transform: rotate(-10deg);
}
.title-deed-card h2 { color: #6b3d05; font-weight: 700; }
.title-deed-card .field-label { font-size: .7rem; color: #8a6a30; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 2px; }
.title-deed-card .field-value { font-size: 1.05rem; font-weight: 600; color: #1a1a1a; margin-bottom: 1rem; }
.title-deed-card .qr-wrap { background: #fff; padding: 8px; border-radius: 4px; border: 1px solid #b08a4a; }

/* ---------- Misc ---------- */
.text-accent { color: var(--ldu-accent) !important; }
.bg-accent   { background: var(--ldu-accent) !important; color: #fff; }
.divider-x { height: 1px; background: var(--ldu-border); margin: 1.5rem 0; }
.toast { background: var(--ldu-card); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--ldu-mute); }
.empty-state i { font-size: 3rem; color: var(--ldu-border); margin-bottom: 1rem; display: block; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--ldu-border); }
.timeline-item { position: relative; padding-bottom: 1.25rem; }
.timeline-item::before {
    content: ""; position: absolute; left: -1.55rem; top: 4px;
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--ldu-accent); border: 2px solid var(--ldu-side);
}

/* ---------- Pulse dot for live ---------- */
.live-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--ldu-green); box-shadow: 0 0 0 0 rgba(0,200,83,.6);
    animation: ldu-pulse 1.6s infinite;
}
@keyframes ldu-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0,200,83,.6); }
    70%  { box-shadow: 0 0 0 8px rgba(0,200,83,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,200,83,0); }
}

/* ---------- Scrollbar ---------- */
.sidebar-nav::-webkit-scrollbar, .ldu-notif-menu::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb, .ldu-notif-menu::-webkit-scrollbar-thumb { background: #2a2f37; border-radius: 3px; }

/* ---------- Page header ---------- */
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; margin: 0; }
.page-header .breadcrumb { font-size: .85rem; }

/* ---------- Sticky footer fix ---------- */
html, body { min-height: 100%; }
body { display: flex; flex-direction: column; min-height: 100vh; }
.ldu-footer { margin-top: auto; border-top: 1px solid var(--ldu-border); background: var(--ldu-side); }
