* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    min-height: 100vh;
}

/* Login container */

.login-container {
    min-height: 100vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;
}

/* Login box */

.login-box {
    width: 400px;

    background: white;

    padding: 40px;

    border-radius: 15px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);

    text-align: center;
}

/* Logo */

.logo {
    font-size: 50px;
    margin-bottom: 10px;
}

.login-box h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.subtitle {
    color: #777;
    margin-bottom: 30px;
}

/* Form */

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;

    padding: 12px;

    border: 1px solid #d5d9dd;

    border-radius: 8px;

    font-size: 15px;

    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #4f46e5;
}

/* Login button */

.login-btn {
    width: 100%;

    padding: 13px;

    border: none;

    border-radius: 8px;

    background: #4f46e5;

    color: white;

    font-size: 16px;

    font-weight: bold;

    cursor: pointer;
}

.login-btn:hover {
    background: #4338ca;
}

/* Login message */

#loginMessage {
    margin-top: 20px;

    font-size: 14px;
}   

/* ==============================
   DASHBOARD
================================ */

.dashboard-header {
    background: white;

    height: 70px;

    padding: 0 40px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom: 1px solid #e5e7eb;
}

.brand {
    font-size: 20px;

    font-weight: bold;
}

.user-section {
    display: flex;

    align-items: center;

    gap: 15px;
}

.user-section button {
    padding: 8px 15px;

    border: none;

    border-radius: 7px;

    background: #ef4444;

    color: white;

    cursor: pointer;
}

.dashboard-container {
    max-width: 1200px;

    margin: auto;

    padding: 40px 25px;
}

.welcome-section {
    margin-bottom: 30px;
}

.welcome-section h1 {
    margin-bottom: 8px;
}

.welcome-section p {
    color: #6b7280;
}

/* ==============================
   FORM PAGES
================================ */

.form-container {
    width: min(100% - 30px, 1000px);

    margin: 0 auto;

    padding: 40px 0;
}

.page-title {
    margin-bottom: 30px;
}

.page-title h1 {
    margin-bottom: 8px;
}

.page-title p {
    color: #6b7280;

    line-height: 1.5;
}


/* Form sections */

.form-section {
    background: white;

    padding: clamp(20px, 4vw, 35px);

    border-radius: 14px;

    margin-bottom: 25px;

    box-shadow:
        0 4px 15px rgba(0,0,0,0.06);
}

.form-section h2 {
    margin-bottom: 20px;
}

.section-description {
    color: #6b7280;

    font-size: 14px;

    line-height: 1.5;

    margin-top: -10px;

    margin-bottom: 20px;
}


/* Form grid */

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}

.full-width {
    grid-column: 1 / -1;
}


/* Inputs */

.form-group {
    display: flex;

    flex-direction: column;

    gap: 8px;
}

.form-group label {
    font-weight: 600;

    font-size: 14px;
}

.optional {
    color: #9ca3af;

    font-weight: normal;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    padding: 12px 14px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    font-size: 15px;

    font-family: inherit;

    outline: none;

    background: white;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4f46e5;

    box-shadow:
        0 0 0 3px rgba(79,70,229,0.1);
}


/* Section title */

.section-title-row {
    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    margin-bottom: 20px;
}

.select-all-btn {
    padding: 9px 15px;

    border: 1px solid #4f46e5;

    background: white;

    color: #4f46e5;

    border-radius: 7px;

    cursor: pointer;

    white-space: nowrap;
}


/* Person rows */

.person-row {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 15px;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    margin-bottom: 12px;
}

.person-check {
    display: flex;

    align-items: center;

    gap: 10px;

    font-weight: 600;
}

.person-check input {
    width: 18px;

    height: 18px;

    cursor: pointer;
}

.person-check label {
    cursor: pointer;
}

.person-amount-input {
    display: flex;

    align-items: center;

    width: min(180px, 45%);
}

.person-amount-input span {
    padding: 11px 10px;

    background: #f3f4f6;

    border: 1px solid #d1d5db;

    border-right: none;

    border-radius: 8px 0 0 8px;

    color: #6b7280;
}

.person-amount-input input {
    width: 100%;

    padding: 11px;

    border: 1px solid #d1d5db;

    border-radius: 0 8px 8px 0;

    outline: none;

    font-size: 15px;
}

.person-amount-input input:disabled {
    background: #f3f4f6;

    cursor: not-allowed;
}


/* Amount summary */

.amount-summary {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 15px;

    margin-top: 25px;

    padding-top: 25px;

    border-top: 1px solid #e5e7eb;
}

.amount-summary > div {
    background: #f9fafb;

    padding: 18px;

    border-radius: 10px;

    text-align: center;
}

.amount-summary span {
    display: block;

    color: #6b7280;

    font-size: 13px;

    margin-bottom: 7px;
}

.amount-summary strong {
    font-size: 20px;
}


/* Messages */

