:root {
    --prm-navy: #06204a;
    --prm-blue: #0b5ed7;
    --prm-sky: #dff2ff;
    --prm-soft: #f5f9ff;
    --prm-gold: #d8a23a;
    --prm-ink: #102033;
    --prm-muted: #6b7890;
    --prm-border: #e2eaf5;
    --prm-shadow: 0 14px 36px rgba(6, 32, 74, .08);
}

body {
    background: var(--prm-soft);
    color: var(--prm-ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

a { text-decoration: none; }
.text-navy { color: var(--prm-navy); }
.bg-navy { background: var(--prm-navy); }
.bg-sky { background: var(--prm-sky); }
.section-padding { padding: 90px 0; }
.place-items-center { place-items: center; }

h1,
.h1 {
    font-size: clamp(1.65rem, 2vw, 2.15rem);
    letter-spacing: -.02em;
}

h3,
.h3 {
    font-size: clamp(1.2rem, 1.45vw, 1.55rem);
}

h5,
.h5 {
    font-size: 1rem;
}

.navbar {
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(6, 32, 74, .08);
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--prm-blue), var(--prm-navy));
}

.hero {
    min-height: 520px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 70px;
    background: linear-gradient(110deg, var(--prm-navy), var(--prm-blue));
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -12% -34% auto;
    width: 560px;
    height: 560px;
    border-radius: 50%;
    background: rgba(223, 242, 255, .17);
    pointer-events: none;
    z-index: 2;
}

.hero-thumb {
    width: 100%;
    max-width: 420px;
    height: auto;
    border-radius: 18px;
    border: 3px solid rgba(255, 255, 255, .22);
    box-shadow: 0 18px 40px rgba(6, 32, 74, .3);
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.hero-card,
.premium-card,
.dashboard-card {
    border: 1px solid rgba(226, 234, 245, .95);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--prm-shadow);
}

.premium-card,
.dashboard-card {
    transition: transform .25s ease, box-shadow .25s ease;
}

.premium-card:hover,
.dashboard-card:hover,
.property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 44px rgba(6, 32, 74, .11);
}

.icon-box {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--prm-blue), #38bdf8);
}

.btn-primary {
    background: var(--prm-blue);
    border-color: var(--prm-blue);
    box-shadow: 0 10px 18px rgba(11, 94, 215, .18);
}

.btn-outline-primary {
    border-color: var(--prm-blue);
    color: var(--prm-blue);
}

.form-control,
.form-select {
    min-height: 42px;
    border-color: var(--prm-border);
    border-radius: 10px;
    font-size: .94rem;
}

.form-label {
    color: var(--prm-navy);
    font-size: .85rem;
    font-weight: 700;
    margin-bottom: .35rem;
}

.btn {
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 700;
    padding: .55rem .95rem;
}

.property-card {
    border: 0;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--prm-shadow);
    transition: transform .25s ease, box-shadow .25s ease;
}

.property-img {
    height: 210px;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: #065f46;
    background: #dcfce7;
}

.dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 248px 1fr;
}

.sidebar {
    background: linear-gradient(180deg, var(--portal-sidebar-start, var(--prm-navy)), var(--portal-sidebar-end, #041631));
    color: #fff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 20px;
}

.sidebar nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-color: rgba(255, 255, 255, .28) transparent;
    scrollbar-width: thin;
}

.sidebar nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .22);
    border-radius: 999px;
}

.sidebar nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .36);
}

.sidebar.theme-agent {
    --portal-primary: #0b5ed7;
    --portal-secondary: #38bdf8;
    --portal-sidebar-start: #06204a;
    --portal-sidebar-end: #041631;
}

.sidebar.theme-office {
    --portal-primary: #0f766e;
    --portal-secondary: #2dd4bf;
    --portal-sidebar-start: #064e3b;
    --portal-sidebar-end: #022c22;
}

.sidebar.theme-super-admin {
    --portal-primary: #7c3aed;
    --portal-secondary: #c084fc;
    --portal-sidebar-start: #4c1d95;
    --portal-sidebar-end: #2e1065;
}

.sidebar.theme-agent ~ .dashboard-main {
    --portal-primary: #0b5ed7;
    --portal-secondary: #38bdf8;
    --portal-soft: #eff6ff;
}

.sidebar.theme-office ~ .dashboard-main {
    --portal-primary: #0f766e;
    --portal-secondary: #2dd4bf;
    --portal-soft: #ecfdf5;
}

.sidebar.theme-super-admin ~ .dashboard-main {
    --portal-primary: #7c3aed;
    --portal-secondary: #c084fc;
    --portal-soft: #f5f3ff;
}

.sidebar .brand-mark {
    background: linear-gradient(135deg, var(--portal-primary, var(--prm-blue)), var(--portal-secondary, var(--prm-navy)));
}

.sidebar a {
    color: rgba(255, 255, 255, .78);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 11px;
    margin-bottom: 4px;
    font-size: .92rem;
}

.sidebar a:hover,
.sidebar a.active {
    color: #fff;
    background: rgba(255, 255, 255, .14);
}

