/* ==========================================================================
   Public admission application form (/application)
   ========================================================================== */

:root {
    --ap-line: #e2eef1;
    --ap-ink: #10263d;
    --ap-muted: #6c8698;
    --ap-primary: #0b6d72;
    --ap-primary-2: #0C92A5;
}

.ap-form { display: flex; flex-direction: column; gap: 20px; }

/* ---- Card ---- */
.ap-card {
    background: #fff;
    border: 1px solid var(--ap-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(16, 38, 61, .05);
}

.ap-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--ap-line);
    background: linear-gradient(135deg, #f6fbfc, #eef7f9);
}

.ap-card-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ap-ink);
    font-family: 'Noto Sans Bengali', sans-serif;
}

.ap-card-head p {
    margin: 3px 0 0;
    font-size: 13px;
    color: var(--ap-muted);
}

.ap-step {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ap-primary), var(--ap-primary-2));
    color: #fff;
    font-weight: 700;
    font-size: 15px;
}

.ap-step.green  { background: linear-gradient(135deg, #17916a, #1eab7d); }
.ap-step.orange { background: linear-gradient(135deg, #d9860c, #f0a020); }
.ap-step.blue   { background: linear-gradient(135deg, #2a6ea8, #3f8ecd); }

.ap-card-body { padding: 22px; }

/* ---- Fields ---- */
.ap-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.ap-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 16px;
}

.ap-field { display: flex; flex-direction: column; }

.ap-field label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ap-ink);
    margin-bottom: 6px;
    font-family: 'Noto Sans Bengali', sans-serif;
}

.ap-field label span { color: #c9302c; }

.ap-field input,
.ap-field select,
.ap-field textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid #d8e6ea;
    border-radius: 9px;
    background: #fff;
    color: var(--ap-ink);
    font-size: 14.5px;
    font-family: 'Noto Sans Bengali', sans-serif;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.ap-field textarea { resize: vertical; }

.ap-field input:focus,
.ap-field select:focus,
.ap-field textarea:focus {
    outline: none;
    border-color: var(--ap-primary-2);
    box-shadow: 0 0 0 3px rgba(12, 146, 165, .14);
}

.ap-field small {
    margin-top: 5px;
    font-size: 12px;
    color: var(--ap-muted);
}

.ap-static {
    padding: 10px 13px;
    border-radius: 9px;
    background: #f4f9fb;
    border: 1px dashed #cfe0e6;
    font-weight: 700;
    color: var(--ap-primary);
}

.ap-subhead {
    margin: 22px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ap-line);
    font-size: 14.5px;
    font-weight: 700;
    color: var(--ap-primary);
    font-family: 'Noto Sans Bengali', sans-serif;
}

.ap-subhead:first-child { margin-top: 0; }

/* ---- Courses ---- */
.ap-courses {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--ap-line);
}

.ap-courses-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.ap-courses-head h4 {
    margin: 0;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--ap-ink);
    font-family: 'Noto Sans Bengali', sans-serif;
}

.ap-hint {
    margin: 0 0 14px;
    font-size: 12.8px;
    color: var(--ap-muted);
}

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

.ap-table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.ap-table th {
    text-align: left;
    padding: 0 10px 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ap-muted);
    font-family: 'Noto Sans Bengali', sans-serif;
}

.ap-table td {
    padding: 8px 6px;
    background: #fbfdfe;
    border-top: 1px solid var(--ap-line);
    border-bottom: 1px solid var(--ap-line);
    vertical-align: middle;
}

.ap-table td:first-child { border-left: 1px solid var(--ap-line); border-radius: 9px 0 0 9px; }
.ap-table td:last-child  { border-right: 1px solid var(--ap-line); border-radius: 0 9px 9px 0; }

.ap-table select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d8e6ea;
    border-radius: 8px;
    background: #fff;
    font-size: 13.5px;
    font-family: 'Noto Sans Bengali', sans-serif;
}

