/* === CSS CHUNG CHO ĐĂNG NHẬP, KHÁCH & ADMIN — LA CÀ COFFEE === */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Be Vietnam Pro', Arial, sans-serif;
    background-color: #f6efe6;
    color: #2f1e18;
    margin: 0;
    padding: 20px;
}

/* --- ĐĂNG NHẬP CHIA 2 VAI TRÒ --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-color: #f6efe6;
}

.login-box {
    background-color: #fffaf4;
    padding: 32px 28px;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(47, 30, 24, 0.1);
    width: 400px;
    max-width: 100%;
    border: 1px solid #e6d7c6;
}

.brand-icon {
    text-align: center;
    font-size: 36px;
    margin-bottom: 6px;
}

.login-box h2 {
    text-align: center;
    color: #2f1e18;
    margin: 4px 0 6px;
}

.subtitle {
    text-align: center;
    color: #7c5c4c;
    font-size: 13px;
    margin-bottom: 18px;
}

.role-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
    background-color: #f2e5d5;
    padding: 6px;
    border-radius: 12px;
    border: 1px solid #dec9b2;
}

.role-btn {
    padding: 9px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #3d271f;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.role-btn.active {
    background-color: #3d271f;
    color: #fffaf4;
    box-shadow: 0 3px 8px rgba(61, 39, 31, 0.22);
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #3d271f;
    font-size: 13.5px;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d5be9e;
    border-radius: 9px;
    background-color: #fffdf9;
    color: #2f1e18;
    font-family: inherit;
    font-size: 14px;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #8c4a27;
    background-color: #ffffff;
}

.btn-primary {
    width: 100%;
    padding: 11px 16px;
    background-color: #3d271f;
    color: #fffaf4;
    border: none;
    border-radius: 9px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-primary:hover {
    background-color: #8c4a27;
}

.hint {
    font-size: 12px;
    color: #4e342e;
    text-align: center;
    margin-top: 14px;
    background-color: #f2e5d5;
    padding: 9px 10px;
    border-radius: 8px;
    line-height: 1.45;
}

/* --- KHUNG CHUNG TRANG KHÁCH & ADMIN --- */
.page-shell {
    max-width: 1140px;
    margin: 0 auto;
    background-color: #fffaf4;
    border-radius: 16px;
    padding: 26px;
    border: 1px solid #e6d7c6;
    box-shadow: 0 8px 24px rgba(47, 30, 24, 0.08);
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background-color: #f2e5d5;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid #dec9b2;
    margin-bottom: 22px;
}

.top-bar-title {
    font-weight: 700;
    color: #2f1e18;
    font-size: 15px;
}

.top-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-nav,
.btn-danger-sm,
.btn-accent {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease;
}

.btn-nav {
    background-color: #3d271f;
    color: #fffaf4;
}

.btn-nav:hover {
    background-color: #8c4a27;
}

.btn-accent {
    background-color: #8c4a27;
    color: #fffaf4;
}

.btn-accent:hover {
    background-color: #3d271f;
}

.btn-danger-sm {
    background-color: #c0392b;
    color: #ffffff;
}

.btn-danger-sm:hover {
    background-color: #a93226;
}

.section-heading {
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e6d7c6;
    color: #2f1e18;
    font-size: 19px;
}

/* --- BẢNG DỮ LIỆU --- */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    background-color: #fffdf9;
    border-radius: 12px;
    border: 1px solid #e2cbb4;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
}

table.data-table th {
    background-color: #f2e5d5;
    color: #2f1e18;
    padding: 11px 10px;
    font-size: 13.5px;
    font-weight: 700;
    border: 1px solid #e2cbb4;
    text-align: center;
}

table.data-table td {
    padding: 10px;
    font-size: 13.5px;
    border: 1px solid #efe1d1;
    vertical-align: middle;
    text-align: center;
}

.note-input {
    width: 100%;
    min-width: 150px;
    padding: 7px 9px;
    border: 1px solid #d5be9e;
    border-radius: 7px;
    background-color: #fffaf4;
    color: #2f1e18;
    font-size: 13px;
}

.qty-mini-btn {
    padding: 2px 8px;
    border: 1px solid #d5be9e;
    background-color: #f6efe6;
    color: #2f1e18;
    border-radius: 5px;
    font-weight: 700;
    cursor: pointer;
}

