/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
}


body {
    font-family: "Inter", sans-serif;
    background: #f5f7fb;
    color: #1f2937;
    min-height: 100vh;
}


/* =========================================================
   PAGE
========================================================= */

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* =========================================================
   HEADER
========================================================= */

.top-header {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 18px 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    position: sticky;
    top: 0;
    z-index: 100;
}


.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}


.brand-icon {
    width: 48px;
    height: 48px;

    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eef2ff;
    color: #4f46e5;

    font-size: 22px;
}


.brand h1 {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}


.brand p {
    margin-top: 3px;
    font-size: 12px;
    color: #6b7280;
}


/* =========================================================
   ADMIN BUTTON
========================================================= */

.admin-button {
    border: 1px solid #e5e7eb;
    background: #ffffff;

    color: #374151;

    min-height: 42px;
    padding: 0 16px;

    border-radius: 10px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.admin-button:hover {
    background: #f9fafb;
    border-color: #c7d2fe;
    color: #4f46e5;
}


.admin-button:active {
    transform: scale(0.97);
}


/* =========================================================
   MAIN
========================================================= */

.main-container {
    width: min(1100px, calc(100% - 40px));
    margin: 35px auto;
    flex: 1;
}


/* =========================================================
   HERO
========================================================= */

.hero-section {
    display: flex;
    align-items: center;
    gap: 18px;

    margin-bottom: 24px;
}


.hero-icon {
    width: 58px;
    height: 58px;

    flex-shrink: 0;

    border-radius: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eef2ff;
    color: #4f46e5;

    font-size: 24px;
}


.hero-section h2 {
    font-size: 25px;
    font-weight: 800;
    color: #111827;
}


.hero-section p {
    margin-top: 5px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
}


/* =========================================================
   FORM CARD
========================================================= */

.form-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;

    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);

    overflow: hidden;
}


.form-header {
    padding: 22px 25px;

    border-bottom: 1px solid #edf0f4;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}


.form-header h3 {
    font-size: 17px;
    font-weight: 800;
    color: #111827;
}


.form-header p {
    margin-top: 5px;
    font-size: 12px;
    color: #6b7280;
}


.form-header p span,
.form-group label span {
    color: #ef4444;
    font-weight: 700;
}


/* =========================================================
   SECURE BADGE
========================================================= */

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 7px 11px;

    border-radius: 999px;

    background: #ecfdf5;
    color: #047857;

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   FORM
========================================================= */

#quantumForm {
    padding: 25px;
}


.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}


.form-group {
    min-width: 0;
}


.full-width {
    grid-column: 1 / -1;
}


/* =========================================================
   LABEL
========================================================= */

.form-group label {
    display: flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 8px;

    font-size: 13px;
    font-weight: 700;

    color: #374151;
}


.form-group label i {
    color: #6366f1;
    font-size: 12px;
}


/* =========================================================
   INPUT
========================================================= */

.input-wrapper {
    position: relative;
}


.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;

    transform: translateY(-50%);

    color: #9ca3af;
    font-size: 14px;

    pointer-events: none;

    z-index: 2;
}


input,
textarea,
select {
    width: 100%;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    background: #ffffff;
    color: #111827;

    font-family: inherit;
    font-size: 13px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


input {
    height: 46px;
    padding: 0 14px 0 42px;
}


textarea {
    padding: 13px 14px;
    resize: vertical;
    min-height: 105px;
}


input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}


input:focus,
textarea:focus,
select:focus {
    border-color: #6366f1;

    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.10);
}


/* =========================================================
   STORE SEARCHABLE DROPDOWN
========================================================= */

.store-wrapper {
    position: relative;
}


/* STORE INPUT */

#store {
    width: 100%;
    height: 46px;

    padding: 0 42px 0 42px;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    background-color: #ffffff;

    color: #111827;

    font-family: inherit;
    font-size: 13px;
    font-weight: 400;

    outline: none;

    cursor: text;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


#store::placeholder {
    color: #9ca3af;
}