.ap-table select:disabled { background: #f1f5f7; color: #9fb1bd; }

.ap-fee { font-weight: 700; color: var(--ap-primary); font-size: 14px; }

.ap-remove {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #f0c2c0;
    background: #fff;
    color: #c9302c;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .18s ease;
}

.ap-remove:hover { background: #fdf3f3; }

.ap-total {
    margin-top: 12px;
    text-align: right;
    font-size: 14.5px;
    color: var(--ap-muted);
    font-family: 'Noto Sans Bengali', sans-serif;
}

.ap-total strong { color: var(--ap-primary); font-size: 17px; }

/* ---- Buttons ---- */
.ap-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    font-family: 'Noto Sans Bengali', sans-serif;
    transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.ap-btn-primary {
    background: linear-gradient(135deg, var(--ap-primary), var(--ap-primary-2));
    color: #fff;
    box-shadow: 0 4px 12px rgba(11, 109, 114, .22);
}

.ap-btn-primary:hover { color: #fff; transform: translateY(-1px); }
.ap-btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.ap-btn-ghost {
    background: #fff;
    border-color: #d8e6ea;
    color: var(--ap-ink);
}

.ap-btn-ghost:hover { border-color: var(--ap-primary-2); color: var(--ap-primary); }

.ap-btn-sm { padding: 8px 14px; font-size: 13.5px; }
.ap-btn-lg { padding: 14px 30px; font-size: 16px; }

/* ---- Submit ---- */
.ap-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 22px;
    background: #fff;
    border: 1px solid var(--ap-line);
    border-radius: 14px;
}

.ap-submit p {
    margin: 0;
    font-size: 13.5px;
    color: var(--ap-muted);
}

.ap-submit p i { color: var(--ap-primary); margin-right: 5px; }

/* ---- Alerts ---- */
.ap-alert {
    display: flex;
    gap: 12px;
    padding: 15px 18px;
    border-radius: 11px;
    margin-bottom: 20px;
    font-size: 14px;
    font-family: 'Noto Sans Bengali', sans-serif;
}

.ap-alert i { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.ap-alert strong { display: block; margin-bottom: 3px; }
.ap-alert ul { margin: 6px 0 0; padding-left: 18px; }
.ap-alert li { margin-bottom: 3px; }

.ap-alert-error { background: #fdf1f1; color: #9a3833; border: 1px solid #f0c2c0; }

/* ---- Success ---- */
.ap-success {
    max-width: 620px;
    margin: 0 auto;
    padding: 42px 32px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--ap-line);
    border-radius: 16px;
    box-shadow: 0 4px 22px rgba(16, 38, 61, .07);
}

.ap-success-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #17916a, #1eab7d);
    color: #fff;
    font-size: 38px;
    box-shadow: 0 8px 22px rgba(23, 145, 106, .3);
}

.ap-success h2 {
    font-size: 23px;
    font-weight: 700;
    color: var(--ap-ink);
    margin-bottom: 10px;
    font-family: 'Noto Sans Bengali', sans-serif;
}

.ap-success p { font-size: 14.5px; color: var(--ap-muted); line-height: 1.85; }

.ap-success-meta {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 24px 0;
}

.ap-success-meta div {
    padding: 14px 26px;
    border-radius: 12px;
    background: #f4f9fb;
    border: 1px solid var(--ap-line);
}

.ap-success-meta span { display: block; font-size: 12.5px; color: var(--ap-muted); margin-bottom: 3px; }
.ap-success-meta strong { font-size: 21px; color: var(--ap-primary); }

.ap-success-note {
    padding: 12px 16px;
    border-radius: 10px;
    background: #fff8ec;
    color: #9a6408;
    font-size: 13px;
}

.ap-success-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}

@media (max-width: 575px) {
    .ap-card-body { padding: 16px; }
    .ap-card-head { padding: 15px 16px; }
    .ap-submit { padding: 16px; }
    .ap-success { padding: 30px 20px; }
}

/* ---- Field-level errors ---- */
.ap-field input.ap-invalid,
.ap-field select.ap-invalid,
.ap-field textarea.ap-invalid {
    border-color: #d9534f;
    background: #fdf7f7;
}

.ap-field input.ap-invalid:focus,
.ap-field select.ap-invalid:focus,
.ap-field textarea.ap-invalid:focus {
    box-shadow: 0 0 0 3px rgba(217, 83, 79, .14);
}

.ap-field-error {
    display: block;
    margin-top: 5px;
    font-size: 12.5px;
    font-style: normal;
    font-weight: 600;
    color: #c9302c;
    font-family: 'Noto Sans Bengali', sans-serif;
}
