:root {
    --navy: #102247;
    --blue: #6f91cf;
    --blue-soft: #8faee1;
    --panel: rgba(137, 166, 218, 0.82);
    --white: #ffffff;
    --ink: #14213d;
    --muted: #65748b;
    --line: #d8e2f2;
    --surface: #f6f8fc;
    --teal: #1ca7a8;
    --coral: #de6d5d;
    --shadow: 0 24px 70px rgba(13, 31, 68, 0.24);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Lato, Arial, sans-serif;
    color: var(--ink);
    background: var(--surface);
}

input,
select,
textarea,
button {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
}

.public-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 18px;
    background:
        linear-gradient(90deg, rgba(64, 105, 172, 0.88), rgba(111, 145, 207, 0.86)),
        url("../../img/logocriocord.png");
    background-repeat: no-repeat;
    background-size: cover, 540px auto;
    background-position: center, center bottom 34px;
}

.claim-card {
    width: min(100%, 560px);
    padding: 58px 62px;
    border-radius: 36px;
    background: var(--panel);
    box-shadow: var(--shadow);
    color: var(--white);
    backdrop-filter: blur(10px);
}

.wide-card {
    width: min(100%, 760px);
}

.login-card,
.thanks-card {
    text-align: center;
}

.brand-block {
    text-align: center;
    margin-bottom: 34px;
}

.brand-logo {
    display: block;
    width: min(230px, 74%);
    max-height: 84px;
    object-fit: contain;
    margin: 0 auto 24px;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 18px;
    font-size: clamp(2rem, 4vw, 2.85rem);
    line-height: 1.1;
    font-weight: 900;
}

.intro {
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.12rem;
    line-height: 1.55;
    font-weight: 700;
}

.claim-form {
    display: grid;
    gap: 24px;
}

.form-section {
    display: grid;
    gap: 18px;
}

.form-section h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 900;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

label {
    display: grid;
    gap: 9px;
    text-align: left;
    font-weight: 900;
}

label span {
    font-size: 0.95rem;
}

.span-2 {
    grid-column: span 2;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 9px;
    background: var(--white);
    color: var(--ink);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input,
select {
    min-height: 52px;
    padding: 0 15px;
}

textarea {
    min-height: 120px;
    padding: 14px 15px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(28, 167, 168, 0.18);
}

::placeholder {
    color: #8b96a6;
}

.choice-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.choice-pill {
    cursor: pointer;
}

.choice-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-pill span {
    display: grid;
    place-items: center;
    min-height: 52px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
}

.choice-pill input:checked + span {
    border-color: var(--white);
    background: var(--white);
    color: var(--navy);
}

.primary-button,
.secondary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    border: 0;
    border-radius: 9px;
    padding: 0 24px;
    font-weight: 900;
    cursor: pointer;
}

.primary-button {
    width: 100%;
    background: var(--navy);
    color: var(--white);
}

.primary-button:hover {
    background: #0b1833;
}

.secondary-button {
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
}

.ghost-button {
    background: rgba(16, 34, 71, 0.08);
    color: var(--ink);
}

.compact {
    width: auto;
    min-height: 46px;
}

.link-button {
    margin-top: 26px;
}

.notice {
    margin-bottom: 22px;
    padding: 16px 18px;
    border-radius: 10px;
    text-align: left;
    font-weight: 700;
}

.notice p {
    margin: 0;
}

.notice p + p {
    margin-top: 6px;
}

.notice-error {
    background: rgba(222, 109, 93, 0.18);
    border: 1px solid rgba(222, 109, 93, 0.55);
    color: var(--white);
}


.mail-note {
    margin: 18px auto 0;
    max-width: 430px;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
    line-height: 1.5;
}
.ticket-number {
    display: inline-flex;
    margin-top: 24px;
    padding: 13px 18px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.22);
    font-weight: 900;
}

.admin-shell {
    min-height: 100vh;
    padding: 28px;
    background: #f2f6fc;
}

.admin-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.admin-logo {
    display: block;
    width: 170px;
    max-height: 58px;
    object-fit: contain;
    margin-bottom: 18px;
}

.admin-header .eyebrow {
    color: var(--teal);
}

.admin-header h1 {
    margin: 0;
    color: var(--navy);
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stats-grid article {
    min-height: 104px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 14px 34px rgba(16, 34, 71, 0.08);
}

.stats-grid span {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-weight: 900;
}

.stats-grid strong {
    color: var(--navy);
    font-size: 2.2rem;
    line-height: 1;
}

.table-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 18px 45px rgba(16, 34, 71, 0.09);
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border-bottom: 1px solid var(--line);
}

.table-toolbar h2 {
    margin: 0 0 5px;
    font-size: 1.2rem;
    color: var(--navy);
}

.table-toolbar p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.table-toolbar input {
    width: min(420px, 100%);
    border: 1px solid var(--line);
}

.table-wrap {
    overflow-x: auto;
}

.claims-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
}

.claims-table th,
.claims-table td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    text-align: left;
}

.claims-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #eaf1fb;
    color: var(--navy);
    font-size: 0.82rem;
    text-transform: uppercase;
}

.claims-table td {
    color: #26364f;
    line-height: 1.4;
}

.claims-table td strong,
.claims-table td span {
    display: block;
}

.claims-table td span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.9rem;
}

.status-pill {
    display: inline-flex !important;
    width: max-content;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(28, 167, 168, 0.12);
    color: #0f7778 !important;
    font-weight: 900;
}

