﻿.box-roles {
    height: auto;
    overflow: hidden;
    opacity: 1;
    transition: height 0.5s ease, opacity 0.5s ease;
}

    .box-roles.roles-collapsed {
        opacity: 0;
        height: 0px;
    }

.container-attachment {
    margin-top: 20px;
    border: 1px solid gainsboro;
    border-radius: 5px;
    padding: 0px;
    background-color: #f9fafb;
    display: flex;
    position: relative;
}

    .container-attachment .div-pic {
        display: inline-block;
        height: 70px;
        margin-left: 10px;
        width: 70px;
        border-end-start-radius: 5px;
        border-start-start-radius: 5px;
        text-align: center;
        align-content: center;
    }

    .container-attachment a {
        position: absolute;
        top: 0;
        width: 100%;
        height: 100%;
        border-radius: 5px;
    }

    .container-attachment .div-pic i {
        font-size: 35px;
        color: red;
    }

    .container-attachment .div-content {
        display: inline-block;
        padding: 10px 0px;
        align-content: center;
        width: 100%;
    }

        .container-attachment .div-content .size {
            color: dimgray;
            font-size: 10px;
        }

    .container-attachment .div-close {
        display: inline-block;
        align-content: start;
        text-align: center;
        padding: 15px;
    }

        .container-attachment .div-close i {
            cursor: pointer;
            padding: 5px;
            transition: 0.5s;
        }

            /*.container-attachment .div-close i:hover {
                color: gray;
            }*/

         /*   .container-attachment .div-close i:active {
                color: dodgerblue;
            }
*/
.upload-box {
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    text-align: center;
    padding: 35px 20px;
    background: #fafbfc;
}

    .upload-box.active {
        outline: 3px dashed #B3413A;
        outline-offset: -3px;
    }

.upload-icon {
    width: 55px;
    height: 55px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 21px;
}

.upload-box h6 {
    margin: 0 0 5px;
    font-weight: 600;
}

.upload-box p {
    margin: 0 0 15px;
    color: #868e96;
    font-size: 13px;
}

.upload-box small {
    display: block;
    margin-top: 10px;
    color: #adb5bd;
    font-size: 11px;
}

.upload-btn {
    cursor: pointer;
}


/* =========================
   FILE LIST
========================= */

.file-list {
    margin-top: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #f1f3f5;
    color: #6c757d;
}

.file-info strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.file-info small {
    color: #868e96;
    font-size: 11px;
}

.file-check {
    color: #198754;
}

@import url('./design-system.css');

:root {
    --brand: var(--brand-red);
    --brand-dark: var(--brand-red-dark);
    --brand-light: #C75F58;
    --ink: #1b1f2a;
    --muted: #6b7280;
    --bg: #f4f5f9;
    --card: #ffffff;
    --line: #e8e9f0;
    --success: #16a34a;
    --danger: #dc2626;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-soft: 0 6px 24px rgba(20, 20, 50, .05);
    --shadow-lift: 0 10px 30px rgba(20, 20, 50, .09);
}

* {
    box-sizing: border-box;
}

.main-content {
    background: var(--bg);
    font-family: var(--font-family-base);
    color: var(--ink);
}

h1, h2, h3, h4, h5, .brand-font {
    font-family: var(--font-family-heading);
}

/* ============ Hero ============ */
.application-page .hero {
    background: linear-gradient(135deg, #ffffff 0%, #fff5f4 100%);
    border-bottom: 1px solid var(--line);
    padding: 42px 0 32px;
    position: relative;
    overflow: hidden;
}

    .application-page .hero::before {
        content: "";
        position: absolute;
        top: -60px;
        right: -60px;
        width: 240px;
        height: 240px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(var(--brand-red-rgb), .10) 0%, rgba(var(--brand-red-rgb), 0) 70%);
    }

    .application-page .hero h1 {
        font-weight: 800;
        font-size: 2.05rem;
        margin-bottom: 6px;
        letter-spacing: -.5px;
    }

    .application-page .hero p {
        color: var(--muted);
        margin-bottom: 0;
        font-size: 1rem;
    }

.badge-soft {
    background: rgba(var(--brand-red-rgb), .09);
    color: var(--brand);
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .74rem;
    letter-spacing: .3px;
    text-transform: uppercase;
}

/* ============ Layout ============ */
.wrap {
    max-width: 1040px;
    margin: 0 auto;
    padding: 34px 16px 90px;
}

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 30px 32px;
    box-shadow: var(--shadow-soft);
    animation: fadeIn .4s ease;
    transition: box-shadow .25s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    position:relative;
}

    .section-heading .icon {
        width: 46px;
        height: 46px;
        border-radius: 13px;
        background: linear-gradient(135deg, var(--brand), var(--brand-dark));
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.15rem;
        box-shadow: 0 6px 14px rgba(var(--brand-red-rgb), .28);
        flex-shrink: 0;
    }

    .section-heading h2 {
        font-size: 1.18rem;
        font-weight: 700;
        margin: 0;
    }

    .section-heading small {
        color: var(--muted);
        font-weight: 500;
    }