.form-message {
    margin-top: 15px;

    font-size: 14px;

    font-weight: 600;
}

.form-message.success {
    color: #16a34a;
}

.form-message.warning {
    color: #d97706;
}

.form-message.error {
    color: #dc2626;
}


/* Buttons */

.form-actions {
    display: flex;

    justify-content: flex-end;

    gap: 12px;

    margin-bottom: 40px;
}

.cancel-btn,
.save-btn {
    padding: 12px 24px;

    border-radius: 8px;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;
}

.cancel-btn {
    border: 1px solid #d1d5db;

    background: white;

    color: #374151;
}

.save-btn {
    border: none;

    background: #4f46e5;

    color: white;
}

.save-btn:hover {
    background: #4338ca;
}


/* ==============================
   MOBILE
================================ */

@media (max-width: 700px) {

    .dashboard-header {
        height: auto;

        min-height: 65px;

        padding: 12px 15px;

        gap: 10px;
    }

    .brand {
        font-size: 17px;
    }

    .user-section {
        gap: 8px;

        font-size: 13px;
    }

    .user-section button {
        padding: 7px 10px;
    }


    .form-container {
        width: min(100% - 20px, 1000px);

        padding-top: 25px;
    }


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

    .full-width {
        grid-column: auto;
    }


    .section-title-row {
        flex-direction: column;
    }

    .select-all-btn {
        width: 100%;
    }


    .person-row {
        padding: 12px;

        gap: 12px;
    }

    .person-amount-input {
        width: 45%;
    }


    .amount-summary {
        grid-template-columns: 1fr;
    }


    .form-actions {
        flex-direction: column-reverse;
    }

    .cancel-btn,
    .save-btn {
        width: 100%;

        min-height: 46px;
    }

}


/* Small phones */

@media (max-width: 400px) {

    .dashboard-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .user-section {
        width: 100%;

        justify-content: space-between;
    }

    .page-title h1 {
        font-size: 25px;
    }

    .form-section {
        padding: 17px;
    }

    .person-row {
        align-items: flex-start;

        flex-direction: column;
    }

    .person-amount-input {
        width: 100%;
    }

}


/* Summary */

.summary-cards {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 20px;

    margin-bottom: 40px;
}

.summary-card {
    background: white;

    padding: 25px;

    border-radius: 12px;

    display: flex;

    align-items: center;

    gap: 18px;

    box-shadow:
        0 4px 15px rgba(0,0,0,0.06);
}

.card-icon {
    font-size: 30px;
}

.summary-card p {
    color: #6b7280;

    margin-bottom: 5px;
}

.summary-card h2 {
    font-size: 24px;
}


/* Menu */

.dashboard-menu {
    margin-bottom: 40px;
}

.dashboard-menu > h2 {
    margin-bottom: 20px;
}

.menu-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}

.menu-card {
    position: relative;

    background: white;

    padding: 25px;

    border-radius: 12px;

    text-decoration: none;

    color: #111827;

    box-shadow:
        0 4px 15px rgba(0,0,0,0.06);

    transition: 0.2s;
}

.menu-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 8px 20px rgba(0,0,0,0.1);
}

.menu-icon {
    font-size: 32px;

    margin-bottom: 15px;
}

.menu-card h3 {
    margin-bottom: 8px;
}

.menu-card p {
    color: #6b7280;

    line-height: 1.5;
}


/* Request badge */

.request-badge {
    position: absolute;

    top: 15px;

    right: 15px;

    min-width: 25px;

    height: 25px;

    padding: 4px 7px;

    background: #ef4444;

    color: white;

    border-radius: 20px;

    text-align: center;

    font-size: 12px;

    font-weight: bold;
}


/* Transactions */

.transactions-section {
    background: white;

    padding: 25px;

    border-radius: 12px;

    box-shadow:
        0 4px 15px rgba(0,0,0,0.06);
}

.section-header {
    display: flex;

    justify-content: space-between;

    align-items: center;

    margin-bottom: 25px;
}

.section-header span {
    color: #6b7280;

    font-size: 14px;
}

.empty-state {
    text-align: center;

    padding: 40px;

    color: #6b7280;
}

.empty-state div {
    font-size: 40px;

    margin-bottom: 10px;
}

.empty-state h3 {
    color: #374151;

    margin-bottom: 8px;
}


/* Responsive */

