/* MahaCivil — Professional responsive website */
:root {
    --maha-blue: #0a2540;
    --maha-blue-mid: #123a5c;
    --maha-blue-light: #1a4d78;
    --maha-orange: #e8940a;
    --maha-orange-light: #f5b731;
    --maha-bg: #f6f8fb;
    --maha-bg-alt: #eef2f7;
    --sector-red: #c62828;
    --white: #ffffff;
    --border: #dde3ec;
    --border-light: #e8edf3;
    --converter-bg: #f0f4fa;
    --table-header: #f1f5f9;
    --text: #0f172a;
    --text-muted: #64748b;
    --header-height: 68px;
    --container: 1180px;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.05);
    --shadow: 0 4px 20px rgba(10, 37, 64, 0.08);
    --shadow-lg: 0 12px 40px rgba(10, 37, 64, 0.12);
    --shadow-hover: 0 8px 30px rgba(10, 37, 64, 0.14);
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Plus Jakarta Sans", "Inter", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
    overflow-x: hidden;
    max-width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.nav-open,
body.dialog-open {
    overflow: hidden;
}

img, svg {
    display: block;
    max-width: 100%;
}

.hidden {
    display: none !important;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    min-width: 0;
}

/* ── Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(10, 37, 64, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: var(--header-height);
}

.site-logo {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    letter-spacing: -0.03em;
    flex-shrink: 0;
}

.site-logo span {
    color: var(--maha-orange-light);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.nav-link {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
}

.nav-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    color: var(--maha-orange-light);
    background: rgba(232, 148, 10, 0.12);
}

.header-lang {
    display: flex;
    gap: 0;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.header-account {
    position: relative;
}

.account-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
    padding: 0;
}

.account-btn:hover,
.account-btn[aria-expanded="true"] {
    background: rgba(232, 148, 10, 0.2);
    border-color: rgba(232, 148, 10, 0.45);
    color: var(--maha-orange-light);
}

.account-icon {
    width: 22px;
    height: 22px;
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    padding: 14px;
    z-index: 300;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.account-dropdown-label {
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.account-dropdown-mobile {
    margin: 0 0 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--maha-blue);
}

.account-logout-btn {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(198, 40, 40, 0.08);
    color: #c62828;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background var(--transition);
}

.account-logout-btn:hover {
    background: rgba(198, 40, 40, 0.14);
}

.lang-pill {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 6px;
    transition: background var(--transition), color var(--transition);
    min-width: 40px;
    white-space: nowrap;
}

.lang-pill.active {
    background: var(--maha-orange);
    color: var(--maha-blue);
}

.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px 12px;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
}

/* ── Hero ── */
.hero {
    position: relative;
    background: linear-gradient(145deg, var(--maha-blue) 0%, var(--maha-blue-mid) 45%, #1a5080 100%);
    color: var(--white);
    padding: 88px 0 100px;
    overflow: hidden;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(232, 148, 10, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: auto, auto, 48px 48px, 48px 48px;
    pointer-events: none;
}

.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 56px;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(232, 148, 10, 0.15);
    color: var(--maha-orange-light);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 7px 16px;
    border-radius: 100px;
    border: 1px solid rgba(232, 148, 10, 0.25);
    margin-bottom: 22px;
}

.hero-text h1 {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 4.5vw, 2.85rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 32px;
    max-width: 520px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.hero-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-stat strong {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--maha-orange-light);
    line-height: 1.2;
}

.hero-stat span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.feature-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    backdrop-filter: blur(8px);
    transition: transform var(--transition), background var(--transition), border-color var(--transition);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
}

.feature-icon {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
}

.feature-card h3 {
    color: var(--maha-orange-light);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.feature-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    line-height: 1.5;
}

.feature-card.accent {
    background: rgba(232, 148, 10, 0.12);
    border-color: rgba(232, 148, 10, 0.28);
}

/* ── Sections ── */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--maha-bg);
}

.section-head {
    margin-bottom: 44px;
    max-width: 640px;
}

.section-head-center {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(1.65rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--maha-blue);
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    line-height: 1.2;
}

.section-head p {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.65;
}