.subhead {
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--brand);
    margin: 28px 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .subhead::after {
        content: "";
        flex: 1;
        height: 1px;
        background: var(--line);
    }

/* ============ Fields ============ */
label.field-label {
    font-size: .76rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 6px;
    display: block;
}

.form-control, .form-select {
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 13px;
    font-size: .92rem;
    background: #fbfbfd;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    width: 100%;
}
.item-count {
    padding: 6px 11px;
    background: #f4f4f4;
    border-radius: 20px;
    color: #555;
    font-size: 10px;
    font-weight: 700;
    position:absolute;
    right:0px;
}
    .form-control:focus, .form-select:focus {
        outline: none;
        border-color: var(--brand);
        box-shadow: 0 0 0 4px rgba(var(--brand-red-rgb), .12);
        background: #fff;
    }

    .form-control.is-invalid, .form-select.is-invalid {
        border-color: var(--danger);
        background: #fef2f2;
    }

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

.invalid-feedback {
    display: none;
    color: var(--danger);
    font-size: .76rem;
    margin-top: 5px;
    font-weight: 500;
}

.is-invalid ~ .invalid-feedback {
    display: block;
}

.choice-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.choice-pill {
    border: 1.5px solid var(--line);
    border-radius: 999px;
    padding: 9px 20px;
    font-size: .85rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--muted);
    background: #fbfbfd;
    transition: .18s ease;
    user-select: none;
}

    .choice-pill input {
        display: none;
    }

    .choice-pill:hover {
        border-color: var(--brand-light);
        color: var(--brand);
    }

    .choice-pill.selected {
        background: linear-gradient(135deg, var(--brand), var(--brand-dark));
        border-color: var(--brand);
        color: #fff;
        box-shadow: 0 4px 12px rgba(var(--brand-red-rgb), .25);
    }

/* ============ Photo uploader ============ */
.photo-uploader {
    width: 140px;
    height: 160px;
    border-radius: var(--radius-md);
    border: 2px dashed #d7d9e3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: #fbfbfd;
    color: var(--muted);
    text-align: center;
    font-size: .74rem;
    transition: .2s ease;
}

    .photo-uploader:hover {
        border-color: var(--brand);
        color: var(--brand);
        background: #fff5f4;
    }

    .photo-uploader img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        inset: 0;
    }

    .photo-uploader i {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }

    .photo-uploader input[type=file] {
        position: absolute;
        inset: 0;
        opacity: 0;
        cursor: pointer;
    }

/* ============ Dynamic entry cards ============ */
.entry-card {
    border: 1.5px solid var(--line);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 14px;
    position: relative;
    background: #fbfbfd;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .entry-card:hover {
        border-color: #d9dbe6;
        box-shadow: 0 4px 14px rgba(20, 20, 50, .05);
    }

.add-entry-btn {
    border: 1.5px dashed var(--brand);
    color: var(--brand);
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: .85rem;
    font-weight: 700;
    width: 100%;
    transition: .18s ease;
}

    .add-entry-btn:hover {
        background: rgba(var(--brand-red-rgb), .06);
        border-color: var(--brand-dark);
    }

/* ============ Agreement box ============ */
.agree-box {
    background: #fff7f6;
    border: 1.5px solid #ffd9d5;
    border-radius: var(--radius-md);
    padding: 18px 20px;
    font-size: .87rem;
    color: #5a3a37;
    line-height: 1.55;
}

/* ============ Buttons ============ */
.btn-brand {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border: none;
    color: #fff;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 20px rgba(var(--brand-red-rgb), .3);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-brand:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 12px 26px rgba(var(--brand-red-rgb), .38);
        color: #fff;
    }

    .btn-brand:disabled {
        opacity: .7;
        cursor: not-allowed;
        transform: none;
    }

.btn-ghost {
    background: #fff;
    border: 1.5px solid var(--line);
    color: var(--ink);
    font-weight: 600;
    padding: 10px 26px;
    border-radius: var(--radius-sm);
}

    .btn-ghost:hover {
        background: #f3f4f6;
    }

/* Spinner for submit loading state */
.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2.5px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============ Submit status banner ============ */
.submit-status {
    display: none;
    align-items: center;
    gap: 10px;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: 18px;
    animation: fadeIn .3s ease;
}

    .submit-status.show {
        display: flex;
    }

    .submit-status.success {
        background: #ecfdf3;
        border: 1.5px solid #a7f3d0;
        color: #15803d;
    }

    .submit-status.error {
        background: #fef2f2;
        border: 1.5px solid #fecaca;
        color: #b91c1c;
    }

.summary-item {
    font-size: .85rem;
    padding: 6px 0;
    border-bottom: 1px dashed var(--line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

    .summary-item span:first-child {
        color: var(--muted);
    }

    .summary-item span:last-child {
        font-weight: 600;
        text-align: right;
    }

@media (max-width: 768px) {
    .panel {
        padding: 22px 18px;
    }

    .application-page .hero h1 {
        font-size: 1.5rem;
    }
}