.qty-mini-btn:hover {
    background-color: #e6d3bc;
}

/* --- KHỐI THANH TOÁN CỦA KHÁCH --- */
.checkout-panel {
    margin-top: 22px;
    background-color: #fffdf9;
    border: 1px solid #e2cbb4;
    border-radius: 12px;
    padding: 20px;
}

.pay-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 10px 0 16px;
}

.pay-card {
    border: 1px solid #d5be9e;
    background-color: #fffaf4;
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.pay-card.selected {
    border-color: #8c4a27;
    background-color: #f6eadc;
}

.summary-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #ead9c6;
}

.total-price {
    font-size: 19px;
    font-weight: 700;
    color: #a44a1e;
}

/* --- THỐNG KÊ ADMIN --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background-color: #fffdf9;
    border: 1px solid #e6d7c6;
    border-radius: 12px;
    padding: 14px 16px;
}

.stat-card span {
    display: block;
    font-size: 12.5px;
    color: #7c5c4c;
    margin-bottom: 4px;
}

.stat-card strong {
    font-size: 20px;
    color: #2f1e18;
}

.badge-paid {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.badge-unpaid {
    background-color: #fff3e0;
    color: #d35400;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 820px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pay-options {
        grid-template-columns: 1fr;
    }
}
.checkout-box {
    max-width: 820px;
    margin: 20px auto;
    background-color: #fffaf4;
    padding: 28px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(47, 30, 24, 0.1);
    border: 1px solid #e6d7c6;
    box-sizing: border-box;
}

.checkout-box .table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 16px 0;
}

.checkout-box table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fffdf9;
    min-width: 560px;
}

.checkout-box th,
.checkout-box td {
    border: 1px solid #e2cbb4;
    padding: 10px 12px;
    text-align: center;
    vertical-align: middle;
}

.checkout-box th {
    background-color: #f2e5d5;
    color: #2f1e18;
    font-weight: 700;
}

.form-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 20px;
    background-color: #fffdf9;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2cbb4;
}

.form-info label {
    display: block;
    margin-top: 8px;
    margin-bottom: 4px;
    font-weight: 600;
    color: #3d271f;
}

.form-info input,
.form-info select,
.form-info textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d5be9e;
    border-radius: 8px;
    box-sizing: border-box;
    background-color: #fff;
    font-family: 'Be Vietnam Pro', Arial, sans-serif;
    font-size: 14px;
    color: #2f1e18;
}

.form-info textarea {
    min-height: 84px;
    resize: vertical;
}

.btn-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
#qr-box {
    text-align: center;
}

#qr-box #qr-image {
    margin: 0 auto 8px;
}
/* === BỔ SUNG CHO KHỐI QR & NÚT ĐIỀU HƯỚNG TRANG THANH TOÁN === */
body.pay-page .checkout-box {
    max-width: 800px;
    margin: 24px auto;
    background-color: #fffaf4;
    padding: 28px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 28px rgba(47, 30, 24, 0.09);
    border: 1px solid #e6d7c6;
    box-sizing: border-box;
}

body.pay-page .checkout-box h1 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2f1e18;
    font-size: 24px;
    font-weight: 700;
}

body.pay-page .checkout-box .table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 16px 0;
    border-radius: 10px;
    border: 1px solid #e2cbb4;
    background-color: #fffdf9;
}

body.pay-page .checkout-box table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background-color: #fffdf9;
    min-width: 540px;
}

body.pay-page .checkout-box th,
body.pay-page .checkout-box td {
    border: 1px solid #efe1d1;
    padding: 10px 12px;
    text-align: center;
    vertical-align: middle;
}

body.pay-page .checkout-box th {
    background-color: #f2e5d5;
    color: #2f1e18;
    font-weight: 700;
}

body.pay-page .form-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 20px;
    background-color: #fffdf9;
    padding: 20px 22px;
    border-radius: 12px;
    border: 1px solid #e2cbb4;
}

body.pay-page .form-info h2 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #2f1e18;
    font-size: 18px;
    border-bottom: 1px solid #ead9c6;
    padding-bottom: 10px;
}

body.pay-page .form-info textarea {
    min-height: 86px;
    resize: vertical;
    line-height: 1.5;
}