.section-tag {
    display: inline-block;
    color: var(--maha-orange);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.section-head-center .section-tag::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--maha-orange), transparent);
    border-radius: 2px;
    margin: 10px auto 0;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 26px;
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition), opacity var(--transition);
    min-height: 48px;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--maha-orange) 0%, var(--maha-orange-light) 100%);
    color: var(--maha-blue);
    box-shadow: 0 4px 14px rgba(232, 148, 10, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(232, 148, 10, 0.45);
}

.btn-secondary {
    background: var(--maha-blue);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(10, 37, 64, 0.25);
}

.btn-secondary:hover {
    background: var(--maha-blue-mid);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: none;
}

/* ── Cards ── */
.card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px;
    transition: box-shadow var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
}

/* ── Calculator ── */
.calc-tabs {
    display: inline-flex;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.calc-tab {
    padding: 10px 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition), box-shadow var(--transition);
    min-height: 44px;
}

.calc-tab.active {
    background: var(--maha-blue);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.calc-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

.converter-box {
    background: linear-gradient(135deg, var(--converter-bg) 0%, #e8eef6 100%);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--maha-orange);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 24px;
}

.converter-box h3 {
    color: var(--maha-blue);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.converter-result {
    margin-top: 10px;
    color: var(--maha-blue);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    width: 100%;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    color: var(--maha-blue);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.01em;
}

.form-row {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    overflow: hidden;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-row:focus-within {
    border-color: var(--maha-orange);
    box-shadow: 0 0 0 3px rgba(232, 148, 10, 0.15);
}

.form-input {
    flex: 1;
    min-width: 0;
    width: 100%;
    border: none;
    padding: 13px 15px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    min-width: 0;
    background: transparent;
    color: var(--text);
}

.form-group > .form-input {
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 13px 15px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group > .form-input:focus {
    border-color: var(--maha-orange);
    box-shadow: 0 0 0 3px rgba(232, 148, 10, 0.15);
}

.stepper-group {
    display: flex;
    flex-direction: column;
    border-left: 1.5px solid var(--border);
}

.step-btn {
    flex: 1;
    border: none;
    background: var(--maha-bg);
    color: var(--maha-blue);
    cursor: pointer;
    padding: 0 16px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    transition: background var(--transition);
    min-width: 44px;
}

.step-btn:hover {
    background: var(--converter-bg);
}

.field-error {
    color: var(--sector-red);
    font-size: 0.8rem;
    font-weight: 500;
}

.built-up-fields {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.form-actions .btn {
    flex: 1;
}

.result-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 32px 24px;
    background: var(--maha-bg);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
}

.calc-result .receipt:not(.hidden) ~ .result-placeholder,
.calc-result:has(.receipt:not(.hidden)) .result-placeholder {
    display: none;
}

/* ── Receipt ── */
.receipt {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.receipt-header {
    background: linear-gradient(135deg, var(--maha-blue) 0%, var(--maha-blue-mid) 100%);
    color: var(--white);
    padding: 18px 22px;
}

.receipt-header .brand {
    color: var(--maha-orange-light);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.receipt-header h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin-top: 4px;
    font-weight: 700;
}

.receipt-body {
    padding: 18px 22px;
}

.receipt-body h5 {
    color: var(--maha-blue);
    margin-bottom: 8px;
    font-size: 0.92rem;
    font-weight: 700;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 5px 0;
    font-size: 0.85rem;
}

.summary-row span:first-child {
    font-weight: 600;
    color: var(--maha-blue);
}

.charges-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    margin-top: 8px;
}

.charges-table th {
    background: var(--table-header);
    color: var(--maha-blue);
    padding: 10px 8px;
    font-weight: 700;
    border: 1px solid var(--border);
}

.charges-table td {
    padding: 10px 8px;
    border: 1px solid var(--border);
    text-align: center;
    color: var(--text);
}

.charges-table td.charge-name {
    text-align: left;
}

.receipt-total {
    display: flex;
    justify-content: space-between;
    background: var(--maha-blue);
    color: var(--white);
    padding: 14px 18px;
    margin-top: 12px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
}

/* ── ASR Rates ── */
.asr-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.asr-form-grid {
    margin-bottom: 8px;
    grid-template-columns: 1fr 1fr;
}

.asr-fixed-field {
    background: var(--maha-bg) !important;
    color: var(--maha-blue);
    font-weight: 600;
    cursor: not-allowed;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius);
    width: 100%;
    padding: 13px 15px;
}

.form-select {
    width: 100%;
    padding: 13px 15px;
    font-size: 1rem;
    font-family: inherit;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    min-height: 48px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-select:focus {
    border-color: var(--maha-orange);
    box-shadow: 0 0 0 3px rgba(232, 148, 10, 0.15);
}

.form-select:disabled {
    background-color: var(--maha-bg);
    color: var(--text-muted);
    cursor: not-allowed;
}

.asr-status {
    margin-top: 14px;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--maha-bg);
}

.asr-status.asr-error {
    color: var(--sector-red);
    background: #fef2f2;
}

.asr-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    text-align: center;
    color: var(--text-muted);
    padding: 32px 24px;
    background: var(--white);
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
}

.asr-form-actions {
    margin-top: 0;
    flex-wrap: wrap;
}

.asr-form-actions .btn {
    flex: 1;
    min-width: 140px;
}

.asr-results-panel:has(.asr-results:not(.hidden)) .asr-placeholder {
    display: none;
}

.asr-portal-panel {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-width: 100%;
}

.asr-portal-title {
    background: linear-gradient(135deg, #5e35b1, #7e57c2);
    color: var(--white);
    text-align: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    padding: 16px;
    letter-spacing: 0.02em;
}

.asr-selection-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 20px 24px 12px;
    background: var(--maha-bg);
    border-bottom: 1px solid var(--border-light);
}

.asr-selection-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.asr-selection-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.asr-selection-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--maha-blue);
}

.asr-vibhag-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px 16px;
    background: var(--maha-bg);
    border-bottom: 1px solid var(--border-light);
}