#store:focus {
    border-color: #6366f1;

    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.10);
}


/* STORE ARROW BUTTON */

.store-dropdown-btn {
    position: absolute;

    right: 7px;
    top: 50%;

    width: 32px;
    height: 32px;

    transform: translateY(-50%);

    border: none;
    border-radius: 8px;

    background: transparent;

    color: #6b7280;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    z-index: 5;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


.store-dropdown-btn:hover {
    background: #f3f4f6;
    color: #374151;
}


.store-dropdown-btn i {
    font-size: 11px;

    transition:
        transform 0.2s ease;
}


.store-wrapper.open .store-dropdown-btn i {
    transform: rotate(180deg);
}


/* STORE SEARCH DROPDOWN */

.store-dropdown {
    position: absolute;

    top: calc(100% + 6px);
    left: 0;
    right: 0;

    background: #ffffff;

    border: 1px solid #d1d5db;
    border-radius: 12px;

    box-shadow:
        0 12px 30px rgba(15, 23, 42, 0.14);

    overflow: hidden;

    z-index: 1000;

    display: none;
}


.store-wrapper.open .store-dropdown {
    display: block;
}


/* STORE SEARCH HEADER */

.store-search-header {
    padding: 10px;

    border-bottom: 1px solid #edf0f4;

    background: #ffffff;
}


.store-search-box {
    position: relative;
}


.store-search-box i {
    position: absolute;

    left: 12px;
    top: 50%;

    transform: translateY(-50%);

    color: #9ca3af;

    font-size: 12px;

    pointer-events: none;
}


#storeSearch {
    width: 100%;
    height: 38px;

    padding: 0 12px 0 34px;

    border: 1px solid #d1d5db;
    border-radius: 8px;

    background: #f9fafb;

    color: #111827;

    font-family: inherit;
    font-size: 12px;

    outline: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


#storeSearch:focus {
    background: #ffffff;

    border-color: #6366f1;

    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.08);
}


#storeSearch::placeholder {
    color: #9ca3af;
}


/* STORE LIST */

.store-list {
    max-height: 280px;

    overflow-y: auto;

    padding: 5px;
}


.store-list::-webkit-scrollbar {
    width: 7px;
}


.store-list::-webkit-scrollbar-track {
    background: #f9fafb;
}


.store-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}


.store-option {
    width: 100%;

    border: none;
    border-radius: 8px;

    background: transparent;

    color: #374151;

    padding: 10px 11px;

    text-align: left;

    font-family: inherit;
    font-size: 12px;
    font-weight: 500;

    cursor: pointer;

    line-height: 1.4;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}


.store-option:hover,
.store-option.active {
    background: #eef2ff;
    color: #4338ca;
}


.store-empty {
    padding: 16px 12px;

    text-align: center;

    color: #9ca3af;

    font-size: 12px;
}


.store-loading {
    padding: 16px 12px;

    text-align: center;

    color: #9ca3af;

    font-size: 12px;
}


/* =========================================================
   CHARACTER COUNT
========================================================= */

.character-count {
    text-align: right;
    margin-top: 5px;

    color: #9ca3af;
    font-size: 11px;
}


/* =========================================================
   FORM ACTIONS
========================================================= */

.form-actions {
    grid-column: 1 / -1;

    display: flex;
    justify-content: center;
    gap: 10px;

    margin-top: 25px;
    padding-top: 20px;

    border-top: 1px solid #edf0f4;
}


.btn {
    min-height: 44px;

    padding: 0 18px;

    border: 1px solid transparent;
    border-radius: 10px;

    font-family: inherit;
    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        opacity 0.2s ease;
}


.btn:active {
    transform: scale(0.97);
}


.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* PRIMARY */

.btn-primary {
    background: #4f46e5;
    color: #ffffff;
}


.btn-primary:hover {
    background: #4338ca;
}


/* SECONDARY */

.btn-secondary {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}


.btn-secondary:hover {
    background: #f9fafb;
}


/* DANGER */

.btn-danger {
    background: #ef4444;
    color: #ffffff;
}