.qr-box {
    display: none;
    margin-top: 12px;
    padding: 16px;
    border-radius: 12px;
    background: #fffaf4;
    border: 1px dashed #c8b29e;
    text-align: center;
}

.qr-code-label {
    margin: 0 0 6px;
    text-align: center;
}

.qr-code-value {
    color: #a44a1e;
    font-weight: 700;
    font-size: 15px;
}

.qr-channel-row {
    margin: 0 0 6px;
}

.qr-channel-select {
    width: auto !important;
    min-width: 195px;
    display: inline-block !important;
    margin: 4px 0 0 6px !important;
    padding: 6px 12px !important;
}

.qr-hint {
    margin: 6px 0;
}

.qr-box img {
    max-width: 220px;
    border-radius: 10px;
    display: block;
    margin: 8px auto;
    box-shadow: 0 4px 12px rgba(47, 30, 24, 0.08);
}

.qr-info {
    margin: 6px 0 0;
    font-size: 13px;
    color: #4e342e;
}

body.pay-page .btn-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
    padding-top: 14px;
    border-top: 1px solid #ead9c6;
}

.btn-group-left {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.pay-page .btn-back {
    background-color: #f2e5d5;
    color: #3d271f;
    border: 1px solid #d5be9e;
    padding: 9px 15px;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13.5px;
    font-family: 'Be Vietnam Pro', Arial, sans-serif;
    transition: all 0.2s ease;
}

body.pay-page .btn-back:hover {
    background-color: #3d271f;
    color: #fffaf4;
    border-color: #3d271f;
}

body.pay-page .btn-confirm {
    background-color: #8c4a27;
    color: #fffaf4;
    border: none;
    padding: 11px 24px;
    border-radius: 9px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14.5px;
    font-family: 'Be Vietnam Pro', Arial, sans-serif;
    box-shadow: 0 4px 12px rgba(140, 74, 39, 0.24);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

body.pay-page .btn-confirm:hover {
    background-color: #3d271f;
}

body.pay-page .btn-confirm:active {
    transform: scale(0.98);
}

@media (max-width: 600px) {
    body.pay-page {
        padding: 12px;
    }

    body.pay-page .checkout-box {
        padding: 20px 16px;
    }

    body.pay-page .btn-group,
    .btn-group-left {
        flex-direction: column;
        align-items: stretch;
    }

    body.pay-page .btn-back,
    body.pay-page .btn-confirm {
        width: 100%;
        text-align: center;
    }
}

/* === BỔ SUNG NÚT ĐIỀU HƯỚNG, MẬT KHẨU & TRẠNG THÁI ĐƠN === */
.menu-shortcut {
    margin-top: 14px;
}

.btn-menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 14px;
    border-radius: 9px;
    background-color: #f2e5d5;
    color: #3d271f;
    border: 1px solid #d5be9e;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-menu-link:hover {
    background-color: #3d271f;
    color: #fffaf4;
    border-color: #3d271f;
}

.password-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrap input {
    padding-right: 42px;
}

.toggle-pass-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: auto !important;
    margin: 0 !important;
    padding: 4px 6px !important;
    border: none !important;
    background: transparent !important;
    color: #7c5c4c !important;
    font-size: 16px !important;
    cursor: pointer;
    line-height: 1;
}

.toggle-pass-btn:hover {
    color: #2f1e18 !important;
    background: transparent !important;
}

.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.admin-filter-bar input,
.admin-filter-bar select {
    padding: 8px 12px;
    border: 1px solid #d5be9e;
    border-radius: 8px;
    background-color: #fffdf9;
    color: #2f1e18;
    font-family: inherit;
    font-size: 13.5px;
}

.admin-filter-bar input {
    min-width: 220px;
    flex: 1;
}

.status-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.status-cho { background-color: #fff3e0; color: #c86400; }
.status-pha { background-color: #e3f2fd; color: #1565c0; }
.status-giao { background-color: #ede7f6; color: #5e35b1; }
.status-xong { background-color: #e8f5e9; color: #2e7d32; }
.status-huy { background-color: #fdecea; color: #c62828; }

.order-card-khach {
    background: #fffdf9;
    border: 1px solid #e2cbb4;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.order-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 1px dashed #e6d7c6;
}

.order-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #efe1d1;
}
