/* ==========================================================================
   DEVPRO Design System: Soft Frosted Glassmorphism & Tactile 3D UI
   Brand Accent: Warm Terracotta (#EA580C)
   Typography: Plus Jakarta Sans | Deep Charcoal (#0F172A) & Slate (#475569)
   ========================================================================== */

:root {
    --brand-primary: #EA580C;
    --brand-primary-hover: #C2410C;
    --brand-primary-light: #F97316;
    --brand-tint-bg: #FFF7ED;
    --brand-tint-badge: #FFEDD5;
    --brand-tint-border: #FED7AA;
    --brand-tint-text: #9A3412;

    --text-charcoal: #0F172A;
    --text-slate: #475569;
    --text-muted-soft: #64748B;

    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-bg-strong: rgba(255, 255, 255, 0.86);
    --glass-bg-subtle: rgba(255, 255, 255, 0.56);
    --glass-border: rgba(255, 255, 255, 0.60);
    --glass-inner-rim: rgba(255, 255, 255, 0.92);

    --ambient-shadow: 0 20px 45px -12px rgba(15, 23, 42, 0.08), 0 4px 16px -4px rgba(15, 23, 42, 0.04);
    --ambient-shadow-lg: 0 28px 60px -15px rgba(15, 23, 42, 0.12), 0 10px 26px -6px rgba(234, 88, 12, 0.10);
    --tactile-shadow: 0 10px 24px -6px rgba(234, 88, 12, 0.36), 0 4px 8px -2px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.38);

    /* Bootstrap 5.3 CSS Variable Overrides */
    --bs-primary: #EA580C;
    --bs-primary-rgb: 234, 88, 12;
    --bs-link-color: #EA580C;
    --bs-link-hover-color: #C2410C;
    --bs-body-color: #475569;
    --bs-heading-color: #0F172A;
}

/* Base & Background Environment */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-slate);
    background-color: #F6F1EB;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: -24px;
    z-index: -2;
    background:
        radial-gradient(circle at 12% 16%, rgba(255, 247, 237, 0.78) 0%, transparent 45%),
        radial-gradient(circle at 88% 18%, rgba(254, 215, 170, 0.32) 0%, transparent 42%),
        radial-gradient(circle at 50% 88%, rgba(226, 232, 240, 0.55) 0%, transparent 50%),
        url('../img/bg-interior-daylight.jpg') center center / cover no-repeat;
    filter: blur(5px) saturate(0.95) brightness(1.04);
    transform: scale(1.04);
    pointer-events: none;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(255, 252, 248, 0.36) 0%, rgba(248, 250, 252, 0.52) 100%);
    pointer-events: none;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.section-title {
    color: var(--text-charcoal);
    font-weight: 800;
    letter-spacing: -0.025em;
}

h1, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
.fw-extrabold {
    font-weight: 800 !important;
    letter-spacing: -0.035em;
    color: var(--text-charcoal);
}

.text-charcoal { color: var(--text-charcoal) !important; }
.text-slate { color: var(--text-slate) !important; }
.text-muted { color: var(--text-slate) !important; }
.text-primary { color: var(--brand-primary) !important; }
.bg-primary { background-color: var(--brand-primary) !important; }

.tabular-nums,
.kpi-value,
.price-value,
#kprHasilCicilan,
table td,
table th,
input[type="number"] {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* Soft Frosted Glass Cards (rounded-2xl to rounded-3xl) */
.card,
.glass-card {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid var(--glass-border) !important;
    border-radius: 1.5rem !important; /* rounded-3xl (24px) */
    box-shadow: var(--ambient-shadow), inset 0 1px 0 var(--glass-inner-rim) !important;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background 0.25s ease;
}

.card-interactive:hover,
.kpi-card:hover,
.feature-card:hover,
.tipe-card:hover {
    transform: translateY(-4px);
    background: var(--glass-bg-strong) !important;
    box-shadow: var(--ambient-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
}

.card-header {
    background: rgba(255, 255, 255, 0.48) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.65) !important;
    border-top-left-radius: 1.5rem !important;
    border-top-right-radius: 1.5rem !important;
    color: var(--text-charcoal);
    font-weight: 700;
}

.glass-inset {
    background: var(--glass-bg-subtle) !important;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 1rem; /* rounded-2xl (16px) */
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03), 0 2px 8px rgba(15, 23, 42, 0.02);
}