.asr-vibhag-value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--maha-blue);
}

.asr-table-wrap {
    overflow-x: auto;
    padding: 0;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.asr-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.asr-table-gov thead th {
    background: #6a1b9a;
    color: var(--white);
    padding: 12px 14px;
    text-align: left;
    font-weight: 700;
    border: 1px solid #5e157f;
    white-space: nowrap;
    font-size: 0.82rem;
}

.asr-table-gov td {
    padding: 11px 14px;
    border: 1px solid var(--border-light);
    color: var(--text);
    vertical-align: top;
}

.asr-table-gov tbody tr:nth-child(even) {
    background: var(--maha-bg);
}

.asr-table-gov tbody tr:hover {
    background: #f3e5f5;
}

.asr-type-cell {
    font-weight: 500;
    min-width: 140px;
    max-width: 200px;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

.asr-range-cell {
    white-space: nowrap;
    min-width: 72px;
}

.asr-rate-cell {
    font-weight: 700;
    color: var(--maha-blue);
    white-space: nowrap;
    min-width: 88px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    padding-right: 16px !important;
}

.asr-footnote {
    padding: 12px 24px 18px;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0;
}

.asr-no-data {
    padding: 24px;
}

/* ── DP Sectors ── */
.sector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.sector-btn {
    padding: 22px 16px;
    background: var(--white);
    color: var(--sector-red);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition), box-shadow var(--transition);
    text-align: center;
    min-height: 72px;
    box-shadow: var(--shadow-sm);
}

.sector-btn:hover {
    background: var(--sector-red);
    color: var(--white);
    border-color: var(--sector-red);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(198, 40, 40, 0.28);
}

/* ── About ── */
/* start of new about/contact/footer/dialog block */
.ab-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ab-provide,
.ab-dev {
    padding: 32px;
}

.ab-heading {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--maha-blue);
    margin-bottom: 10px;
}

.ab-sub {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

.ab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ab-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--maha-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.5;
}

.ab-item-full {
    grid-column: 1 / -1;
}

.ab-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--maha-orange);
    margin-top: 5px;
}

.ab-dev {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.ab-dev .ab-sub {
    margin-bottom: 0;
}

.ab-intro,
.ab-why,
.ab-digital {
    padding: 32px;
}

.ab-lead {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 16px;
}

.ab-lead:last-of-type {
    margin-bottom: 0;
}

.ab-goal {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    font-weight: 600;
    color: var(--maha-blue);
    font-size: 0.95rem;
    line-height: 1.65;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.why-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--maha-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text);
}

.why-check {
    color: var(--maha-orange);
    font-weight: 700;
    flex-shrink: 0;
}