@media (max-width: 900px) {

    .summary-cards {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .menu-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 600px) {

    .dashboard-header {
        padding: 0 15px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
    }

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

}

/* ==============================
   PERSON TRANSACTIONS
================================ */

.transaction-list {
    display: flex;

    flex-direction: column;

    gap: 12px;
}

.transaction-card {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 20px;

    padding: 18px;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    background: #fff;
}

.transaction-main {
    display: flex;

    align-items: center;

    gap: 15px;

    min-width: 0;
}

.transaction-icon {
    width: 45px;

    height: 45px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #f3f4f6;

    border-radius: 10px;

    font-size: 23px;
}

.transaction-main h3 {
    margin-bottom: 5px;

    word-break: break-word;
}

.transaction-main p {
    color: #6b7280;

    font-size: 13px;
}

.transaction-info {
    display: flex;

    gap: 30px;

    text-align: right;
}

.transaction-info span {
    display: block;

    color: #6b7280;

    font-size: 12px;

    margin-bottom: 5px;
}

.transaction-info strong {
    font-size: 15px;
}

.change-request-section {
    margin-top: 25px;
}


/* Mobile transaction layout */

@media (max-width: 700px) {

    .transaction-card {
        align-items: stretch;

        flex-direction: column;

        gap: 15px;
    }

    .transaction-info {
        display: grid;

        grid-template-columns:
            repeat(3, 1fr);

        gap: 10px;

        text-align: left;

        padding-top: 15px;

        border-top: 1px solid #e5e7eb;
    }

}


@media (max-width: 450px) {

    .transaction-info {
        grid-template-columns: 1fr;
    }

}

/* ========================================
   PROFESSIONAL ALERT / MODAL
======================================== */

.app-alert-overlay {
    position: fixed;

    inset: 0;

    z-index: 99999;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;

    background:
        rgba(15, 23, 42, 0.55);

    backdrop-filter: blur(4px);

    animation:
        alertOverlayIn 0.2s ease;
}


.app-alert-modal {
    position: relative;

    width: min(
        100%,
        430px
    );

    background: #ffffff;

    border-radius: 18px;

    padding: 32px 28px 28px;

    text-align: center;

    box-shadow:
        0 20px 60px
        rgba(0, 0, 0, 0.20);

    animation:
        alertModalIn 0.25s ease;
}


.app-alert-close {
    position: absolute;

    top: 12px;

    right: 14px;

    width: 32px;

    height: 32px;

    border: none;

    border-radius: 50%;

    background: transparent;

    color: #6b7280;

    font-size: 24px;

    line-height: 1;

    cursor: pointer;
}


.app-alert-close:hover {
    background: #f3f4f6;

    color: #111827;
}


/* ========================================
   ICON
======================================== */

.app-alert-icon {
    width: 64px;

    height: 64px;

    margin: 0 auto 18px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    font-size: 30px;

    font-weight: 700;
}


.app-alert-icon.success {
    background: #dcfce7;

    color: #16a34a;
}


.app-alert-icon.error {
    background: #fee2e2;

    color: #dc2626;
}


.app-alert-icon.warning {
    background: #fef3c7;

    color: #d97706;
}


.app-alert-icon.info {
    background: #dbeafe;

    color: #2563eb;
}


/* ========================================
   TEXT
======================================== */

.app-alert-modal h3 {
    margin: 0 0 10px;

    color: #111827;

    font-size: 21px;
}


.app-alert-modal p {
    margin: 0 auto 24px;

    max-width: 350px;

    color: #6b7280;

    font-size: 15px;

    line-height: 1.6;

    word-break: break-word;
}


/* ========================================
   OK BUTTON
======================================== */

.app-alert-button {
    width: 100%;

    min-height: 46px;

    border: none;

    border-radius: 9px;

    color: #ffffff;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    transition:
        transform 0.15s ease,
        opacity 0.15s ease;
}


.app-alert-button:hover {
    opacity: 0.9;

    transform: translateY(-1px);
}


.app-alert-button.success {
    background: #16a34a;
}


.app-alert-button.error {
    background: #dc2626;
}


.app-alert-button.warning {
    background: #d97706;
}


.app-alert-button.info {
    background: #2563eb;
}


/* ========================================
   CONFIRM BUTTONS
======================================== */

.app-confirm-buttons {
    display: flex;

    gap: 12px;
}


.app-confirm-cancel,
.app-confirm-ok {
    flex: 1;

    min-height: 46px;

    border-radius: 9px;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;
}


.app-confirm-cancel {
    border: 1px solid #d1d5db;

    background: #ffffff;

    color: #374151;
}


.app-confirm-cancel:hover {
    background: #f3f4f6;
}


.app-confirm-ok {
    border: none;

    background: #dc2626;

    color: #ffffff;
}


.app-confirm-ok:hover {
    background: #b91c1c;
}


/* ========================================
   ANIMATIONS
======================================== */

@keyframes alertOverlayIn {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


@keyframes alertModalIn {

    from {
        opacity: 0;

        transform:
            translateY(15px)
            scale(0.96);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 500px) {

    .app-alert-overlay {
        padding: 15px;
    }


    .app-alert-modal {
        padding:
            28px 20px 22px;

        border-radius: 16px;
    }


    .app-alert-icon {
        width: 56px;

        height: 56px;

        font-size: 26px;
    }


    .app-alert-modal h3 {
        font-size: 19px;
    }


    .app-alert-modal p {
        font-size: 14px;
    }

}