.dashboard-main {
    padding: 24px;
}

.widget-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--portal-primary, var(--prm-navy)), var(--portal-secondary, var(--prm-blue)));
}

.dashboard-main .btn-primary {
    background: var(--portal-primary, var(--prm-blue));
    border-color: var(--portal-primary, var(--prm-blue));
    box-shadow: 0 10px 18px color-mix(in srgb, var(--portal-primary, var(--prm-blue)) 22%, transparent);
}

.dashboard-main .btn-outline-primary {
    border-color: var(--portal-primary, var(--prm-blue));
    color: var(--portal-primary, var(--prm-blue));
}

.dashboard-main .btn-outline-primary:hover {
    background: var(--portal-primary, var(--prm-blue));
    border-color: var(--portal-primary, var(--prm-blue));
    color: #fff;
}

.dashboard-main .text-primary {
    color: var(--portal-primary, var(--prm-blue)) !important;
}

.dashboard-main .progress-bar {
    background-color: var(--portal-primary, var(--prm-blue));
}

.dashboard-main .form-panel-header {
    background: linear-gradient(135deg, color-mix(in srgb, var(--portal-primary, var(--prm-blue)) 10%, #fff), var(--portal-soft, rgba(223, 242, 255, .45)));
}

.dashboard-main .form-panel-icon {
    color: var(--portal-primary, var(--prm-blue));
}

.dashboard-card.p-4 {
    padding: 1.2rem !important;
}

.premium-card.p-4,
.premium-card.p-md-5 {
    padding: 1.5rem !important;
}

.dashboard-card strong {
    display: inline-block;
    color: var(--prm-muted);
    font-size: .78rem;
    letter-spacing: .02em;
    margin-bottom: .15rem;
    text-transform: uppercase;
}

.auth-section {
    padding-top: 110px;
    padding-bottom: 56px;
}

.form-panel {
    background: linear-gradient(180deg, #fff, #f9fbff);
    border: 1px solid var(--prm-border);
    border-radius: 18px;
    box-shadow: 0 12px 28px rgba(6, 32, 74, .06);
    overflow: hidden;
}

.form-panel-header {
    align-items: center;
    background: linear-gradient(135deg, rgba(11, 94, 215, .08), rgba(223, 242, 255, .45));
    border-bottom: 1px solid var(--prm-border);
    display: flex;
    gap: 12px;
    padding: 1rem 1.2rem;
}

.form-panel-icon {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(11, 94, 215, .16);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(11, 94, 215, .1);
    color: var(--prm-blue);
    display: inline-flex;
    flex-shrink: 0;
    height: 38px;
    justify-content: center;
    width: 38px;
}

.form-panel-title {
    color: var(--prm-navy);
    font-size: .98rem;
    font-weight: 800;
    margin: 0;
}

.form-panel-subtitle {
    color: var(--prm-muted);
    font-size: .82rem;
    margin: 0;
}

.form-panel-body {
    padding: 1.2rem;
}

.professional-form .form-control,
.professional-form .form-select {
    background-color: #fbfdff;
}

.professional-form .form-control:focus,
.professional-form .form-select:focus {
    background-color: #fff;
    border-color: rgba(11, 94, 215, .55);
    box-shadow: 0 0 0 .18rem rgba(11, 94, 215, .1);
}

.professional-form .form-control[readonly] {
    background: #f3f7fc;
    color: var(--prm-navy);
    font-weight: 700;
}

.form-helper-card {
    background: #fff;
    border: 1px solid var(--prm-border);
    border-radius: 16px;
    padding: 1rem;
}

.upload-box {
    background: #fbfdff;
    border: 1px dashed #b8cbe3;
    border-radius: 14px;
    padding: .85rem;
}

.upload-box .form-control {
    background: #fff;
}

.form-actions-sticky {
    align-items: center;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--prm-border);
    border-radius: 16px;
    bottom: 16px;
    box-shadow: 0 16px 40px rgba(6, 32, 74, .12);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-bottom: 1rem;
    padding: .85rem;
    position: sticky;
    z-index: 10;
}

.chart-box {
    height: 260px;
    position: relative;
}

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.editor-toolbar button {
    background: #fff;
    border: 1px solid var(--prm-border);
    border-radius: 8px;
    color: var(--prm-navy);
    font-size: .85rem;
    font-weight: 700;
    padding: .4rem .65rem;
}

.deed-editor,
.deed-preview {
    background: #fff;
    border: 1px solid var(--prm-border);
    border-radius: 12px;
    min-height: 420px;
    padding: 1rem;
}

.deed-editor:focus {
    border-color: rgba(11, 94, 215, .55);
    box-shadow: 0 0 0 .18rem rgba(11, 94, 215, .1);
    outline: 0;
}

.deed-preview {
    max-height: 620px;
    overflow: auto;
}

.sticky-preview {
    position: sticky;
    top: 20px;
}

.chart-placeholder {
    min-height: 260px;
    border: 1px dashed #9bb9dc;
    border-radius: 22px;
    background: repeating-linear-gradient(45deg, #f8fbff, #f8fbff 14px, #eef6ff 14px, #eef6ff 28px);
}

/* Generated deed list */
.deed-stat-card {
    align-items: center;
    background: linear-gradient(135deg, #fff, #f4f9ff);
    border: 1px solid var(--prm-border);
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(6, 32, 74, .05);
    display: flex;
    gap: 14px;
    padding: 1rem 1.15rem;
}

.deed-stat-icon {
    align-items: center;
    background: linear-gradient(135deg, var(--prm-blue), #3b82f6);
    border-radius: 12px;
    color: #fff;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 1.1rem;
    height: 44px;
    justify-content: center;
    width: 44px;
}

.deed-stat-value {
    color: var(--prm-navy);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
}

.deed-stat-label {
    color: var(--prm-muted);
    font-size: .82rem;
}

.deed-list-panel .form-panel-body {
    background: #fff;
}

.deed-count-chip {
    background: #fff;
    border: 1px solid rgba(11, 94, 215, .2);
    border-radius: 999px;
    color: var(--prm-blue);
    font-size: .75rem;
    font-weight: 700;
    padding: .35rem .75rem;
    white-space: nowrap;
}

.deed-list-empty {
    padding: 3rem 1.5rem;
    text-align: center;
}

.deed-list-empty-icon {
    align-items: center;
    background: linear-gradient(135deg, rgba(11, 94, 215, .1), rgba(223, 242, 255, .8));
    border-radius: 50%;
    color: var(--prm-blue);
    display: inline-flex;
    font-size: 2rem;
    height: 72px;
    justify-content: center;
    margin-bottom: 1rem;
    width: 72px;
}

.deed-list-table-wrap {
    border-radius: 0 0 18px 18px;
}

.deed-list-table {
    --bs-table-bg: transparent;
    margin: 0;
}

.deed-list-table thead th {
    background: #f3f8fd;
    border-bottom: 1px solid var(--prm-border);
    color: var(--prm-navy);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    padding: .85rem 1rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.deed-list-table tbody td {
    border-bottom: 1px solid #edf2f8;
    padding: 1rem;
    vertical-align: middle;
}

.deed-list-table tbody tr:hover {
    background: #f8fbff;
}

.deed-list-table tbody tr:last-child td {
    border-bottom: none;
}

.deed-id-cell {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.deed-id-code {
    color: var(--prm-navy);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .82rem;
    font-weight: 700;
}

.deed-version-tag {
    color: var(--prm-muted);
    font-size: .72rem;
    font-weight: 600;
}

.deed-type-badge {
    background: rgba(11, 94, 215, .08);
    border: 1px solid rgba(11, 94, 215, .15);
    border-radius: 8px;
    color: var(--prm-navy);
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    padding: .28rem .55rem;
    white-space: nowrap;
}

.deed-lang-badge {
    border-radius: 999px;
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    padding: .28rem .6rem;
}

.deed-lang-english {
    background: #eef2f7;
    color: #334155;
}

.deed-lang-marathi {
    background: #e0f2fe;
    color: #0369a1;
}

.deed-lang-hindi {
    background: #fef3c7;
    color: #b45309;
}

.deed-meta-stack {
    display: flex;
    flex-direction: column;
    font-size: .86rem;
    gap: .15rem;
    max-width: 200px;
}

.deed-date {
    color: var(--prm-navy);
    display: block;
    font-size: .86rem;
    font-weight: 700;
}

.deed-time {
    display: block;
    font-size: .75rem;
}

.deed-row-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: flex-end;
}

.deed-action-btn {
    align-items: center;
    background: #fff;
    border: 1px solid var(--prm-border);
    border-radius: 10px;
    color: var(--prm-navy);
    display: inline-flex;
    font-size: .78rem;
    font-weight: 700;
    gap: .35rem;
    padding: .4rem .65rem;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.deed-action-btn:hover {
    background: #f4f9ff;
    border-color: rgba(11, 94, 215, .35);
    color: var(--prm-blue);
    transform: translateY(-1px);
}

.deed-action-pdf {
    border-color: #fecaca;
    color: #b91c1c;
}

.deed-action-pdf:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
}

.deed-action-download:hover {
    background: #eff6ff;
}

.deed-action-edit:hover {
    background: #f0fdf4;
    border-color: rgba(22, 163, 74, .35);
    color: #15803d;
}

.deed-action-delete {
    background: #fff;
    border-color: #fecaca;
    color: #b91c1c;
    cursor: pointer;
}

.deed-action-delete:hover {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
}

@media (max-width: 767.98px) {
    .deed-row-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .deed-action-btn {
        justify-content: center;
        width: 100%;
    }
}

.fade-up {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp .7s ease forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 991.98px) {
    .hero { min-height: auto; padding: 120px 0 70px; }

    .hero-thumb {
        max-width: 340px;
        margin-top: 1rem;
    }
    .dashboard-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; height: auto; }
}