.btn-danger:hover {
    background: #dc2626;
}


/* =========================================================
   INFO CARD
========================================================= */

.info-card {
    margin-top: 18px;

    padding: 16px 18px;

    display: flex;
    align-items: flex-start;
    gap: 13px;

    border: 1px solid #dbeafe;
    border-radius: 14px;

    background: #eff6ff;
}


.info-icon {
    color: #2563eb;
    font-size: 18px;
    padding-top: 1px;
}


.info-card strong {
    font-size: 13px;
    color: #1e3a8a;
}


.info-card p {
    margin-top: 4px;

    color: #475569;

    font-size: 12px;
    line-height: 1.6;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    text-align: center;

    padding: 22px;

    color: #9ca3af;

    font-size: 11px;
}


/* =========================================================
   TOAST
========================================================= */

.toast-container {
    position: fixed;

    top: 20px;
    right: 20px;

    z-index: 10000;

    display: flex;
    flex-direction: column;
    gap: 10px;

    width: min(380px, calc(100% - 40px));
}


.toast {
    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    padding: 14px 16px;

    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.15);

    font-size: 13px;
}


/* =========================================================
   MODAL
========================================================= */

.modal-overlay {
    position: fixed;

    inset: 0;

    z-index: 9000;

    background: rgba(15, 23, 42, 0.55);

    backdrop-filter: blur(4px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    overflow-y: auto;
}


.modal-overlay.hidden {
    display: none;
}


.modal-box {
    width: min(460px, 100%);

    background: #ffffff;

    border-radius: 18px;

    padding: 28px;

    box-shadow:
        0 25px 60px rgba(15, 23, 42, 0.22);

    text-align: center;

    animation: modalIn 0.2s ease-out;
}


@keyframes modalIn {

    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}


/* =========================================================
   MODAL ICON
========================================================= */

.modal-icon {
    width: 58px;
    height: 58px;

    margin: 0 auto 16px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
}


.modal-icon.warning {
    background: #fff7ed;
    color: #ea580c;
}


.modal-icon.consent {
    background: #eef2ff;
    color: #4f46e5;
}


.modal-icon.admin {
    background: #ecfdf5;
    color: #047857;
}


/* =========================================================
   MODAL TEXT
========================================================= */

.modal-box h3 {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
}


.modal-box > p {
    margin-top: 8px;

    color: #6b7280;

    font-size: 13px;
    line-height: 1.6;
}


/* =========================================================
   RESET MODAL
========================================================= */

.modal-box .modal-actions {
    margin-top: 22px;

    display: flex;
    justify-content: center;
    gap: 10px;
}


/* =========================================================
   CONSENT MODAL
========================================================= */

.consent-modal {
    width: min(560px, 100%);
}


.consent-content {
    margin-top: 18px;

    padding: 17px;

    background: #f8fafc;

    border: 1px solid #e5e7eb;

    border-radius: 12px;

    text-align: left;
}


.consent-content p {
    color: #374151;

    font-size: 12px;
    line-height: 1.75;
}


.privacy-link-text {
    margin-top: 14px;

    padding-top: 13px;

    border-top: 1px solid #e5e7eb;
}


.privacy-link-text a {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    margin-top: 5px;

    color: #4f46e5;

    font-weight: 700;

    text-decoration: none;
}


.privacy-link-text a:hover {
    text-decoration: underline;
}


.consent-actions {
    margin-top: 20px;

    display: flex;
    justify-content: flex-end;
    gap: 10px;
}


/* =========================================================
   ADMIN LOGIN
========================================================= */

.admin-modal {
    width: min(400px, 100%);
}


.admin-pin-wrapper {
    position: relative;

    margin-top: 20px;
}


.admin-pin-wrapper > i {
    position: absolute;

    left: 14px;
    top: 50%;

    transform: translateY(-50%);

    color: #9ca3af;
}


.admin-pin-wrapper input {
    padding-left: 42px;
    text-align: center;
    letter-spacing: 3px;
    font-weight: 700;
}


.admin-login-error {
    margin-top: 10px;

    padding: 9px 12px;

    border-radius: 8px;

    background: #fef2f2;

    color: #dc2626;

    font-size: 12px;
    font-weight: 600;
}


.admin-login-error.hidden {
    display: none;
}


.admin-modal .modal-actions {
    margin-top: 18px;
}


/* =========================================================
   HIDDEN
========================================================= */

.hidden {
    display: none !important;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .top-header {
        padding: 14px 16px;
    }


    .brand-icon {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 19px;
    }


    .brand h1 {
        font-size: 17px;
    }


    .brand p {
        font-size: 10px;
    }


    .admin-button {
        width: 42px;
        padding: 0;
        border-radius: 10px;
    }


    .admin-button span {
        display: none;
    }


    .main-container {
        width: min(100% - 24px, 1100px);
        margin: 24px auto;
    }


    .hero-section {
        gap: 12px;
    }


    .hero-icon {
        width: 48px;
        height: 48px;
        border-radius: 13px;
        font-size: 20px;
    }


    .hero-section h2 {
        font-size: 20px;
    }


    .hero-section p {
        font-size: 12px;
    }


    .form-header {
        padding: 18px;
    }


    #quantumForm {
        padding: 18px;
    }


    .form-grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }


    .full-width {
        grid-column: auto;
    }


    .form-actions {
        flex-direction: column-reverse;
    }


    .form-actions .btn {
        width: 100%;
    }


    .info-card {
        padding: 14px;
    }


    .modal-box {
        padding: 22px 18px;
        border-radius: 16px;
    }


    .consent-content {
        max-height: 48vh;
        overflow-y: auto;
    }


    .consent-actions {
        flex-direction: column-reverse;
    }


    .consent-actions .btn {
        width: 100%;
    }


    .modal-box .modal-actions {
        flex-direction: column-reverse;
    }


    .modal-box .modal-actions .btn {
        width: 100%;
    }


    .store-list {
        max-height: 240px;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 400px) {

    .brand {
        gap: 9px;
    }


    .brand-icon {
        width: 38px;
        height: 38px;
    }


    .brand h1 {
        font-size: 15px;
    }


    .brand p {
        display: none;
    }


    .main-container {
        width: calc(100% - 18px);
    }

}
/* =========================================================
   RECEIPT PHOTO UPLOAD
========================================================= */

