* { box-sizing: border-box; }

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;600;700&family=Noto+Sans+Gujarati:wght@400;600;700&display=swap');

/* Plug-and-play page background: swap image or overlay here only */
:root {
    --page-bg-image: url('images/hero-bg.png');
    --page-bg-overlay: linear-gradient(
        160deg,
        rgba(0, 0, 0, 0.52) 0%,
        rgba(0, 0, 0, 0.48) 45%,
        rgba(0, 0, 0, 0.45) 100%
    );
    --page-bg-position: center;
    --page-bg-size: cover;
}

html {
    overflow-x: hidden;
}

html::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #0f172a;
    background-image: var(--page-bg-overlay), var(--page-bg-image);
    background-position: center, var(--page-bg-position);
    background-size: auto, var(--page-bg-size);
    background-repeat: no-repeat;
    pointer-events: none;
}

body {
    font-family: 'Noto Sans Devanagari', 'Noto Sans Gujarati', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    max-width: 100%;
    background-color: #0f172a;
}

@media (max-width: 768px) {
    html::before {
        display: none;
    }

    body {
        background-color: #f4f7fb;
    }
}

.container { max-width: 1100px; margin: auto; }

.lang-bar {
    padding: 14px 24px 0;
    display: flex;
    justify-content: flex-end;
}

.result-card .lang-bar {
    padding: 14px 20px 0;
    background: #fff;
    justify-content: center;
}

.dashboard-card .lang-bar,
.form-card .lang-bar {
    justify-content: center;
    background: transparent;
}

.card > .lang-bar {
    padding-top: 18px;
    padding-right: 24px;
    padding-left: 24px;
}

.lang-switcher {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    max-width: 100%;
}

.lang-switcher .lang-option {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.lang-switcher .lang-option:hover {
    color: #374151;
    background: #e5e7eb;
}

.lang-switcher .lang-option.is-active {
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .08);
}

h1 { text-align: center; margin: 0; }

.sub {
    text-align: center;
    color: #666;
    margin: 8px 0 20px;
}

.section { margin-top: 28px; }

#flatUnitSection,
#shopUnitSection {
    scroll-margin-top: 16px;
}

#loginActions {
    scroll-margin-bottom: 16px;
}

