/* =====================================================
   Global
===================================================== */
* {
    box-sizing: border-box
}

body {
    margin: 0;
    padding: 12px;
    background: #f3f4f6;
    font-family: Arial,Helvetica,sans-serif;
    font-size: 16px;
    color: #1f2937;
}

.container {
    margin: 16px auto;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0,0,0,.10);
}

.title {
    margin: 0 0 24px;
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #0d6efd;
}

.hide {
    display: none
}

.success {
    color: #16a34a;
    font-weight: 600
}

.error {
    color: #dc2626;
    font-weight: 600
}
.w-100 {
    width: 100%;
}

/* =====================================================
   Floating Input (giữ lại để dùng sau)
===================================================== */
.form-group {
    position: relative;
    width: 100%;
    margin: 20px 0;
}

    .form-group input,
    .form-group select {
        width: 100%;
        padding: 18px 14px 10px;
        font-size: 17px;
        border: 1px solid #d1d5db;
        border-radius: 10px;
        outline: none;
        background: #fff;
        transition: .2s;
    }

        .form-group input:focus,
        .form-group select:focus {
            border-color: #0d6efd;
            box-shadow: 0 0 0 3px rgba(13,110,253,.12);
        }

    .form-group label {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        transition: .2s;
        background: #fff;
        padding: 0 4px;
        color: #6b7280;
        pointer-events: none;
    }

    .form-group input:focus + label,
    .form-group input:not(:placeholder-shown) + label,
    .form-group select:focus + label,
    .form-group select:valid + label {
        top: 0px;
        left: 10px;
        font-size: 12px;
        color: #0d6efd;
        font-weight: 600;
    }
    .form-group.required label::after {
        content: " *";
        color: #dc2626;
        font-weight: 700;
    }

.form-button {
    display: flex;
    align-items: flex-end;
}

    .form-button .btn-primary {
        width: 100%;
        height: 56px;
        margin: 20px 0;
    }
/* =====================================================
   Button
===================================================== */
.btn-primary {
    width: 100%;
    height: 56px;
    margin: 20px 0;
    margin-top: 24px;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #0d6efd;
    color: #fff;
    cursor: pointer;
    transition: .2s;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-primary:hover:not(:disabled) {
        background: #0b5ed7;
    }

    .btn-primary:disabled {
        background: #9ca3af;
        cursor: not-allowed;
        opacity: .85;
    }

    .btn-primary.loading .spinner {
        display: inline-block;
    }

.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* =====================================================
   Image Modal
===================================================== */
#imageModal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 16px;
}

    #imageModal img {
        max-width: 100%;
        max-height: 90vh;
    }

.close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: 26px;
    cursor: pointer;
}

/* =====================================================
   Responsive
===================================================== */
@media (max-width:768px) {

    body {
        padding: 10px;
    }

    .container {
        margin: 10px auto;
        padding: 18px;
        border-radius: 14px;
    }

    .title {
        font-size: 28px;
    }

    .form-group {
        position: relative;
    }

    .form-group input,
    .form-group select {
        width: 100%;
        height: 56px;
        padding: 20px 14px 6px;
        font-size: 16px;
    }

    .form-group label {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        transition: .2s;
        background: #fff;
        padding: 0 4px;
        color: #6b7280;
        pointer-events: none;
    }

    .form-group input:focus + label,
    .form-group input:not(:placeholder-shown) + label,
    .form-group select:focus + label,
    .form-group select:valid + label {
        top: 0;
        transform: translateY(-50%);
        font-size: 12px;
        color: #0d6efd;
        font-weight: 600;
    }

    .info-value {
        font-size: 19px;
    }

    .btn-primary {
        min-height: 56px;
        font-size: 20px;
    }
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #0d6efd;
    color: #fff;
    text-decoration: none;
    transition: .2s;
}

    .btn-icon:hover {
        background: #0b5ed7;
    }

.field-validation {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #dc2626;
}
