:root {
    --green: #16704a;
    --green-dark: #0f5638;
    --gold: #b8892f;
    --ink: #182230;
    --muted: #667085;
    --line: #d8dee8;
    --surface: #ffffff;
    --app-scrollbar-track: #eef2f7;
    --app-scrollbar-thumb: #9ca3af;
    --app-scrollbar-thumb-hover: #6b7280;
}

* {
    box-sizing: border-box;
    scrollbar-color: var(--app-scrollbar-thumb) var(--app-scrollbar-track);
    scrollbar-width: thin;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: var(--app-scrollbar-track);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    border: 2px solid var(--app-scrollbar-track);
    border-radius: 999px;
    background: var(--app-scrollbar-thumb);
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: var(--app-scrollbar-thumb-hover);
}

*::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

*::-webkit-scrollbar-corner {
    background: var(--app-scrollbar-track);
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 10%, rgba(184, 137, 47, .12), transparent 35%),
        linear-gradient(135deg, rgba(22, 112, 74, .12), transparent 55%),
        #f4f7fb;
    font-family: 'Cairo', Tahoma, Arial, sans-serif;
    overflow-x: hidden;
}

.application-shell {
    width: min(1220px, calc(100% - 28px));
    margin: 28px auto;
}

.application-card {
    min-width: 0;
    overflow: hidden;
    padding: clamp(20px, 4vw, 38px);
    border: 1px solid rgba(24, 34, 48, .08);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 22px 70px rgba(24, 34, 48, .11);
}

.application-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
    text-align: center;
}

.application-head > div:last-child,
.form-section {
    min-width: 0;
}

.head-icon {
    flex: 0 0 68px;
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--green), #239b68);
    font-size: 28px;
    box-shadow: 0 10px 24px rgba(22, 112, 74, .22);
}

.application-logo-wrap {
    width: min(260px, 75vw);
    height: 140px;
    display: grid;
    place-items: center;
}

.application-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 8px 14px rgba(24, 34, 48, .12));
}

.application-title {
    width: 100%;
}

.eyebrow {
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
}

h1 {
    margin: 2px 0 4px;
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 800;
}

.application-head p {
    margin: 0;
    color: var(--muted);
}

.form-section {
    margin-top: 28px;
}

.form-section h2 {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 18px;
    font-size: 19px;
    font-weight: 800;
}

.form-section h2 > span {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--green);
    font-size: 13px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-title small {
    color: var(--muted);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 17px;
}

.field {
    display: grid;
    gap: 7px;
    color: #344054;
    font-size: 13px;
    font-weight: 800;
}

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

.field b {
    color: #dc2626;
}

.field input,
.field select,
.experience-table input {
    width: 100%;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fff;
    font-family: inherit;
    transition: border-color .18s, box-shadow .18s;
}

.field input {
    min-height: 46px;
    padding: 10px 12px;
}

.field select {
    min-height: 46px;
    padding: 10px 12px 10px 38px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        left 18px center,
        left 12px center;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.field input:focus,
.field select:focus,
.experience-table input:focus {
    z-index: 1;
    outline: 0;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(22, 112, 74, .12);
}

.experience-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    border: 1px solid #89929f;
    border-radius: 9px;
}

.experience-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
    table-layout: fixed;
}

.experience-table th,
.experience-table td {
    border: 1px solid #89929f;
    text-align: center;
}

.experience-table th {
    padding: 9px 6px;
    color: #20362d;
    background: #edf6f1;
    font-size: 13px;
    font-weight: 800;
}

.experience-table th:first-child,
.experience-table td:first-child {
    width: 46px;
}

.experience-table td {
    height: 54px;
    padding: 0;
}

.experience-table input {
    height: 53px;
    padding: 8px;
    border: 0;
    border-radius: 0;
    text-align: center;
}

.experience-table .row-number {
    color: var(--muted);
    background: #f8fafc;
    font-weight: 800;
}

.form-actions,
.success-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 11px;
    margin-top: 28px;
}

.form-actions button,
.primary-link,
.outline-link,
.form-actions a {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 800;
    text-decoration: none;
}

.form-actions button,
.primary-link {
    border: 0;
    color: #fff;
    background: var(--green);
    box-shadow: 0 8px 20px rgba(22, 112, 74, .2);
    cursor: pointer;
}

.form-actions button:hover,
.primary-link:hover {
    color: #fff;
    background: var(--green-dark);
}

.form-actions a,
.outline-link {
    color: var(--muted);
    border: 1px solid var(--line);
    background: #fff;
}

.error-panel,
.success-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding: 15px 18px;
    border-radius: 9px;
}

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

.success-panel {
    color: #065f46;
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
}

.success-panel > i {
    font-size: 34px;
}

.success-panel h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 800;
}

.success-panel p {
    margin: 0;
}

.website-field {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

@media (max-width: 850px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .application-shell {
        width: min(100% - 18px, 1220px);
        margin: 9px auto;
    }

    .application-card {
        padding: 18px 14px;
        border-radius: 10px;
    }

    .application-head {
        align-items: center;
    }

    .head-icon {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
        font-size: 21px;
    }

    .application-logo-wrap {
        width: min(220px, 75vw);
        height: 118px;
    }

    .application-head p {
        font-size: 12px;
    }

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

    .field-wide {
        grid-column: auto;
    }

    .section-title {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 12px;
    }

    .section-title h2 {
        margin-bottom: 0;
    }

    .form-actions > *,
    .success-actions > * {
        width: 100%;
    }
}
