/* ==========================================================================
   SKG DEEPAM — Design tokens (from SKG DEEPAM FONT & COLOR CODE STYLE .txt)
   ========================================================================== */
:root {
    --font-family: 'Poppins', sans-serif;

    --color-primary-start: #014BEF;
    --color-primary-end: #0032AA;
    --gradient-primary: linear-gradient(135deg, var(--color-primary-start), var(--color-primary-end));

    --color-booked: #2CAC47;
    --color-total-value-btn: #037837;
    --color-onhold: #FD8805;
    --color-cancel: #FF2529;

    --color-text: #1B1B1B;
    --color-text-lite: #525252;
    --color-inactive-btn: #D9D9D9;

    --sidebar-width: 260px;
    --header-height: 72px;
    --radius-card: 14px;
    --radius-btn: 8px;
    --shadow-card: 0 4px 18px rgba(1, 75, 239, 0.06);
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background: #F4F6FB;
    font-size: 14px;
}

a { text-decoration: none; }

/* ---------- Buttons ---------- */
.btn-primary-gradient {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    padding: 10px 20px;
    font-weight: 500;
    transition: opacity .15s ease;
}
.btn-primary-gradient:hover { opacity: .92; color: #fff; }

.btn-total-value {
    background: var(--color-total-value-btn);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    padding: 8px 16px;
    font-weight: 500;
}

.btn-inactive {
    background: var(--color-inactive-btn);
    color: var(--color-text-lite);
    border: none;
    border-radius: var(--radius-btn);
    padding: 8px 16px;
}

/* ---------- Status badges ---------- */
.badge-status { border-radius: 20px; padding: 4px 14px; font-weight: 500; font-size: 12px; display: inline-block; }
.badge-active, .badge-booked, .badge-success { background: rgba(44,172,71,.12); color: var(--color-booked); }
.badge-onhold, .badge-advance, .badge-pending, .badge-partially_cancelled { background: rgba(253,136,5,.12); color: var(--color-onhold); }
.badge-cancel, .badge-cancelled, .badge-inactive, .badge-failed { background: rgba(255,37,41,.12); color: var(--color-cancel); }
.badge-available { background: rgba(1,75,239,.10); color: var(--color-primary-start); }

/* ---------- Layout shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: #0B1437;
    color: #fff;
    flex-shrink: 0;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    display: flex;
    flex-direction: column;
    z-index: 40;
}
.sidebar .brand { padding: 22px 24px; font-weight: 700; font-size: 18px; letter-spacing: .5px; }
.sidebar .nav-link {
    color: rgba(255,255,255,.7);
    padding: 12px 24px;
    display: flex; align-items: center; gap: 12px;
    font-size: 14px;
    border-left: 3px solid transparent;
}
.sidebar .nav-link.active, .sidebar .nav-link:hover {
    color: #fff;
    background: rgba(1,75,239,.18);
    border-left-color: var(--color-primary-start);
}
.sidebar .support-box {
    margin: 16px; padding: 16px; border-radius: var(--radius-card);
    background: rgba(255,255,255,.06); text-align: center; font-size: 12px;
}

.main-content { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    height: var(--header-height);
    background: #fff;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 28px;
    box-shadow: 0 2px 10px rgba(0,0,0,.03);
    position: sticky; top: 0; z-index: 30;
}
.topbar .search-box input {
    border-radius: var(--radius-btn); border: 1px solid #E5E7EB; padding: 8px 14px 8px 36px; font-size: 13px;
}

.page-body { padding: 24px 28px; }

/* ---------- Cards ---------- */
.stat-card {
    background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card);
    padding: 20px; border: 1px solid #EEF1F8;
}
.stat-card .stat-value { font-size: 26px; font-weight: 700; }
.stat-card .stat-label { color: var(--color-text-lite); font-size: 12px; }