.contact-firm-name {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--maha-blue);
    margin-top: 4px;
}

/* ── Services grid ── */
.svc-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.svc-card {
    padding: 28px;
    transition: transform var(--transition), box-shadow var(--transition);
}

.svc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.svc-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 14px;
    line-height: 1;
}

.svc-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--maha-blue);
    margin-bottom: 10px;
    line-height: 1.35;
}

.svc-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ── Contact ── */
.ct-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ct-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 28px 24px;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.ct-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--maha-orange);
}

.ct-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: rgba(10, 37, 64, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--maha-blue);
    flex-shrink: 0;
}

.ct-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0;
}

.ct-value {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--maha-blue);
    margin: 0;
    word-break: break-all;
}

.ct-card-static {
    cursor: default;
}

.ct-card-static:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: var(--border-light);
}

.ct-icon-address {
    background: linear-gradient(135deg, #6a1b9a 0%, #8e24aa 100%);
    color: var(--white);
}

.ct-value-multiline {
    font-size: 0.88rem;
    line-height: 1.55;
    font-weight: 500;
    word-break: normal;
}

/* ── Footer ── */
.site-footer {
    background: var(--maha-blue);
    color: rgba(255, 255, 255, 0.7);
    padding: 56px 0 0;
}

.ft-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.ft-logo {
    display: block;
    font-family: var(--font-display);
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.ft-logo span {
    color: var(--maha-orange-light);
}

.ft-brand p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
    max-width: 260px;
    margin: 0;
}

.ft-col-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--maha-orange-light);
    margin-bottom: 16px;
}

.ft-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ft-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}

.ft-nav a:hover {
    color: var(--white);
}

.ft-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ft-contact a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
    word-break: break-all;
}

.ft-contact a:hover {
    color: var(--maha-orange-light);
}

.ft-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 22px 0 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.45);
}

.developed-by-btn {
    background: none;
    border: none;
    color: var(--maha-orange-light);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition);
}

.developed-by-btn:hover {
    color: var(--white);
}

/* ── Developer modal ── */
.dev-modal {
    position: fixed;
    inset: 0;
    z-index: 650;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dev-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 37, 64, 0.55);
    backdrop-filter: blur(4px);
}

.dev-modal-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    animation: authSlideIn 0.25s ease;
}

.dev-modal-header {
    background: linear-gradient(135deg, var(--maha-blue) 0%, var(--maha-blue-light) 100%);
    color: var(--white);
    padding: 20px 24px;
    position: relative;
}

.dev-modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 800;
    padding-right: 40px;
}

.dev-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dev-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dev-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dev-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--maha-blue) 0%, var(--maha-blue-light) 100%);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dev-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--maha-blue);
}

.dev-role {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.dev-bio {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.dev-contacts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dev-contact-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    background: var(--maha-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    text-decoration: none;
    transition: border-color var(--transition), background var(--transition);
}

.dev-contact-row:hover {
    border-color: var(--maha-orange);
    background: #fffaf0;
}

.dev-contact-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.dev-contact-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--maha-blue);
}

.dev-services-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--maha-blue);
    margin-bottom: 10px;
}

.dev-services-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dev-services-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
}

.dev-services-list li::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--maha-orange);
    flex-shrink: 0;
}

.dev-modal-footer {
    padding: 0 24px 24px;
}

/* ── Map modal ── */
.map-modal {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: var(--white);
    display: flex;
    flex-direction: column;
}

.map-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--sector-red);
    color: var(--white);
    padding: 16px 20px;
    flex-shrink: 0;
}

.map-modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
}

.map-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 6px 12px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Crop Earth Engine top bar (Developed by, search, white toolbar) inside iframe */
.map-frame-wrap {
    flex: 1;
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #e5e3df;
}

#map-frame {
    position: absolute;
    top: -112px;
    left: 0;
    width: 100%;
    height: calc(100% + 112px);
    border: none;
}

@media (max-width: 768px) {
    #map-frame {
        top: -96px;
        height: calc(100% + 96px);
    }
}

/* ── Auth modal (login on calculate) ── */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 37, 64, 0.55);
    backdrop-filter: blur(4px);
}

.auth-modal-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: authSlideIn 0.25s ease;
}