.section h2 {
    border-bottom: 2px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.block-grid,
.flat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.block,
.flat {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: all .2s ease;
    user-select: none;
}

.block:hover,
.flat:hover { background: #f8fafc; }

.block.sel {
    background: #16a34a;
    color: #fff;
    border-color: #16a34a;
}

.flat.sel {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.flat-grid .flat.is-unregistered {
    background: #d1d5db !important;
    color: #6b7280 !important;
    border-color: #c4c9d0 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.flat-grid .flat.is-unregistered:hover {
    background: #d1d5db !important;
}

.flat-grid .flat.is-available {
    background: #fff;
    color: #111827;
    border-color: #d1d5db;
    cursor: pointer;
    pointer-events: auto;
}

.flat-grid .flat.is-available:hover {
    background: #f8fafc;
}

.flat-grid .flat.is-available.sel {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

/* Segmented Flat | Shop tabs */
.segmented-control {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    margin-bottom: 24px;
    padding: 5px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: visible;
}

.segmented-control input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.segmented-control label {
    flex: 1 1 50%;
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    margin: 0;
}

.segmented-control input[type="radio"]:checked + label {
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.segmented-control label:hover {
    color: #374151;
}

.tab-panel {
    display: none !important;
}

.tab-panel.active {
    display: block !important;
}

.hint-text {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6b7280;
    text-align: left;
}

button.submit-btn {
    width: 100%;
    padding: 12px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

button.submit-btn:hover {
    background: #1d4ed8;
}

button.submit-btn--secondary {
    background: #fff;
    color: #2563eb;
    border: 2px solid #2563eb;
}

button.submit-btn--secondary:hover {
    background: #eff6ff;
}

.email-otp-hint {
    margin: 0 0 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
}

.email-otp-form + .email-otp-form {
    margin-top: 12px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}

.shop-empty {
    color: #6b7280;
    font-size: 14px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px dashed #d1d5db;
}

.block.readonly,
.flat.readonly {
    cursor: default;
    opacity: .85;
}

input,
button,
select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 14px;
}

input[readonly] {
    background: #f3f4f6;
    color: #374151;
}

input[type=file] { padding: 10px; }

button,
.btn {
    background: #2563eb;
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

button:hover,
.btn:hover { background: #1d4ed8; }

.btn-secondary { background: #6b7280; }
.btn-secondary:hover { background: #4b5563; }

.summary {
    background: #eef6ff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #bfdbfe;
}

.summary strong { display: block; margin: 4px 0; }

.doc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.doc-grid label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.doc-grid > div {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
}

#blockText,
#flatText {
    margin-bottom: 12px;
    font-weight: 600;
    color: #2563eb;
}

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.otp-input {
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
}

.nav-links {
    text-align: center;
    margin-top: 16px;
}

.nav-links a {
    color: #2563eb;
    text-decoration: none;
    margin: 0 8px;
}

.status-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-container {
    max-width: 480px;
}

.login-card {
    padding: 20px 22px 24px;
}

/* Home / landing */
.home-page {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.site-brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.site-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}

.site-name {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-name--landing {
    white-space: normal;
    font-size: 22px;
    line-height: 1.35;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.site-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-header .lang-bar {
    padding: 0;
}

.site-header .lang-switcher {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.site-header .lang-option {
    color: rgba(255, 255, 255, 0.78);
    padding: 6px 12px;
    font-size: 12px;
}

.site-header .lang-option:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.site-header .lang-option.is-active {
    background: rgba(255, 255, 255, 0.95);
    color: #1d4ed8;
}

.btn-header-login {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    transition: background 0.2s ease;
}

.btn-header-login:hover {
    background: #1d4ed8;
    color: #fff;
}

.site-main {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 20px 28px;
}

.home-panel {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 14px;
    color: #e2e8f0;
}

.home-panel--compact {
    margin-bottom: 18px;
}

.home-panel h2 {
    margin: 0 0 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.55);
}

.home-feed {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.home-feed-item {
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.home-feed-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.home-feed-item time {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 4px;
}

.home-feed-item strong {
    display: block;
    font-size: 14px;
    color: #f8fafc;
    margin-bottom: 4px;
}

.home-feed-item p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(226, 232, 240, 0.82);
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}

.home-stat {
    text-align: center;
    padding: 12px 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.home-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.home-stat-label {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.3;
}

.home-bullets {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(226, 232, 240, 0.85);
}

.home-bullets li + li {
    margin-top: 6px;
}

.home-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: center;
}

.home-quick-links a {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.home-quick-links a:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

.site-footer {
    background: rgba(15, 23, 42, 0.88);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 20px 22px;
    text-align: center;
    margin-top: auto;
}

.site-footer-disclaimer {
    margin: 0 0 12px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.55;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.site-footer-disclaimer strong {
    color: rgba(255, 255, 255, 0.72);
}

.site-footer-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    margin-bottom: 10px;
}

.site-footer-legal a {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.site-footer-legal a:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer-copy {
    margin: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 1.5;
}

.site-footer p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1.5;
}

.site-name--link {
    text-decoration: none;
    color: inherit;
}

.site-name--link:hover {
    color: #fff;
}

/* Legal pages */
.legal-page {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.legal-main {
    flex: 1;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 20px 32px;
}

.legal-article {
    padding: 28px 24px 32px;
}

.legal-article h1 {
    margin: 0 0 20px;
    font-size: 1.75rem;
    line-height: 1.25;
}

.legal-article p {
    margin: 0 0 14px;
    line-height: 1.65;
    color: #374151;
}

.legal-section {
    margin-top: 24px;
}

.legal-section h2 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    color: #1e3a5f;
}

.legal-section ul {
    margin: 0 0 14px 20px;
    padding: 0;
    color: #374151;
}

.legal-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.legal-section a {
    color: #2563eb;
    font-weight: 700;
}

.legal-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 16px;
}

.legal-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
}

.legal-breadcrumb a:hover {
    text-decoration: underline;
}

.article-date {
    display: block;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.article-body {
    margin-bottom: 20px;
}

.article-notice {
    margin-top: 24px;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #64748b;
    border-radius: 8px;
}

.article-notice p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}

.home-feed-item strong a {
    color: inherit;
    text-decoration: none;
}

.home-feed-item strong a:hover {
    text-decoration: underline;
}

/* Member consent (point 5) */
.member-consent-box {
    border: 1px solid #dbeafe;
    background: #f8fbff;
}

.member-consent-title {
    margin: 0 0 14px;
    font-size: 1.1rem;
    color: #1e3a5f;
}

.member-consent-body p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

.member-consent-list {
    margin: 0 0 12px 20px;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
}

.member-consent-list li {
    margin-bottom: 8px;
}

.member-consent-body a {
    color: #2563eb;
    font-weight: 600;
}

.member-consent-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #dbeafe;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #1e3a5f;
}

.member-consent-check input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin: 3px 0 0;
    flex-shrink: 0;
}

.member-consent-check span {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

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

@media (max-width: 768px) {
    .site-header {
        background: #fff;
        border-bottom-color: #e5e7eb;
        backdrop-filter: none;
    }

    .site-eyebrow {
        color: #6b7280;
    }

    .site-name {
        color: #111827;
    }

    .site-header .lang-switcher {
        background: #f3f4f6;
        border-color: #e5e7eb;
    }

    .site-header .lang-option {
        color: #6b7280;
    }

    .site-header .lang-option:hover {
        background: #e5e7eb;
        color: #374151;
    }

    .home-panel {
        background: #fff;
        border-color: #e5e7eb;
        color: #374151;
    }

    .home-panel h2 {
        color: #6b7280;
    }

    .home-feed-item {
        border-bottom-color: #f3f4f6;
    }

    .home-feed-item time {
        color: #9ca3af;
    }

    .home-feed-item strong {
        color: #111827;
    }

    .home-feed-item p {
        color: #4b5563;
    }

    .home-stat {
        background: #fff;
        border-color: #e5e7eb;
    }

    .home-stat-value {
        color: #1d4ed8;
    }

    .home-stat-label {
        color: #6b7280;
    }

    .home-bullets {
        color: #4b5563;
    }

    .home-quick-links a {
        color: #2563eb;
        border-bottom-color: #bfdbfe;
    }

    .site-footer {
        background: #fff;
        border-top-color: #e5e7eb;
    }

    .site-footer p {
        color: #9ca3af;
    }
}

@media (max-width: 520px) {
    .home-stats {
        grid-template-columns: 1fr;
    }

    .site-header-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .site-header-actions {
        justify-content: space-between;
    }
}

/* Dashboard */
.dashboard-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-container {
    max-width: 560px;
}

.dashboard-card {
    padding: 0;
    overflow: visible;
    border: 1px solid rgba(37, 99, 235, 0.08);
    border-radius: 16px;
}

.dashboard-hero {
    padding: 32px 28px 24px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
    color: #fff;
    text-align: center;
    border-radius: 16px 16px 0 0;
}

.dashboard-hero h1 {
    color: #fff;
    font-size: 26px;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.dashboard-eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
}

.dashboard-welcome {
    margin: 0;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.5;
}

.dashboard-welcome strong {
    color: #fff;
    font-weight: 700;
}

.dashboard-unit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 24px 24px 8px;
}

.dashboard-unit-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 16px;
}

.dashboard-unit-item--wide {
    grid-column: 1 / -1;
}

.dashboard-unit-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 6px;
}

.dashboard-unit-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
}

.dashboard-status {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 16px 24px 0;
    padding: 16px;
    border-radius: 14px;
}

.dashboard-status--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.dashboard-status--pending {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.dashboard-status-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.dashboard-status--success .dashboard-status-icon {
    background: #16a34a;
    color: #fff;
}

.dashboard-status--pending .dashboard-status-icon {
    background: #f59e0b;
    color: #fff;
}

.dashboard-status-body strong {
    display: block;
    font-size: 15px;
    color: #111827;
    margin-bottom: 4px;
}

.dashboard-status-body p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #4b5563;
}

.dashboard-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.dashboard-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
}

.dashboard-badge--muted {
    background: #f3f4f6;
    color: #4b5563;
}

.dashboard-badge--draft {
    background: #fef3c7;
    color: #92400e;
}

.dashboard-badge--warning {
    background: #fee2e2;
    color: #991b1b;
}

.btn-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    width: calc(100% - 48px);
    margin: 24px 24px 0;
    padding: 18px 20px;
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 50%, #3b82f6 100%);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.42);
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #2563eb 100%);
    color: #fff;
}

.btn-cta--outline {
    background: #fff;
    color: #1d4ed8;
    border: 2px solid #bfdbfe;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
}

.btn-cta--outline:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.btn-cta-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
}

.btn-cta--outline .btn-cta-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.btn-cta-icon svg {
    width: 24px;
    height: 24px;
}

.btn-cta-text {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.btn-cta-text strong {
    display: block;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.btn-cta-text small {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0.88;
    line-height: 1.4;
}

.btn-cta--outline .btn-cta-text small {
    color: #6b7280;
    opacity: 1;
}

.btn-cta-arrow {
    flex-shrink: 0;
    font-size: 22px;
    font-weight: 700;
    opacity: 0.9;
    transition: transform 0.2s ease;
}

.btn-cta:hover .btn-cta-arrow {
    transform: translateX(4px);
}

.dashboard-footer {
    padding: 20px 24px 28px;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
}

.dashboard-logout {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.dashboard-logout:hover {
    color: #374151;
    background: #f3f4f6;
}

/* Profile */
.profile-container {
    max-width: 640px;
}

.profile-section {
    padding: 24px;
    border-top: 1px solid #eef2f7;
}

.profile-section-header h2 {
    margin: 0 0 6px;
    font-size: 19px;
    color: #111827;
}

.profile-section-header p {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
}

.profile-info-grid {
    padding: 18px 0 0;
}

.profile-section .profile-settings-cta {
    margin: 18px 0 0;
    width: 100%;
}

.profile-link-button {
    margin-top: 14px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2563eb;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.profile-link-button:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.profile-section .alert {
    margin-top: 16px;
}

.profile-form {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.profile-form .submit-btn {
    margin-top: 4px;
}

.profile-pin-input {
    width: 150px;
    max-width: 100%;
    text-align: center;
}

.settings-option-grid {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.settings-option {
    display: block;
    width: 100%;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.settings-option:hover {
    border-color: #93c5fd;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.settings-option strong {
    display: block;
    color: #111827;
    font-size: 16px;
    margin-bottom: 4px;
}

.settings-option span {
    display: block;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.45;
}

.settings-panel {
    display: none;
}

.settings-panel.is-visible {
    display: block;
}

/* Admin */
.admin-container {
    max-width: 760px;
}

.admin-list-container {
    max-width: 1180px;
}

.admin-detail-container {
    max-width: 860px;
}

.admin-alert {
    margin: 18px 24px 0;
}

.admin-section {
    padding: 24px;
    border-top: 1px solid #eef2f7;
}

.admin-section h2 {
    margin: 0 0 16px;
    color: #111827;
}

.admin-action-grid {
    display: grid;
    gap: 14px;
}

.admin-action-card {
    display: block;
    padding: 18px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
}

.admin-action-card h3 {
    margin: 0 0 6px;
    color: #111827;
}

.admin-action-card p {
    margin: 0 0 14px;
    color: #6b7280;
    line-height: 1.5;
}

.admin-action-link {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.admin-action-link:hover {
    border-color: #93c5fd;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.admin-link-arrow,
.admin-small-link {
    color: #2563eb;
    font-weight: 700;
    text-decoration: none;
}

.admin-muted {
    margin: 10px 0 0;
    color: #6b7280;
    font-size: 14px;
}

.admin-table-wrap {
    overflow-x: auto;
    padding: 24px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: #6b7280;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-table small {
    display: block;
    margin-top: 4px;
    color: #6b7280;
}

.admin-status,
.admin-login-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.admin-status--submitted,
.admin-login-badge--yes {
    background: #dcfce7;
    color: #166534;
}

.admin-status--draft {
    background: #fef3c7;
    color: #92400e;
}

.admin-status--not_started,
.admin-login-badge--no {
    background: #f3f4f6;
    color: #4b5563;
}

.admin-whatsapp {
    display: inline-block;
    margin-top: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.admin-whatsapp--large {
    font-size: 14px;
    padding: 8px 12px;
}

.admin-actions-cell {
    min-width: 120px;
}

.admin-view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    background: #eff6ff;
}

.admin-clear-inline {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.admin-clear-inline input {
    width: 96px;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

.admin-clear-inline button {
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: #dc2626;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.admin-clear-inline button:disabled,
.admin-action-card .submit-btn:disabled,
.admin-clear-detail .submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.admin-clear-detail {
    display: grid;
    gap: 12px;
}

.admin-field-grid {
    margin-top: 12px;
}

.admin-file-meta-group {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.admin-file-meta-group + .admin-file-meta-group {
    margin-top: 12px;
}

.admin-file-meta-group .file-view-row {
    margin-top: 8px;
}

.admin-consent-audit {
    margin-top: 12px;
}

.admin-consent-text pre {
    margin: 8px 0 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    color: #374151;
}

@media (max-width: 760px) {
    .admin-list-container {
        width: 100%;
    }

    .admin-table-wrap {
        overflow-x: visible;
        padding: 18px;
    }

    .admin-table,
    .admin-table thead,
    .admin-table tbody,
    .admin-table tr,
    .admin-table th,
    .admin-table td {
        display: block;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tr {
        margin-bottom: 14px;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
        overflow: hidden;
    }

    .admin-table td {
        display: grid;
        grid-template-columns: minmax(96px, 34%) 1fr;
        gap: 10px;
        padding: 12px 14px;
        border-bottom: 1px solid #f1f5f9;
    }

    .admin-table td:last-child {
        border-bottom: 0;
    }

    .admin-table td::before {
        content: attr(data-label);
        color: #6b7280;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .admin-actions-cell {
        min-width: 0;
    }

    .admin-view-link {
        width: 100%;
        min-height: 42px;
    }
}

/* Document form */
.form-page,
.result-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.form-container {
    max-width: 720px;
}

.result-container {
    max-width: 560px;
}

.form-card,
.result-card {
    padding: 0;
    overflow: visible;
    border: 1px solid rgba(37, 99, 235, 0.08);
    border-radius: 16px;
}

.form-hero {
    padding: 28px 28px 22px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%);
    color: #fff;
    text-align: center;
    border-radius: 16px 16px 0 0;
}

.form-hero h1 {
    color: #fff;
    font-size: 24px;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.form-hero-sub {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
}

.form-unit-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 24px 0;
}

.form-unit-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    color: #1e40af;
}

.form-unit-pill-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #3b82f6;
}

.form-body {
    padding: 8px 0 4px;
}

.form-panel {
    margin: 16px 24px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    overflow: visible;
}

.form-panel--optional {
    background: #fafbfc;
    border-style: dashed;
}

.form-panel-header {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.form-step {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-step--optional {
    background: #e5e7eb;
    color: #6b7280;
    font-size: 18px;
    line-height: 1;
}

.form-panel-header h2 {
    margin: 0 0 4px;
    padding: 0;
    border: none;
    font-size: 18px;
    color: #111827;
}

.form-panel-desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
}

.form-tag {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-label {
    display: block;
    margin: 10px 0 6px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.field-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.field-input.is-field-invalid,
.file-field.is-field-invalid,
.radio-options.is-field-invalid,
.member-consent-check.is-field-invalid,
.form-panel.disclaimer-box label.is-field-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.field-input.is-field-invalid {
    background: #fff7f7;
}

.file-field.is-field-invalid,
.radio-options.is-field-invalid,
.member-consent-check.is-field-invalid,
.form-panel.disclaimer-box label.is-field-invalid {
    background: #fef2f2;
    border: 1px solid #dc2626 !important;
    border-radius: 12px;
}

.radio-options.is-field-invalid,
.member-consent-check.is-field-invalid,
.form-panel.disclaimer-box label.is-field-invalid {
    padding: 12px;
}

.field-error-message {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #b91c1c;
}

.field-error-message--inside {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fee2e2;
}

.field-input--readonly {
    background: #f3f4f6;
    color: #4b5563;
}

.file-field {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 14px;
    overflow: visible;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.file-field:hover,
.file-field:focus-within {
    border-color: #93c5fd;
    background: #eff6ff;
}

.file-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
}

.file-field input[type="file"] {
    width: 100%;
    max-width: 100%;
    padding: 8px 2px 2px;
    border: none;
    background: transparent;
    font-size: 13px;
    color: #4b5563;
}

.file-field input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 8px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #fff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.file-field input[type="file"]::file-selector-button:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.file-field--full {
    grid-column: 1 / -1;
}

.file-field--compact {
    padding: 10px 12px;
    margin-bottom: 4px;
}

.file-field--compact input[type="file"] {
    padding-top: 0;
}

.radio-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-options--inline {
    flex-direction: row;
}

.radio-options--inline .radio-option {
    flex: 1;
}

.radio-option {
    display: block;
    cursor: pointer;
    margin: 0;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.radio-option-content {
    display: block;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.radio-option-content strong {
    display: block;
    font-size: 15px;
    color: #111827;
}

.radio-option-content small {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: #6b7280;
}

.radio-option:hover .radio-option-content {
    border-color: #bfdbfe;
    background: #f8fafc;
}

.radio-option:has(input:checked) .radio-option-content {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.radio-option:has(input:checked) .radio-option-content strong {
    color: #1d4ed8;
}

.form-panel.disclaimer-box {
    background: #fffbeb;
    border-color: #fde68a;
    box-shadow: none;
}

.form-panel.disclaimer-box label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-weight: 500;
    line-height: 1.55;
    color: #78350f;
    cursor: pointer;
    margin: 0;
}

.form-panel.disclaimer-box input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    margin: 4px 0 0;
    flex-shrink: 0;
}

.form-panel.disclaimer-box span {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.form-submit-area {
    padding: 8px 24px 0;
}

.form-save-draft-hint {
    margin: 0 0 12px;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

.form-submit-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-cta--submit,
.btn-cta--draft,
.btn-cta--result {
    width: 100%;
    margin: 0;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn-cta--draft {
    background: #fff;
    border: 2px solid #d1d5db;
    color: #374151;
}

.btn-cta--draft:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.form-footer {
    padding: 18px 24px 28px;
    text-align: center;
}

.form-back-link {
    display: inline-block;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.form-back-link:hover {
    color: #374151;
    background: #f3f4f6;
}

body.modal-open {
    overflow: hidden;
}

.draft-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(5px);
}

.draft-confirm-modal[hidden] {
    display: none;
}

.draft-confirm-card {
    width: min(460px, 100%);
    padding: 28px;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    text-align: center;
}

.draft-confirm-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: #fffbeb;
    color: #d97706;
    display: flex;
    align-items: center;
    justify-content: center;
}

.draft-confirm-icon svg {
    width: 30px;
    height: 30px;
}

.draft-confirm-card h2 {
    margin: 0 0 10px;
    font-size: 21px;
    line-height: 1.25;
    color: #111827;
}

.draft-confirm-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
}

.draft-confirm-warning {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #fcd34d;
    border-radius: 14px;
    background: #fffbeb;
    text-align: left;
}

.draft-confirm-warning strong,
.draft-confirm-warning span {
    display: block;
}

.draft-confirm-warning strong {
    margin-bottom: 4px;
    font-size: 14px;
    color: #92400e;
}

.draft-confirm-warning span {
    font-size: 13px;
    line-height: 1.5;
    color: #78350f;
}

.draft-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 20px;
}

/* Upload modal */
#uploadModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
    background: rgba(15, 23, 42, 0.45);
}

.upload-card {
    width: min(420px, calc(100vw - 40px));
    background: #fff;
    padding: 32px 28px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.upload-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1d4ed8, #3b82f6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-card-icon svg {
    width: 28px;
    height: 28px;
}

.upload-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
    color: #111827;
}

.upload-card p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.upload-hint {
    margin-top: 14px !important;
    font-size: 12px !important;
    color: #9ca3af !important;
}

.progress-container {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 20px;
}

#progressBar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #1d4ed8, #3b82f6);
    border-radius: 999px;
    transition: width 0.2s;
}

#progressPercent {
    margin-top: 12px;
    font-size: 28px;
    font-weight: 700;
    color: #1d4ed8;
}

.upload-counter {
    margin-top: 14px !important;
    font-size: 13px !important;
    font-weight: 600;
    color: #374151 !important;
}

.upload-current-doc {
    margin-top: 6px !important;
    font-size: 13px !important;
    color: #1d4ed8 !important;
    word-break: break-word;
}

/* Admin PIN lookup modal */
.pin-lookup-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(4px);
    background: rgba(15, 23, 42, 0.5);
}

.pin-lookup-modal.is-open {
    display: flex;
}

body.pin-lookup-modal-open {
    overflow: hidden;
}

.pin-lookup-card {
    width: min(440px, calc(100vw - 32px));
    background: #fff;
    padding: 32px 28px 28px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.pin-lookup-title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
}

.pin-lookup-pin {
    margin: 0 0 24px;
    font-size: clamp(3.5rem, 14vw, 4.75rem);
    font-weight: 800;
    letter-spacing: 0.22em;
    line-height: 1;
    color: #1d4ed8;
    font-variant-numeric: tabular-nums;
}

.pin-lookup-details {
    margin: 0 0 24px;
    text-align: left;
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.pin-lookup-detail-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px 16px;
    margin-bottom: 14px;
}

.pin-lookup-detail-row:last-child {
    margin-bottom: 0;
}

.pin-lookup-detail-row dt {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.pin-lookup-detail-row dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    word-break: break-word;
}

.pin-lookup-close {
    width: 100%;
}

.upload-phase {
    margin-top: 10px !important;
    font-size: 12px !important;
    color: #6b7280 !important;
}

.upload-retry-notice {
    margin-top: 10px !important;
    padding: 8px 10px;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e !important;
    font-size: 12px !important;
}

.upload-error {
    margin-top: 12px !important;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b !important;
    font-size: 13px !important;
}

.upload-error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 14px;
    flex-wrap: wrap;
}

.btn-add--muted {
    background: #f3f4f6;
    color: #374151;
}

.dashboard-status--draft {
    background: linear-gradient(135deg, #fffbeb 0%, #fef2f2 100%);
    border: 1px solid #f59e0b;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.16);
}

.dashboard-status--draft .dashboard-status-icon {
    background: #f59e0b;
    color: #fff;
}

.dashboard-draft-progress {
    margin-top: 6px;
    font-size: 13px;
    color: #92400e;
}

.dashboard-draft-saved-notice {
    margin: 16px 24px 0;
    padding: 12px 16px;
    border-radius: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* Success / result page */
.result-hero {
    padding: 36px 28px 28px;
    text-align: center;
}

.result-hero--success {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 55%, #22c55e 100%);
    color: #fff;
    border-radius: 16px 16px 0 0;
}

.result-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: result-pop 0.5s ease;
}

.result-icon svg {
    width: 36px;
    height: 36px;
    stroke: #fff;
}

@keyframes result-pop {
    0% { transform: scale(0.6); opacity: 0; }
    70% { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

.result-hero h1 {
    margin: 0 0 10px;
    font-size: 26px;
    color: #fff;
    letter-spacing: -0.02em;
}

.result-hero p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}

.result-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 24px 24px 0;
}

.result-summary-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 16px;
}

.result-summary-item--wide {
    grid-column: 1 / -1;
}

.result-summary-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 6px;
}

.result-summary-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.result-note {
    margin: 20px 24px 0;
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.55;
    color: #166534;
}

.result-note strong {
    display: block;
    margin-bottom: 4px;
    color: #14532d;
}

.btn-cta--result {
    width: calc(100% - 48px);
    margin: 24px 24px 28px;
}

.owner-card,
.doc-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    overflow: visible;
}

.owner-card-header,
.doc-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.owner-card-title,
.doc-row-title {
    margin: 0;
    font-size: 16px;
    color: #1f2937;
}

.owner-card label,
.doc-row label {
    display: block;
    margin: 10px 0 6px;
    font-weight: 600;
    font-size: 14px;
}

.btn-add {
    width: auto;
    display: inline-block;
    padding: 10px 16px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-add:hover { background: #15803d; }

.btn-add:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.btn-remove {
    width: auto;
    padding: 6px 12px;
    background: #dc2626;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-remove:hover { background: #b91c1c; }

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
    margin: 0;
}

.radio-group input[type="radio"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
}

.disclaimer-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 16px;
}

.disclaimer-box label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 500;
    line-height: 1.5;
    cursor: pointer;
    margin: 0;
}

.disclaimer-box input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
}

.field-conditional {
    display: none;
    margin-top: 12px;
}

.field-conditional.is-visible {
    display: block;
}

.section > label {
    display: block;
    margin: 10px 0 6px;
    font-weight: 600;
    font-size: 14px;
}

@media (max-width: 768px) {
    .card { padding: 18px; }
    .dashboard-card,
    .form-card,
    .result-card { padding: 0; }
    .dashboard-hero,
    .form-hero { padding: 28px 20px 20px; }
    .dashboard-hero h1,
    .form-hero h1 { font-size: 22px; }
    .dashboard-unit-grid { padding: 20px 18px 4px; gap: 10px; }
    .dashboard-status { margin: 14px 18px 0; }
    .dashboard-draft-saved-notice { margin: 14px 18px 0; }
    .form-unit-bar { padding: 16px 18px 0; }
    .form-panel { margin: 14px 18px 0; padding: 16px; }
    .form-submit-area { padding: 8px 18px 0; }
    .form-footer { padding: 16px 18px 24px; }
    .result-summary { padding: 20px 18px 0; gap: 10px; }
    .result-note { margin: 16px 18px 0; }
    .result-hero { padding: 32px 20px 24px; }
    .result-hero h1 { font-size: 22px; }
    .radio-options--inline { flex-direction: column; }
    .btn-cta {
        width: calc(100% - 36px);
        margin: 20px 18px 0;
        padding: 16px;
        gap: 12px;
    }
    .btn-cta--result {
        width: calc(100% - 36px);
        margin: 20px 18px 24px;
    }
    .btn-cta-icon { width: 42px; height: 42px; }
    .btn-cta-text strong { font-size: 16px; }
    .lang-switcher { padding: 18px 18px 0; }
    .doc-grid { grid-template-columns: 1fr; }
    .draft-confirm-card { padding: 24px 20px; }
    .draft-confirm-actions { grid-template-columns: 1fr; }
    .block-grid,
    .flat-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    .block,
    .flat {
        padding: 8px;
        font-size: 13px;
    }
    h1 { font-size: 24px; }
    .section h2 { font-size: 18px; }
}

/* View & edit submission */
.view-panel h2 {
    margin: 0 0 12px;
    font-size: 18px;
}

.view-grid {
    display: grid;
    gap: 12px;
}

.view-item,
.view-file-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.view-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted, #6b7280);
}

.view-owner-block {
    padding: 14px 0;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.view-owner-block:last-child {
    border-bottom: none;
}

.view-owner-block h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.file-view-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 8px;
    overflow: visible;
}

.file-view-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: #374151;
    word-break: break-word;
}

.btn-file-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-file-action-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-file-action--view {
    background: #fff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.08);
}

.btn-file-action--view:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af;
}

.btn-file-action--remove {
    background: #fff;
    border-color: #fecaca;
    color: #b91c1c;
    box-shadow: 0 1px 2px rgba(185, 28, 28, 0.06);
}

.btn-file-action--remove:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.btn-file-action--remove:has(input:checked) {
    background: #fef2f2;
    border-color: #b91c1c;
    color: #991b1b;
    box-shadow: inset 0 0 0 1px #b91c1c;
}

/* Edit-mode file slots */
.file-slot-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.file-slot {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    overflow: visible;
    transition: border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.file-slot:has(.btn-file-action--remove input:checked) {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fffbfb 0%, #fef2f2 100%);
    opacity: 0.88;
}

.file-slot:has(.btn-file-action--remove input:checked) .file-picker--replace {
    display: none;
}

.file-slot-delete-note {
    display: none;
    margin: 10px 0 0 48px;
    color: #991b1b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.file-slot:has(.btn-file-action--remove input:checked) .file-slot-delete-note {
    display: block;
}

.file-slot-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.file-slot-badge {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.file-slot-badge--ok {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-color: #a7f3d0;
    color: #047857;
}

.file-slot-check-icon {
    width: 18px;
    height: 18px;
}

.file-slot-num {
    font-variant-numeric: tabular-nums;
}

.file-slot-label {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    letter-spacing: -0.01em;
}

.file-slot-row--compact .file-slot-actions {
    margin-left: auto;
}

.file-slot-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
}

.file-picker {
    position: relative;
    display: block;
    margin-top: 10px;
}

.file-slot > .file-picker {
    margin-top: 12px;
}

.file-picker-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.file-picker-trigger {
    display: block;
    cursor: pointer;
}

.file-picker-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1.5px dashed #cbd5e1;
    background: #fafbfc;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.file-picker-icon-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-picker-icon {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.file-picker-icon--selected {
    position: absolute;
    opacity: 0;
    transform: scale(0.8);
    color: #16a34a;
}

.file-picker-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.file-picker-text {
    line-height: 1.35;
    color: #475569;
}

.file-picker-filename {
    font-size: 12px;
    font-weight: 500;
    color: #166534;
    line-height: 1.35;
    word-break: break-all;
}

.file-picker-trigger:hover .file-picker-inner {
    border-color: #93c5fd;
    background: #eff6ff;
}

.file-picker-trigger:hover .file-picker-icon--upload {
    color: #3b82f6;
    transform: translateY(-1px);
}

.file-picker.is-selected .file-picker-inner {
    border-style: solid;
    border-color: #86efac;
    background: #f0fdf4;
}

.file-picker.is-selected .file-picker-icon-wrap {
    background: #dcfce7;
    border-color: #86efac;
}

.file-picker.is-selected .file-picker-icon--upload {
    opacity: 0;
    transform: scale(0.8);
}

.file-picker.is-selected .file-picker-icon--selected {
    opacity: 1;
    transform: scale(1);
}

.file-picker.is-selected .file-picker-text {
    color: #166534;
}

.file-picker--replace .file-picker-inner {
    padding: 12px 14px;
}

.file-picker--add .file-picker-inner {
    padding: 16px;
}

.file-picker-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.file-picker-toolbar[hidden],
.file-pending-list[hidden] {
    display: none !important;
}

.file-pending-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.file-pending-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.file-pending-name {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 500;
    color: #166534;
    word-break: break-word;
}

.file-field--picker {
    background: transparent;
    border: none;
    padding: 0;
}

.file-field--picker > label:first-child {
    margin-bottom: 8px;
}

.file-field--picker .file-picker {
    margin-top: 0;
}

.owner-card .file-picker,
.doc-row .file-picker {
    margin-top: 4px;
}

.file-field--incremental {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 14px;
}

.file-field--incremental > label:first-child {
    margin-bottom: 6px;
}

.file-field--incremental .file-slot-list {
    margin-bottom: 12px;
}

.file-field--incremental .btn-add {
    width: 100%;
    margin-top: 4px;
}

.file-slot--pending {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border-color: #bbf7d0;
}

.file-field--edit-single {
    background: transparent;
    border: none;
    padding: 0;
}

.file-field--edit-single > label:first-child {
    margin-bottom: 8px;
}

.file-field--edit-multi {
    background: #f8fafc;
}

.file-field--edit-multi > label:first-child {
    margin-bottom: 10px;
}

@media (max-width: 520px) {
    .file-slot-row {
        flex-wrap: wrap;
    }

    .file-slot-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .file-slot-actions .btn-file-action {
        flex: 1;
        justify-content: center;
    }

    .file-view-row {
        flex-direction: column;
        align-items: stretch;
    }

    .file-view-row .btn-file-action {
        width: 100%;
    }
}

.view-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-cta-grid {
    display: grid;
    gap: 12px;
    padding: 0 24px 8px;
}

.dashboard-cta-grid .btn-cta {
    margin: 0;
    width: 100%;
}

@media (min-width: 640px) {
    .dashboard-cta-grid {
        grid-template-columns: 1fr 1fr;
    }
}