#receiptPhoto {
    width: 100%;
    height: auto;

    min-height: 52px;

    padding: 8px 10px;

    border: 1px solid #d1d5db;
    border-radius: 10px;

    background: #f8fafc;
    color: #4b5563;

    font-family: inherit;
    font-size: 13px;

    cursor: pointer;

    outline: none;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}


/* HILANGKAN EFEK INPUT UMUM */

#receiptPhoto:focus {
    border-color: #6366f1;

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.10);
}


/* TOMBOL CHOOSE FILE */

#receiptPhoto::file-selector-button {
    height: 36px;

    margin-right: 12px;

    padding: 0 14px;

    border: 0;
    border-radius: 8px;

    background: #eef2ff;
    color: #4f46e5;

    font-family: inherit;
    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


#receiptPhoto::file-selector-button:hover {
    background: #e0e7ff;
    color: #4338ca;
}


/* HOVER AREA */

#receiptPhoto:hover {
    border-color: #a5b4fc;
    background: #ffffff;
}


/* KETERANGAN */

#receiptPhoto + small {
    display: block;

    margin-top: 8px;

    color: #6b7280;

    font-size: 11px;
    line-height: 1.5;
}


/* =========================================================
   MOBILE RECEIPT PHOTO
========================================================= */

@media (max-width: 700px) {

    #receiptPhoto {
        min-height: 52px;

        padding: 7px 8px;

        font-size: 12px;
    }


    #receiptPhoto::file-selector-button {
        height: 36px;

        margin-right: 9px;

        padding: 0 11px;

        font-size: 11px;
    }

}
.camera-icon {
    font-size: 40px;
}