.empty-state {
    padding: 34px;
    color: var(--muted);
    font-weight: 900;
}

@media (max-width: 900px) {
    .admin-header,
    .table-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .public-shell {
        align-items: flex-start;
        padding: 18px 12px;
    }

    .claim-card {
        padding: 34px 20px;
        border-radius: 24px;
    }

    .form-grid,
    .choice-row,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

    h1 {
        font-size: 2rem;
    }

    .admin-shell {
        padding: 16px;
    }

    .admin-actions a {
        width: 100%;
    }
}

.log-panel {
    margin-top: 18px;
}

.log-box {
    margin: 0;
    padding: 22px;
    min-height: 260px;
    max-height: 620px;
    overflow: auto;
    background: #0f172a;
    color: #dbeafe;
    font: 13px/1.55 Consolas, Monaco, monospace;
    white-space: pre-wrap;
}
/* Polished public form */
.polished-public-shell {
    align-items: flex-start;
    padding: 34px 18px 54px;
    background:
        radial-gradient(circle at 18% 10%, rgba(28, 167, 168, 0.18), transparent 28%),
        radial-gradient(circle at 85% 18%, rgba(222, 109, 93, 0.13), transparent 24%),
        linear-gradient(120deg, rgba(42, 82, 150, 0.94), rgba(122, 154, 213, 0.88)),
        url("../../img/logocriocord.png");
    background-repeat: no-repeat;
    background-size: auto, auto, cover, 620px auto;
    background-position: center, center, center, center bottom 20px;
}

.polished-claim-card {
    width: min(100%, 880px);
    padding: 38px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 30px 90px rgba(8, 24, 59, 0.34);
}

.polished-brand-block {
    margin-bottom: 28px;
    padding: 24px 20px 26px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
}

.polished-brand-block h1 {
    margin-bottom: 12px;
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.progress-steps span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 900;
}

.progress-steps b {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--navy);
}

.polished-form {
    gap: 18px;
}

.polished-section {
    padding: 22px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.section-title span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--white);
    color: var(--navy);
    font-weight: 900;
}

.section-title h2 {
    margin: 0;
    line-height: 1.2;
}

.submit-button {
    min-height: 62px;
    box-shadow: 0 14px 28px rgba(16, 34, 71, 0.28);
}

/* Polished admin */
.admin-shell-polished {
    background:
        linear-gradient(180deg, #eef4ff 0, #f8fafc 280px),
        #f8fafc;
}

.admin-hero {
    align-items: center;
    padding: 24px;
    border: 1px solid #dbe7f7;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff, #eef6ff);
    box-shadow: 0 18px 45px rgba(16, 34, 71, 0.08);
}

.admin-subtitle {
    max-width: 620px;
    margin: 10px 0 0;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.45;
}

.admin-notice {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(28, 167, 168, 0.28);
    border-radius: 10px;
    background: rgba(28, 167, 168, 0.1);
    color: #0f7778;
    font-weight: 900;
}

.stats-grid-polished article {
    position: relative;
    overflow: hidden;
}

.stats-grid-polished article::after {
    content: "";
    position: absolute;
    right: -22px;
    bottom: -28px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(28, 167, 168, 0.08);
}

.claims-panel {
    border-radius: 14px;
}

.dashboard-toolbar {
    background: #ffffff;
}

.claims-table-compact {
    min-width: 1280px;
}

.claims-table-compact th:nth-child(6),
.claims-table-compact th:nth-child(7) {
    width: 24%;
}

.claims-table-compact tbody tr:hover td {
    background: #f8fbff;
}

.date-cell small,
.person-cell small {
    display: block;
    margin-top: 6px;
    color: #7c8da8;
    font-weight: 900;
}

.contact-cell span {
    word-break: break-word;
}

.long-text-cell {
    max-width: 360px;
}

.claim-text,
.toggle-body {
    max-width: 100%;
    color: #203451;
}

.text-toggle {
    max-width: 100%;
}

.text-toggle summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    cursor: pointer;
    list-style: none;
}

.text-toggle summary::-webkit-details-marker {
    display: none;
}

.text-toggle summary::before {
    content: "";
    width: 0;
    height: 0;
    margin-top: 7px;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid var(--teal);
    transition: transform 0.18s ease;
}

.text-toggle[open] summary::before {
    transform: rotate(90deg);
}

.toggle-title {
    display: inline-flex !important;
    width: max-content;
    margin: 0 !important;
    color: var(--teal) !important;
    font-weight: 900;
}

.text-preview {
    grid-column: 1 / -1;
    margin-top: 6px !important;
    color: #4f6078 !important;
}

.toggle-body {
    margin-top: 10px;
    padding: 12px;
    border-left: 3px solid var(--teal);
    border-radius: 8px;
    background: #f2fbfb;
    line-height: 1.55;
}

.muted-text {
    color: #7c8da8;
    font-weight: 700;
}

.actions-cell {
    width: 72px;
    text-align: center !important;
}

.delete-button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(222, 109, 93, 0.35);
    border-radius: 50%;
    background: rgba(222, 109, 93, 0.1);
    color: #b42318;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.delete-button:hover {
    background: #b42318;
    color: #ffffff;
}

@media (max-width: 680px) {
    .polished-claim-card {
        padding: 20px;
    }

    .polished-section {
        padding: 16px;
    }

    .progress-steps {
        grid-template-columns: 1fr;
    }

    .admin-hero {
        padding: 18px;
    }
}