.card-panel { background: #fff; border-radius: var(--radius-card); box-shadow: var(--shadow-card); border: 1px solid #EEF1F8; }

/* ---------- Payment summary ---------- */
.lps-box { border: 1px solid rgba(0,0,0,.4); border-radius: var(--radius-btn); padding: 20px; }
.lps-col { text-align: center; }
.lps-caption { font-weight: 500; font-size: 11px; line-height: 130.5%; color: #2CAC47; text-align: center; }
.lps-label { font-weight: 500; font-size: 13.9915px; line-height: 130.5%; color: #1B1B1B; text-align: center; }
.lps-sublabel { font-weight: 500; font-size: 10.5px; line-height: 130.5%; color: #1B1B1B; text-align: center; }
.lps-account { flex: 1; display: flex; flex-direction: column; background: #fff; border-radius: 4px; padding: 8px 6px 10px; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.lps-account .lps-push { margin-top: auto; }
.lps-pill {
    box-sizing: border-box; width: 155px; max-width: 100%; height: 29px; margin: 0 auto;
    display: flex; align-items: center; justify-content: center;
    background: #D9D9D9; border: 1px solid transparent; border-radius: 4px;
    font-weight: 500; font-size: 13px; color: #1B1B1B;
}
.lps-pending { border-color: #FF2529; }
.lps-overall { background: #FF2529; border-color: #FF2529; color: #fff; }
.lps-total { background: var(--color-total-value-btn); border-color: var(--color-total-value-btn); color: #fff; }
.lps-vline { width: 0; height: 104px; border-left: 1px solid rgba(0,0,0,.4); }
.lps-progress { height: 8px; background: #D9D9D9; border-radius: 53.8136px; overflow: hidden; }
.lps-progress-bar { height: 100%; background: #2CAC47; border-radius: 53.8136px; }
.lps-percent { font-weight: 500; font-size: 13.9915px; color: #FE9F27; }
@media (max-width: 767px) {
    .lps-vline { display: none; }
}

/* ---------- Customer bookings ---------- */
.cb-money { font-size: 20px; }
.cb-mini-progress { height: 5px; display: inline-block; }
.cb-cancelled { opacity: .55; }
.cb-acc .accordion-item { overflow: hidden; border: 1px solid #EEF1F8; }
.cb-acc .accordion-item:not(:first-of-type) { border-top: 1px solid #EEF1F8; }
.cb-acc .accordion-button { background: #fff; font-size: 13.5px; color: var(--color-text); box-shadow: none; padding: 16px 20px; }
.cb-acc .accordion-button:not(.collapsed) { background: #F7F9FC; border-left: 3px solid var(--color-primary-start); }
.cb-acc .accordion-body { background: #F7F9FC; border-left: 3px solid var(--color-primary-start); }
.cb-acc .cb-dot::before { content: '·'; margin-right: 12px; color: #B0B7C3; }
.cb-proj-acc > .accordion-item { overflow: hidden; border: 1px solid #EEF1F8; }
.cb-proj-acc > .accordion-item:not(:first-of-type) { border-top: 1px solid #EEF1F8; }
.cb-proj-acc > .accordion-item > .accordion-header .accordion-button { background: #fff; color: var(--color-text); box-shadow: none; padding: 18px 20px; }
.cb-proj-acc > .accordion-item > .accordion-header .accordion-button:not(.collapsed) { background: rgba(1,75,239,.05); }
.cb-proj-acc > .accordion-item > .accordion-collapse > .accordion-body { background: rgba(1,75,239,.03); padding: 16px; }
.cb-proj-acc .cb-acc .accordion-item { box-shadow: none; }
.cb-proj-acc .cb-acc .accordion-item:last-child { margin-bottom: 0 !important; }
.cb-proj-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--gradient-primary); color: #fff; font-size: 18px; }
.cb-info { font-size: 13px; background: #fff; border-radius: var(--radius-btn); padding: 12px 8px; margin-left: 0; margin-right: 0; }
.cb-info span { display: block; color: var(--color-text-lite); font-size: 11.5px; }
@media print {
    .sidebar, .topbar, .cb-no-print { display: none !important; }
    .main-content { margin-left: 0; }
    .cb-acc .accordion-collapse, .cb-proj-acc .accordion-collapse { display: block !important; }
    .cb-acc .accordion-item { break-inside: avoid; }
}

/* ---------- Plot pricing form ---------- */
.pp-title { font-size: 18px; display: flex; align-items: center; gap: 10px; }
.pp-rupee { color: var(--color-booked); font-size: 20px; font-weight: 600; }
.pp-label { font-weight: 500; font-size: 14px; color: var(--color-text); }
.pp-label small, .pp-final-label small { font-size: 11px; font-weight: 500; margin-left: 2px; }
.pp-input { height: 48px; border-radius: 6px; border-color: #B2B2B2; }
.pp-prefix { position: relative; }
.pp-prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--color-text-lite); font-size: 13.5px; pointer-events: none; }
.pp-prefix > .pp-input { padding-left: 30px; }
.pp-eq-row { display: flex; align-items: flex-end; gap: 16px; }
.pp-eq-field { flex: 1; min-width: 0; }
.pp-eq-sign { height: 48px; display: flex; align-items: center; font-weight: 600; font-size: 16px; color: var(--color-text); }
.pp-calc {
    box-sizing: border-box; height: 48px; display: flex; align-items: center; padding: 0 16px;
    background: #2CAC47; border: 1px solid #B2B2B2; border-radius: 6px;
    color: #fff; font-weight: 500; font-size: 16px;
}
.pp-final-label { font-weight: 500; font-size: 17px; color: var(--color-text); }
.pp-final {
    width: 280px; max-width: 100%; height: 41px; display: flex; align-items: center; justify-content: center;
    background: #037837; border-radius: 4.2px;
    font-weight: 500; font-size: 23.68px; line-height: 36px; color: #F2EDE5;
}
@media (max-width: 575px) {
    .pp-eq-row { flex-direction: column; align-items: stretch; gap: 8px; }
    .pp-eq-sign { display: none; }
}

/* ---------- Add payment modal (scoped to #addPaymentModal; the full payments page is unaffected) ---------- */
#addPaymentModal .modal-content { border: none; border-radius: 10px; }
#addPaymentModal .modal-header { align-items: flex-start; padding: 18px 24px 12px; }
#addPaymentModal .modal-body { padding: 16px 24px; }
#addPaymentModal .modal-footer { border-top: none; gap: 16px; padding: 8px 24px 24px; }
#addPaymentModal .apm-title { font-size: 17px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin: 0; }
#addPaymentModal .apm-title i, #addPaymentModal .apm-section-title i { color: var(--color-primary-start); }
#addPaymentModal .apm-subtitle { font-size: 12px; color: var(--color-text-lite); margin-left: 26px; }
#addPaymentModal .apm-icon-btn {
    width: 32px; height: 32px; border-radius: 6px; border: 1px solid #B2B2B2; background: #fff;
    display: inline-flex; align-items: center; justify-content: center; color: var(--color-text);
}
#addPaymentModal .apm-close {
    width: 32px; height: 32px; border-radius: 6px; border: none; background: #FF2529; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
#addPaymentModal .apm-section-title { font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
#addPaymentModal .apm-indent { padding-left: 16px; }
#addPaymentModal .apm-divider { margin: 16px 0; border-color: #D9D9D9; opacity: 1; }
#addPaymentModal .form-label { font-size: 13px; font-weight: 500; margin-bottom: 6px; }
#addPaymentModal .form-control, #addPaymentModal .form-select { height: 38px; padding: 6px 12px; border-radius: 4px; border-color: #D0D5DD; font-size: 13px; }
#addPaymentModal textarea.form-control { height: auto; }
#addPaymentModal .apm-prefix { position: relative; }
#addPaymentModal .apm-prefix > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--color-text); pointer-events: none; }
#addPaymentModal .apm-prefix > .form-control { padding-left: 26px; }

#addPaymentModal .apm-radio { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; max-width: 240px; }
#addPaymentModal .apm-radio input { accent-color: var(--color-booked); margin-top: 4px; }
#addPaymentModal .apm-radio-label { display: block; font-size: 13px; font-weight: 500; }
#addPaymentModal .apm-radio small { display: block; font-size: 10.5px; color: var(--color-text-lite); line-height: 1.3; }

#addPaymentModal .apm-info { border: 1px solid #D0D5DD; border-radius: 6px; padding: 14px 16px; background: #FCFCFD; }
#addPaymentModal .apm-box {
    box-sizing: border-box; min-height: 34px; display: flex; align-items: center; padding: 4px 10px;
    background: #F2F2F2; border: 1px solid #D0D5DD; border-radius: 4px; font-size: 13px; color: var(--color-text);
}
#addPaymentModal input.apm-box { height: 34px; }
#addPaymentModal .apm-box-green { background: #fff; border-color: #2CAC47; }
#addPaymentModal .apm-box-red { background: #fff; border-color: #FF2529; }
#addPaymentModal .apm-warning { color: var(--color-cancel); font-size: 11px; margin-top: 4px; }

#addPaymentModal .apm-dropzone {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    min-height: 96px; margin: 0; padding: 10px; border: 1px dashed #2CAC47; border-radius: 4px; cursor: pointer;
    font-size: 11px; color: var(--color-text-lite); background: #fff; word-break: break-all;
}
#addPaymentModal .apm-dropzone i { font-size: 22px; color: #B2B2B2; line-height: 1; margin-bottom: 4px; }
#addPaymentModal .apm-dropzone small { font-size: 9.5px; color: #8A8A8A; margin-top: 2px; }
#addPaymentModal .apm-dz-link { color: var(--color-booked); }
#addPaymentModal .apm-dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
#addPaymentModal .apm-dropzone.is-dragover { background: rgba(44,172,71,.06); }
#addPaymentModal .apm-dropzone.has-file { border-style: solid; color: var(--color-text); }
#addPaymentModal .apm-dropzone.has-file i { color: var(--color-booked); }

#addPaymentModal .apm-btn { min-width: 180px; height: 44px; font-size: 18px; font-weight: 500; border-radius: 4px; }
#addPaymentModal .apm-btn-cancel { background: #D9D9D9; color: var(--color-text); border: none; }
#addPaymentModal .apm-btn-cancel:hover { background: #CFCFCF; }
@media (max-width: 575px) {
    #addPaymentModal .apm-btn { min-width: 0; flex: 1; font-size: 16px; }
    #addPaymentModal .apm-indent { padding-left: 0; }
}

/* ---------- Sticky side column (e.g. booking form summary + Save) ---------- */
@media (min-width: 992px) {
    .sticky-side {
        position: sticky; top: calc(var(--header-height) + 16px);
        max-height: calc(100vh - var(--header-height) - 32px); overflow-y: auto;
        padding-bottom: 4px; /* keep the button shadows from being clipped */
    }

    /* Side panel without its own scrollbar. JS sets --side-panel-top:
       - fits on screen  → header height + 16px (pinned under the top bar);
       - taller than it  → viewport height − panel height − 16px (negative), so the panel scrolls with the
         page until its bottom (where the buttons are) is in view, then stays pinned there. */
    .side-panel {
        position: sticky; padding-bottom: 4px;
        top: var(--side-panel-top, calc(var(--header-height) + 16px));
    }
}

/* ---------- Table action buttons ---------- */
.act-btn {
    width: 30px; height: 30px; padding: 0; border: none; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
    transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.act-btn:hover { transform: translateY(-1px); }
.act-view     { background: rgba(82,82,82,.10);  color: var(--color-text-lite); }
.act-view:hover     { background: var(--color-text-lite); color: #fff; }
.act-bookings { background: rgba(44,172,71,.14); color: var(--color-total-value-btn); }
.act-bookings:hover { background: var(--color-booked); color: #fff; }
.act-edit     { background: rgba(1,75,239,.10);  color: var(--color-primary-start); }
.act-edit:hover     { background: var(--color-primary-start); color: #fff; }
.act-print    { background: rgba(253,136,5,.12); color: var(--color-onhold); }
.act-print:hover    { background: var(--color-onhold); color: #fff; }
.act-delete   { background: rgba(255,37,41,.10); color: var(--color-cancel); }
.act-delete:hover   { background: var(--color-cancel); color: #fff; }

/* ---------- Tooltips ---------- */
.tooltip { --bs-tooltip-bg: #0B1437; --bs-tooltip-color: #fff; --bs-tooltip-font-size: 12px; --bs-tooltip-padding-x: 10px; --bs-tooltip-padding-y: 6px; --bs-tooltip-border-radius: 6px; --bs-tooltip-opacity: 1; font-family: var(--font-family); }
.tooltip .tooltip-inner { font-weight: 500; letter-spacing: .2px; box-shadow: 0 4px 14px rgba(11,20,55,.25); }

/* ---------- Tables ---------- */
.table-skg thead th {
    background: #F7F9FC; color: var(--color-text-lite); font-weight: 600; font-size: 12.5px;
    text-transform: uppercase; letter-spacing: .3px; border-bottom: none; padding: 14px 16px;
}
.table-skg tbody td { padding: 14px 16px; vertical-align: middle; border-bottom: 1px solid #F1F2F6; font-size: 13.5px; }
.table-skg tbody tr:hover { background: #FAFBFF; }

/* ---------- Forms ---------- */
.form-label { font-weight: 500; color: var(--color-text); font-size: 13px; }
.form-control, .form-select {
    border-radius: var(--radius-btn); border: 1px solid #E2E5ED; padding: 10px 12px; font-size: 13.5px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--color-primary-start); box-shadow: 0 0 0 3px rgba(1,75,239,.12);
}
.upload-dropzone {
    border: 1.5px dashed #C9D2E8; border-radius: var(--radius-card); padding: 24px; text-align: center;
    color: var(--color-text-lite); font-size: 12.5px; background: #FAFBFF;
}

/* ---------- Pagination ---------- */
.pagination .page-link { color: var(--color-primary-start); border-radius: 8px; margin: 0 2px; border: 1px solid #E5E7EB; }
.pagination .page-item.active .page-link { background: var(--gradient-primary); border-color: transparent; }

@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
}

/* ---------- Top-bar notification bell (payments due today) ---------- */
.notif-bell {
    position: relative; width: 38px; height: 38px; border: none; border-radius: 50%;
    background: #F4F6FB; color: var(--color-text); font-size: 18px;
    display: inline-flex; align-items: center; justify-content: center;
}
.notif-bell:hover, .notif-bell[aria-expanded="true"] { background: rgba(1,75,239,.10); color: var(--color-primary-start); }
.notif-badge {
    position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: var(--color-cancel); color: #fff; font-size: 10.5px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.notif-menu { width: 340px; max-width: calc(100vw - 32px); border: none; border-radius: var(--radius-card); box-shadow: 0 10px 30px rgba(11,20,55,.15); overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #F1F2F6; font-size: 13.5px; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { display: flex; gap: 10px; padding: 10px 16px; color: var(--color-text); text-decoration: none; font-size: 13px; border-bottom: 1px solid #F7F8FB; }
.notif-item:hover { background: #F7F9FF; color: var(--color-text); }
.notif-icon { flex: 0 0 32px; height: 32px; border-radius: 8px; background: rgba(253,136,5,.12); color: var(--color-onhold); display: inline-flex; align-items: center; justify-content: center; }