/* Frosted Glass Navbar */
.glass-navbar {
    background: rgba(255, 255, 255, 0.74) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 10px 30px -12px rgba(15, 23, 42, 0.08), inset 0 -1px 0 rgba(255, 255, 255, 0.6);
    z-index: 1030;
}

.glass-navbar .navbar-brand {
    color: var(--text-charcoal) !important;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.glass-navbar .nav-link {
    color: var(--text-slate) !important;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.48rem 0.9rem !important;
    border-radius: 9999px;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.glass-navbar .btn {
    white-space: nowrap;
}

.glass-navbar .nav-link:hover {
    color: var(--brand-primary) !important;
    background: var(--brand-tint-bg);
}

.glass-navbar .nav-link.active {
    color: var(--brand-primary) !important;
    background: var(--brand-tint-badge);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 3px 10px rgba(234, 88, 12, 0.12);
}

.glass-navbar .dropdown-menu {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 1rem;
    box-shadow: var(--ambient-shadow-lg);
}

/* Tactile 3D Buttons */
.btn {
    border-radius: 1rem;
    font-weight: 600;
    padding: 0.6rem 1.35rem;
    letter-spacing: -0.01em;
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-sm {
    padding: 0.42rem 0.95rem;
    border-radius: 0.75rem;
}

.btn-primary,
.btn-terracotta {
    background: linear-gradient(180deg, #F97316 0%, #EA580C 100%) !important;
    border: 1px solid #EA580C !important;
    color: #ffffff !important;
    box-shadow: var(--tactile-shadow);
}

.btn-primary:hover,
.btn-terracotta:hover {
    background: linear-gradient(180deg, #EA580C 0%, #C2410C 100%) !important;
    border-color: #C2410C !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -6px rgba(234, 88, 12, 0.44), 0 6px 12px -2px rgba(15, 23, 42, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-primary:active,
.btn-terracotta:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px -2px rgba(234, 88, 12, 0.35), inset 0 2px 4px rgba(124, 45, 18, 0.25);
}

.btn-outline-primary {
    color: var(--brand-primary) !important;
    border: 1px solid rgba(234, 88, 12, 0.32) !important;
    background: rgba(255, 247, 237, 0.72) !important;
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 3px 10px -3px rgba(234, 88, 12, 0.1);
}

.btn-outline-primary:hover {
    background: linear-gradient(180deg, #F97316 0%, #EA580C 100%) !important;
    color: #ffffff !important;
    border-color: #EA580C !important;
    transform: translateY(-1px);
    box-shadow: var(--tactile-shadow);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.78) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.85) !important;
    color: var(--text-charcoal) !important;
    box-shadow: 0 8px 20px -6px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--brand-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px -6px rgba(15, 23, 42, 0.14), inset 0 1px 0 #ffffff;
}

.btn-tactile-success {
    background: linear-gradient(180deg, #10B981 0%, #059669 100%) !important;
    border: 1px solid #059669 !important;
    color: #ffffff !important;
    box-shadow: 0 10px 22px -6px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-tactile-success:hover {
    background: linear-gradient(180deg, #059669 0%, #047857 100%) !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}

/* Badges & Pastel Terracotta Tints */
.badge-terracotta-soft {
    background: var(--brand-tint-badge) !important;
    color: var(--brand-tint-text) !important;
    border: 1px solid var(--brand-tint-border);
    font-weight: 700;
    letter-spacing: 0.03em;
}

.icon-badge-terracotta {
    background: var(--brand-tint-badge);
    color: var(--brand-primary);
    border: 1px solid var(--brand-tint-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 6px 14px -4px rgba(234, 88, 12, 0.15);
}

/* Semantic Status Colors (Distinct from Terracotta #EA580C Brand Accent) */
.badge-status-tersedia,
.status-tersedia {
    background: linear-gradient(180deg, #10B981 0%, #059669 100%) !important;
    color: #ffffff !important;
}

.badge-status-booking,
.status-booking {
    background: linear-gradient(180deg, #FBBF24 0%, #D97706 100%) !important;
    color: #ffffff !important;
}

.badge-status-pembangunan,
.status-pembangunan {
    background: linear-gradient(180deg, #0EA5E9 0%, #0284C7 100%) !important;
    color: #ffffff !important;
}

.badge-status-terjual,
.status-terjual {
    background: linear-gradient(180deg, #F43F5E 0%, #E11D48 100%) !important;
    color: #ffffff !important;
}

/* Tactile 3D Site Plan Canvas & Kavling Nodes */
.siteplan-canvas-glass {
    background-color: rgba(255, 255, 255, 0.52) !important;
    backdrop-filter: blur(12px);
    border: 1.5px dashed rgba(15, 23, 42, 0.18) !important;
    border-radius: 1.25rem !important;
    background-image:
        linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.05) 1px, transparent 1px) !important;
    background-size: 32px 32px !important;
    box-shadow: inset 0 2px 12px rgba(15, 23, 42, 0.04) !important;
}

.siteplan-road {
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.06);
    color: var(--text-slate) !important;
    border-radius: 0.65rem;
}

.kavling-box,
.kavling-node {
    border-radius: 0.9rem !important;
    border: 1.5px solid rgba(255, 255, 255, 0.82) !important;
    box-shadow:
        0 10px 20px -5px rgba(15, 23, 42, 0.22),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.45),
        inset 0 -3px 0 rgba(0, 0, 0, 0.16) !important;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease !important;
}

.kavling-box:hover,
.kavling-node:hover {
    transform: translateY(-2px) scale(1.07);
    z-index: 25;
    box-shadow:
        0 16px 28px -6px rgba(15, 23, 42, 0.28),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.55),
        inset 0 -3px 0 rgba(0, 0, 0, 0.16) !important;
}

/* Form Controls */
.form-control,
.form-select,
.input-group-text {
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid rgba(15, 23, 42, 0.10) !important;
    border-radius: 0.9rem;
    padding: 0.68rem 1rem;
    color: var(--text-charcoal) !important;
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.03);
    transition: all 0.2s ease;
}

.form-control::placeholder {
    color: #94A3B8;
}

.form-control:focus,
.form-select:focus {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.14), inset 0 1px 2px rgba(15, 23, 42, 0.02) !important;
}

.form-label {
    color: var(--text-charcoal);
    font-weight: 600;
    font-size: 0.875rem;
}

/* Glass Tables */
.table-glass {
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(15, 23, 42, 0.07);
    margin-bottom: 0;
}

.table-glass thead th {
    background: rgba(255, 247, 237, 0.78) !important;
    color: var(--text-charcoal) !important;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(234, 88, 12, 0.16) !important;
    border-top: none !important;
    padding: 0.9rem 0.85rem;
}

.table-glass thead th:first-child { border-top-left-radius: 0.85rem; }
.table-glass thead th:last-child { border-top-right-radius: 0.85rem; }

.table-glass tbody td {
    background: transparent !important;
    color: var(--text-charcoal);
    padding: 0.95rem 0.85rem;
    border-color: rgba(15, 23, 42, 0.06);
}

.table-glass tbody tr:hover td {
    background: rgba(255, 255, 255, 0.58) !important;
}

/* Progress Bar Terracotta */
.progress-glass {
    background: rgba(15, 23, 42, 0.08);
    border-radius: 9999px;
    padding: 3px;
    height: 18px;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.1);
}

.progress-bar-terracotta {
    background: linear-gradient(90deg, #F97316 0%, #EA580C 100%) !important;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
}

/* Glass Modals & Alerts */
.modal-content {
    background: rgba(255, 255, 255, 0.88) !important;
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.82) !important;
    border-radius: 1.5rem !important;
    box-shadow: 0 32px 64px -16px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.95) !important;
}

.modal-header.modal-header-terracotta {
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    border-bottom: 1px solid #FED7AA;
    color: var(--text-charcoal);
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
}

.modal-footer.modal-footer-glass {
    background: rgba(248, 250, 252, 0.65);
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    border-bottom-left-radius: 1.5rem;
    border-bottom-right-radius: 1.5rem;
}

.alert-glass {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 1rem;
    box-shadow: var(--ambient-shadow);
    color: var(--text-charcoal);
}

/* Footer */
.glass-footer {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.72) !important;
    color: var(--text-slate);
}