@keyframes authSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-modal-header {
    background: linear-gradient(135deg, var(--maha-blue) 0%, var(--maha-blue-light) 100%);
    color: var(--white);
    padding: 28px 24px 24px;
    text-align: center;
    position: relative;
}

.auth-modal-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 14px;
}

.auth-modal-header h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.auth-modal-header p {
    font-size: 0.9rem;
    opacity: 0.85;
}

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--white);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-modal-body .form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    display: block;
}

.auth-modal-body .form-input {
    width: 100%;
}

.auth-error {
    color: var(--sector-red);
    font-size: 0.85rem;
    line-height: 1.4;
}

.auth-modal-footer {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-toggle-btn {
    background: none;
    border: none;
    color: var(--maha-blue-light);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 8px;
    text-align: center;
}

.auth-toggle-btn:hover {
    text-decoration: underline;
}

/* ── Print ── */
.print-only {
    display: none;
}

@media print {
    body * {
        visibility: hidden;
    }

    #print-area, #print-area * {
        visibility: visible;
    }

    #print-area {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .hero-cards {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 12px;
    }

    .feature-card:hover {
        transform: none;
    }
}

@media (max-width: 900px) {
    .calc-layout {
        grid-template-columns: 1fr;
    }

    .asr-selection-grid {
        grid-template-columns: 1fr;
    }

    .ab-grid {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .svc-grid {
        grid-template-columns: 1fr;
    }

    .ab-item-full {
        grid-column: auto;
    }

    .ab-dev {
        flex-direction: column;
        align-items: stretch;
    }

    .ct-wrap {
        grid-template-columns: 1fr;
    }

    .ft-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ft-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .container {
        padding: 0 16px;
        width: 100%;
    }

    .calc-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .calc-form,
    .calc-result,
    .asr-layout,
    .asr-form-card,
    .asr-results-panel {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .asr-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .converter-box {
        padding: 14px 16px;
    }

    .step-btn {
        padding: 0 12px;
        min-width: 40px;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .site-nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--maha-blue);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
        overflow-y: auto;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .site-nav.open {
        display: flex;
    }

    .nav-link {
        width: 100%;
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: var(--radius);
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .header-inner {
        flex-wrap: nowrap;
        position: relative;
        gap: 12px;
    }

    .header-actions {
        margin-left: auto;
        gap: 8px;
    }

    .account-btn {
        width: 36px;
        height: 36px;
    }

    .account-icon {
        width: 20px;
        height: 20px;
    }

    .header-lang {
        order: 0;
        margin-left: 0;
        margin-right: 0;
    }

    .hero {
        padding: 56px 0 72px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        gap: 24px;
    }

    .section {
        padding: 56px 0;
    }

    .section-head {
        margin-bottom: 32px;
    }

    .calc-tabs {
        display: flex;
        width: 100%;
    }

    .calc-tab {
        flex: 1;
        padding: 12px 16px;
        text-align: center;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .asr-form-grid {
        grid-template-columns: 1fr;
    }

    .asr-portal-panel {
        overflow: visible;
    }

    .asr-table-wrap {
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        overflow-x: auto;
        overscroll-behavior-x: contain;
    }

    .asr-table.asr-table-gov {
        min-width: 100%;
        width: max-content;
    }

    .asr-table-gov thead th,
    .asr-table-gov td {
        padding: 10px 10px;
        font-size: 0.8rem;
    }

    .asr-type-cell {
        min-width: 110px;
        max-width: 150px;
    }

    .asr-rate-cell {
        min-width: 76px;
        padding-right: 14px !important;
    }

    .asr-selection-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .asr-footnote {
        padding: 12px 16px 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .card {
        padding: 20px;
    }

    .sector-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .sector-btn {
        padding: 18px 12px;
        font-size: 0.85rem;
        min-height: 64px;
    }

    .ct-wrap {
        grid-template-columns: 1fr;
    }

    .ft-grid {
        grid-template-columns: 1fr;
    }

    .ft-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .charges-table {
        font-size: 0.72rem;
    }

    .charges-table th,
    .charges-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 380px) {
    .hero-stats {
        gap: 16px;
    }

    .hero-stat strong {
        font-size: 1.25rem;
    }

    .sector-grid {
        grid-template-columns: 1fr 1fr;
    }
}
