
:root {
    --green-dark: #6E1F2F;
    --green-main: #6E1F2F;
    --green-light: #EDE6DD;
    --cream: #F8F5F0;
    --text-dark: #1B1416;
    --text-muted: #9A8F89;
    --border: #DED5CC;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--text-dark);
    font-family: Arial, sans-serif;
}

.app-wrapper {
    min-height: 100vh;
    display: flex;
}

/* SIDEBAR */

.sidebar {
    width: 255px;
    min-width: 255px;
    min-height: 100vh;
    background: var(--green-dark);
    color: white;
    padding: 25px 16px;
    display: flex;
    flex-direction: column;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 8px 30px;
}

.brand-icon,
.footer-mark {
    width: 43px;
    height: 43px;
    border-radius: 13px;
    background: #EDE6DD;
    color: var(--green-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 17px;
}

.brand h5 {
    margin: 0;
    font-size: 17px;
    font-weight: bold;
}

.brand small,
.sidebar-footer small {
    color: #EDE6DD;
    font-size: 11px;
}

.sidebar-label {
    color: #D8BFC3;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.3px;
    padding: 10px 12px;
}

.sidebar-nav {
    flex: 1;
}

.sidebar-nav .nav-link {
    color: #e0e9e2;
    padding: 12px;
    border-radius: 9px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 13px;
    text-decoration: none;
}

.sidebar-nav .nav-link span {
    width: 20px;
    text-align: center;
    font-weight: bold;
}

.sidebar-nav .nav-link.active {
    background: #541725;
    color: white;
}

.sidebar-nav .nav-link.disabled {
    opacity: 0.55;
    cursor: default;
}

.sidebar-nav .nav-link small {
    margin-left: auto;
    font-size: 9px;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #8C5963;
    padding: 20px 5px 0;
}

.footer-mark {
    width: 35px;
    height: 35px;
    font-size: 12px;
}

.sidebar-footer strong {
    display: block;
    font-size: 12px;
}

/* MAIN CONTENT */

.main-content {
    flex: 1;
    min-width: 0;
}

.topbar {
    min-height: 83px;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-title {
    font-weight: bold;
    font-size: 14px;
}

.topbar-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--green-light);
    color: var(--green-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.admin-details strong,
.admin-details small {
    display: block;
}

.admin-details strong {
    font-size: 12px;
}

.admin-details small {
    color: var(--text-muted);
    font-size: 10px;
}

.btn-logout {
    border: 1px solid #e5e9e5;
    background: white;
    color: #9a554c;
    padding: 7px 12px;
    border-radius: 7px;
    font-size: 11px;
}

.page-content {
    padding: 30px;
}

/* WELCOME */

.welcome-section {
    background: linear-gradient(110deg, #6E1F2F, #3D111D);
    color: white;
    border-radius: 15px;
    padding: 27px 30px;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
}

.welcome-label {
    color: #E8C9CE;
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: bold;
}

.welcome-section h2 {
    font-size: 25px;
    font-weight: bold;
    margin: 7px 0;
}

.welcome-section p {
    color: #F1E5E6;
    font-size: 12px;
    margin: 0;
}

.welcome-decoration {
    font-size: 65px;
    font-weight: bold;
    color: rgba(255,255,255,0.13);
}

/* STATISTICS */

.stat-card,
.content-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 20px;
}

.stat-icon {
    width: 39px;
    height: 39px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 15px;
}

.icon-green {
    background: #EDE6DD;
    color: #6E1F2F;
}

.icon-orange {
    background: #F3E5E5;
    color: #6E1F2F;
}

.icon-blue {
    background: #EDE6DD;
    color: #6E1F2F;
}

.icon-purple {
    background: #EDE6DD;
    color: #6E1F2F;
}

.stat-label {
    color: var(--text-muted);
    font-size: 11px;
}

.stat-value {
    font-size: 25px;
    font-weight: bold;
    margin: 5px 0;
}

.stat-description {
    font-size: 10px;
    color: #a0a9a2;
}

/* CONTENT CARDS */

.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.card-heading h5 {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 5px;
}

.card-heading p {
    color: var(--text-muted);
    font-size: 11px;
    margin: 0;
}

.status-badge {
    background: #EDE6DD;
    color: #6E1F2F;
    padding: 6px 9px;
    border-radius: 20px;
    font-size: 9px;
}

.empty-state {
    text-align: center;
    padding: 35px 15px;
}

.empty-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--green-light);
    color: var(--green-main);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 22px;
}

.empty-state h6 {
    font-size: 13px;
    font-weight: bold;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 11px;
}

/* QUICK MENU */

.quick-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.quick-item:last-child {
    border-bottom: 0;
}

.quick-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--green-light);
    color: var(--green-main);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-item strong,
.quick-item small {
    display: block;
}

.quick-item strong {
    font-size: 11px;
}

.quick-item small {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 3px;
}

.coming-soon {
    margin-left: auto;
    font-size: 9px;
    color: #9a9e98;
}

.dashboard-footer {
    text-align: center;
    color: #a0a9a2;
    font-size: 10px;
    padding: 25px 0 5px;
}

/* RESPONSIVE */

@media (max-width: 991px) {
    .sidebar {
        width: 210px;
        min-width: 210px;
    }

    .page-content {
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .app-wrapper {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        padding: 15px;
    }

    .sidebar-nav {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    .brand {
        padding: 0;
    }

    .topbar {
        padding: 15px;
    }

    .admin-details {
        display: none;
    }

    .page-content {
        padding: 15px;
    }

    .welcome-section {
        padding: 22px;
    }

    .welcome-decoration {
        font-size: 45px;
    }
}


/* =========================================================
   DAPUR KAYANA BRANDING
   ========================================================= */

:root {
    --cream: #F8F5F0;
    --surface: #EDE6DD;
    --text-dark: #1B1416;
    --text-muted: #9A8F89;
    --border: #DED5CC;
    --green-dark: #6E1F2F;
    --green-main: #6E1F2F;
    --green-light: #EDE6DD;
    --brand-accent: #6E1F2F;
}

body {
    background: var(--cream);
    color: var(--text-dark);
}

.sidebar {
    background: var(--brand-accent);
}

.brand-logo {
    width: 53px;
    height: 53px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--cream);
    flex-shrink: 0;
}

.footer-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--cream);
    flex-shrink: 0;
}

.sidebar-nav .nav-link {
    transition: background 0.2s ease, transform 0.2s ease;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    transform: translateX(2px);
}

.sidebar-nav .nav-link.active {
    background: var(--cream);
    color: var(--brand-accent);
    font-weight: 700;
}

.sidebar-label {
    color: #E8C9CE;
}

.sidebar-footer {
    border-top-color: rgba(255, 255, 255, 0.22);
}

.sidebar-footer small,
.brand small {
    color: #E8DADC;
}

.topbar {
    background: var(--cream);
    border-bottom-color: var(--border);
}

.admin-avatar {
    background: var(--surface);
    color: var(--brand-accent);
}

.btn-logout {
    border-color: var(--border);
    color: var(--brand-accent);
    background: var(--surface);
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background: var(--brand-accent);
    color: #FFFFFF;
}

.page-content {
    background: var(--cream);
}

.welcome-section {
    background: linear-gradient(115deg, #6E1F2F, #3D111D);
    box-shadow: 0 10px 28px rgba(110, 31, 47, 0.12);
}

.welcome-logo {
    width: 104px;
    height: 104px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--cream);
    border: 4px solid rgba(255, 255, 255, 0.22);
    flex-shrink: 0;
}

.payment-page-header {
    gap: 24px;
}

.payment-header-copy {
    min-width: 0;
}

.payment-header-copy .welcome-logo {
    width: 82px;
    height: 82px;
    border-width: 3px;
}

.payment-header-action {
    flex-shrink: 0;
    min-width: 175px;
    color: #6E1F2F;
    background: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.55);
    box-shadow: 0 5px 14px rgba(27, 20, 22, 0.14);
}

.payment-header-action:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.14);
    border-color: #FFFFFF;
}

@media (max-width: 767px) {
    .payment-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .payment-header-copy {
        align-items: flex-start;
        width: 100%;
    }

    .payment-header-copy .welcome-logo {
        width: 68px;
        height: 68px;
    }

    .payment-header-action {
        width: 100%;
    }
}

.stat-card,
.content-card {
    background: var(--surface);
    border-color: var(--border);
    box-shadow: 0 4px 14px rgba(27, 20, 22, 0.035);
}

.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 9px 22px rgba(27, 20, 22, 0.07);
}

.stat-icon,
.empty-icon,
.quick-icon {
    background: #E3D5D2;
    color: var(--brand-accent);
}

.status-badge {
    background: #E3D5D2;
    color: var(--brand-accent);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-dark);
    --bs-table-hover-bg: rgba(110, 31, 47, 0.055);
    --bs-table-border-color: var(--border);
}

.table thead th {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    border-bottom-color: var(--border);
}

.table tbody td {
    font-size: 12px;
}

.table-actions {
    align-items: center;
    flex-wrap: nowrap;
}

.table-actions form {
    margin: 0;
}

.table-action {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    transition: all 0.18s ease;
}

.table-action-edit {
    color: #FFFFFF !important;
    background: #6E1F2F !important;
    border: 1px solid #6E1F2F !important;
    box-shadow: 0 3px 8px rgba(110, 31, 47, 0.16);
}

.table-action-edit:hover {
    color: #FFFFFF;
    background: #541725;
    border-color: #541725;
    box-shadow: 0 5px 12px rgba(110, 31, 47, 0.24);
    transform: translateY(-1px);
}

.table-action-delete {
    color: #FFFFFF !important;
    background: #A33A42 !important;
    border: 1px solid #A33A42 !important;
    box-shadow: 0 3px 8px rgba(163, 58, 66, 0.16);
}

.table-action-delete:hover {
    color: #FFFFFF;
    background: #842A32;
    border-color: #842A32;
    box-shadow: 0 5px 12px rgba(163, 58, 66, 0.24);
    transform: translateY(-1px);
}

.form-actions {
    align-items: center;
}

.form-action {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 9px;
    padding: 9px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    transition: all 0.18s ease;
}

.form-action-primary {
    color: #FFFFFF;
    background: #6E1F2F;
    border: 1px solid #6E1F2F;
    box-shadow: 0 4px 10px rgba(110, 31, 47, 0.16);
}

.form-action-primary:hover {
    color: #FFFFFF;
    background: #541725;
    border-color: #541725;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(110, 31, 47, 0.22);
}

.form-action-secondary {
    color: #625A55;
    background: #FFFFFF;
    border: 1px solid #D9D1CB;
}

.form-action-secondary:hover {
    color: #6E1F2F;
    background: #F7F3EF;
    border-color: #C9BAB4;
}

.quick-item {
    border-bottom-color: var(--border);
}

.dashboard-footer {
    color: var(--text-muted);
}

/* Unified labels and badges */
.status-badge,
.payment-count,
.availability-badge,
.order-status,
.payment-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    line-height: 1;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
    box-shadow: 0 2px 6px rgba(27, 20, 22, 0.04);
}

.status-badge,
.payment-count {
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    border-color: #E2D5D2;
}

.availability-badge,
.order-status,
.payment-status {
    padding: 7px 11px;
}

.availability-badge.available,
.payment-status.paid,
.order-status.completed {
    border-color: #C8DACB;
}

.availability-badge.unavailable,
.payment-status.unpaid,
.order-status.cancelled {
    border-color: #E5C4C7;
}

.payment-status.partial,
.order-status.pending {
    border-color: #E7D6A9;
}

.order-status.confirmed {
    border-color: #CAD4E2;
}

.order-status.in-progress {
    border-color: #DDBFC4;
}

.order-status.unknown,
.payment-status.unknown {
    border-color: #DDD4CD;
}

.welcome-label,
.section-eyebrow,
.detail-label,
.production-summary-label,
.invoice-section-label {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    letter-spacing: 0.12em;
}

.form-label {
    color: #625A55;
    font-size: 0.78rem;
    font-weight: 700;
}

.form-label .text-danger {
    margin-left: 2px;
}

/* LOGIN PAGE */

.login-page {
    min-height: 100vh;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.login-shell {
    width: min(1080px, 100%);
    min-height: 650px;
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 22px 65px rgba(27, 20, 22, 0.10);
}

.login-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 54px 48px 35px;
    color: #FFFFFF;
    background:
        radial-gradient(circle at 50% 25%, rgba(255,255,255,0.08), transparent 38%),
        linear-gradient(145deg, #6E1F2F, #3D111D);
}

.login-brand-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.login-logo {
    width: 190px;
    height: 190px;
    object-fit: contain;
    border-radius: 50%;
    background: var(--cream);
    padding: 5px;
    margin: 0 auto 25px;
    align-self: center;
    box-shadow: 0 12px 32px rgba(0,0,0,0.16);
}

.login-eyebrow {
    color: var(--brand-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2.2px;
}

.login-brand-panel .login-eyebrow {
    color: #E8C9CE;
}

.login-brand-panel h1 {
    margin: 18px 0 14px;
    font-size: clamp(27px, 3vw, 37px);
    line-height: 1.2;
    font-weight: 750;
}

.login-brand-panel p {
    max-width: 360px;
    color: #F0DFE2;
    font-size: 13px;
    line-height: 1.9;
    margin: 0;
}

.login-brand-footer {
    color: #E8C9CE;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 2px;
}

.login-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 55px 60px;
    background: var(--cream);
}

.login-form-wrapper {
    width: 100%;
    max-width: 390px;
}

.login-form-wrapper h2 {
    margin: 12px 0 8px;
    color: var(--text-dark);
    font-size: 29px;
    font-weight: 800;
}

.login-description {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.7;
    margin-bottom: 30px;
}

.login-form-wrapper .form-label {
    color: var(--text-dark);
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-input {
    min-height: 49px;
    padding: 12px 14px;
    color: var(--text-dark);
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 13px;
}

.login-input::placeholder {
    color: #B0A7A1;
}

.login-input:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(110, 31, 47, 0.10);
}

.password-wrapper {
    position: relative;
}

.password-wrapper .login-input {
    padding-right: 105px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
    border: 0;
    padding: 5px;
    background: transparent;
    color: var(--brand-accent);
    font-size: 11px;
    font-weight: 700;
}

.btn-login {
    width: 100%;
    min-height: 49px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 17px;
    border: 0;
    border-radius: 10px;
    color: #FFFFFF;
    background: var(--brand-accent);
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-login:hover {
    color: #FFFFFF;
    background: #541725;
    transform: translateY(-1px);
}

.btn-login span {
    font-size: 19px;
}

.login-alert {
    font-size: 12px;
    border-radius: 10px;
}

.login-bottom-text {
    margin-top: 45px;
    color: var(--text-muted);
    text-align: center;
    font-size: 10px;
}

.login-mobile-logo {
    display: none;
}

/* GLOBAL FORM BRANDING */

.form-control,
.form-select {
    border-color: var(--border);
    color: var(--text-dark);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 0.2rem rgba(110, 31, 47, 0.10);
}

.btn-primary {
    --bs-btn-bg: #6E1F2F;
    --bs-btn-border-color: #6E1F2F;
    --bs-btn-hover-bg: #541725;
    --bs-btn-hover-border-color: #541725;
    --bs-btn-active-bg: #541725;
    --bs-btn-active-border-color: #541725;
}

/* RESPONSIVE BRANDING */

@media (max-width: 767px) {
    .login-page {
        padding: 15px;
        align-items: flex-start;
    }

    .login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 18px;
    }

    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        padding: 35px 25px;
    }

    .login-mobile-logo {
        display: flex;
        justify-content: center;
        margin-bottom: 25px;
    }

    .login-mobile-logo img {
        width: 125px;
        height: 125px;
        object-fit: contain;
        border-radius: 50%;
        background: var(--surface);
    }

    .login-form-wrapper h2 {
        font-size: 25px;
    }

    .login-bottom-text {
        margin-top: 30px;
    }

    .welcome-logo {
        width: 65px;
        height: 65px;
    }
}

@media (max-width: 420px) {
    .login-form-panel {
        padding: 30px 19px;
    }

    .login-page {
        padding: 10px;
    }
}

/* ===== DAPUR KAYANA - SNACK CATALOG ===== */
.snack-code {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 7px;
    background: #EDE6DD;
    color: #6E1F2F;
    font-size: 0.82rem;
    font-weight: 700;
}

.availability-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.availability-badge.available {
    background: #E5EFE6;
    color: #356443;
}

.availability-badge.unavailable {
    background: #F1E5E5;
    color: #8A3942;
}

.availability-option {
    padding: 16px 18px;
    border: 1px solid #DED5CC;
    border-radius: 12px;
    background: #F8F5F0;
}

.availability-option small {
    display: block;
    margin: 5px 0 0 24px;
    color: #9A8F89;
}

@media (max-width: 767px) {
    .content-card .card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .content-card .card-heading .btn {
        width: 100%;
    }
}

/* ===== DAPUR KAYANA - ORDER LIST ===== */

.order-table {
    min-width: 950px;
}

.order-number {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 7px;
    background: #EDE6DD;
    color: #6E1F2F;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.order-number:hover {
    background: #E8C9CE;
    color: #541725;
}

.order-amount {
    color: #6E1F2F;
    white-space: nowrap;
}

.order-status {
    display: inline-block;
    padding: 6px 11px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.order-status.pending {
    background: #F5EBD5;
    color: #80601D;
}

.order-status.confirmed {
    background: #E5EAF2;
    color: #405C83;
}

.order-status.in-progress {
    background: #E8C9CE;
    color: #6E1F2F;
}

.order-status.completed {
    background: #E5EFE6;
    color: #356443;
}

.order-status.cancelled {
    background: #F1E5E5;
    color: #8A3942;
}

.order-status.unknown {
    background: #EDE6DD;
    color: #625A55;
}

.order-table tbody tr:hover .order-number {
    background: #E8C9CE;
}

@media (max-width: 767px) {
    .content-card .card-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .content-card .card-heading .btn {
        width: 100%;
    }
}

/* ===== DAPUR KAYANA - ORDER FORM ===== */
.order-form-table {
    min-width: 850px;
    margin-bottom: 12px;
}

.order-form-table thead th {
    background: #F8F5F0;
    color: #3D111D;
    font-size: .84rem;
    font-weight: 700;
    border-bottom: 1px solid #DED5CC;
    padding: 13px 12px;
}

.order-form-table tbody td {
    vertical-align: middle;
    padding: 12px;
}

.order-form-table .price-cell,
.order-form-table .line-total {
    color: #6E1F2F;
    font-weight: 600;
}

.summary-value {
    background: #F8F5F0;
    color: #3D111D;
    font-weight: 700;
}

.summary-total {
    background: #6E1F2F;
    border-color: #6E1F2F;
    color: #FFFFFF;
    font-size: 1.05rem;
    font-weight: 700;
}

.order-form-actions .btn {
    min-width: 125px;
}

@media (max-width: 767px) {
    .order-form-actions {
        flex-direction: column-reverse;
    }

    .order-form-actions .btn {
        width: 100%;
    }

    .content-card .card-heading {
        align-items: flex-start;
    }
}

/* ===== DAPUR KAYANA - ORDER DETAIL ===== */

.order-detail-actions form {
    margin: 0;
}

.order-detail-actions .order-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.order-detail-actions .order-action-primary {
    color: #541725;
    background: #FFFFFF;
    border-color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(20, 5, 9, 0.16);
}

.order-detail-actions .order-action-primary:hover {
    color: #3D111D;
    background: #F7F1F2;
    border-color: #F7F1F2;
    box-shadow: 0 6px 16px rgba(20, 5, 9, 0.22);
    transform: translateY(-2px);
}

.order-detail-actions .order-action-secondary {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.42);
}

.order-detail-actions .order-action-secondary:hover {
    color: #541725;
    background: #FFFFFF;
    border-color: #FFFFFF;
    transform: translateY(-2px);
}

.order-detail-actions .order-action-danger {
    color: #842A32;
    background: #FCE8EA;
    border-color: #F2BFC4;
}

.order-detail-actions .order-action-danger:hover {
    color: #6D1F28;
    background: #F9DADD;
    border-color: #E8A6AE;
    transform: translateY(-2px);
}

.order-detail-actions .order-action:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 3px;
}

.order-action-icon {
    width: 23px;
    height: 23px;
    display: inline-grid;
    flex: 0 0 23px;
    place-items: center;
    border-radius: 7px;
    background: rgba(110, 31, 47, 0.1);
    font-size: 1rem;
}

.order-action-secondary .order-action-icon {
    background: rgba(255, 255, 255, 0.14);
}

.order-action-danger .order-action-icon {
    background: rgba(132, 42, 50, 0.1);
}

.order-identity-card {
    border-left: 4px solid #6E1F2F;
}

.detail-label {
    display: block;
    color: #9A8F89;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 7px;
}

.order-detail-number {
    color: #3D111D;
    font-weight: 750;
    letter-spacing: .3px;
}

.detail-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 0;
    border-bottom: 1px solid #EDE6DD;
}

.detail-info-item:first-child {
    padding-top: 0;
}

.detail-info-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.detail-info-item span {
    color: #9A8F89;
    font-size: .82rem;
}

.detail-info-item strong {
    color: #3D111D;
    font-size: .94rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.order-detail-table {
    min-width: 800px;
    margin-bottom: 0;
}

.order-detail-table thead th {
    background: #F8F5F0;
    color: #3D111D;
    font-size: .82rem;
    font-weight: 700;
    padding: 14px 12px;
    border-bottom: 1px solid #DED5CC;
    white-space: nowrap;
}

.order-detail-table tbody td {
    padding: 13px 12px;
    vertical-align: middle;
}

.order-detail-table tbody tr:last-child td {
    border-bottom: 0;
}

.detail-amount {
    color: #6E1F2F;
    font-weight: 700;
    white-space: nowrap;
}

.payment-summary-card {
    border-top: 4px solid #6E1F2F;
}

.detail-total-row {
    gap: 12px;
}

.detail-grand-total {
    color: #6E1F2F;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.payment-status {
    display: inline-block;
    padding: 6px 11px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.payment-status.paid {
    background: #E5EFE6;
    color: #356443;
}

.payment-status.partial {
    background: #F5EBD5;
    color: #80601D;
}

.payment-status.unpaid {
    background: #F1E5E5;
    color: #8A3942;
}

.payment-status.unknown {
    background: #EDE6DD;
    color: #625A55;
}

.payment-count {
    display: inline-block;
    padding: 6px 11px;
    border-radius: 20px;
    background: #EDE6DD;
    color: #6E1F2F;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}

.order-notes {
    padding: 14px 16px;
    background: #F8F5F0;
    border-left: 3px solid #6E1F2F;
    border-radius: 7px;
    color: #3D111D;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.detail-created-at {
    padding-top: 8px;
    border-top: 1px solid #DED5CC;
}

@media (max-width: 767px) {
    .order-detail-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .order-detail-actions .order-action {
        width: 100%;
        min-height: 46px;
    }

    .order-detail-actions form {
        width: 100%;
    }

    .order-detail-actions form button {
        width: 100%;
    }

    .detail-total-row {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .detail-grand-total {
        text-align: left;
    }

    .content-card .card-heading {
        align-items: flex-start;
    }
}

/* ===== DAPUR KAYANA - PAYMENT UI STAGE 4 ===== */

.payment-table {
    min-width: 1000px;
    margin-bottom: 0;
}

.payment-table thead th {
    background: #F8F5F0;
    color: #3D111D;
    font-size: .82rem;
    font-weight: 700;
    padding: 14px 12px;
    border-bottom: 1px solid #DED5CC;
    white-space: nowrap;
}

.payment-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
}

.payment-table tbody tr:last-child td {
    border-bottom: 0;
}

.payment-date {
    white-space: nowrap;
    font-weight: 600;
    color: #3D111D;
}

.payment-date small {
    display: block;
    color: #9A8F89;
    font-size: .78rem;
    font-weight: 400;
}

.payment-order-link {
    color: #6E1F2F;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.payment-order-link:hover {
    color: #541725;
    text-decoration: underline;
}

.payment-client {
    font-weight: 600;
    color: #3D111D;
}

.payment-reference {
    color: #746963;
    font-size: .88rem;
    overflow-wrap: anywhere;
}

.payment-amount {
    color: #6E1F2F !important;
    font-weight: 800;
    white-space: nowrap;
}

.payment-empty-state {
    padding: 45px 20px;
    text-align: center;
}

.payment-empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #E8C9CE;
    color: #6E1F2F;
    font-size: 1.8rem;
}

.payment-empty-state h5,
.payment-empty-state h6 {
    color: #3D111D;
    font-weight: 700;
}

.payment-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
    gap: 20px;
    align-items: start;
}

.payment-form-card,
.payment-info-card {
    min-width: 0;
}

.payment-form-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #E8C9CE;
    color: #6E1F2F;
    font-size: 1.3rem;
}

.payment-form-card .form-label {
    color: #3D111D;
    font-weight: 650;
}

.payment-form-card .form-control,
.payment-form-card .form-select {
    min-height: 44px;
    border-color: #DED5CC;
    border-radius: 8px;
}

.payment-form-card textarea.form-control {
    min-height: 100px;
}

.payment-form-card .form-control:focus,
.payment-form-card .form-select:focus {
    border-color: #6E1F2F;
    box-shadow: 0 0 0 .2rem rgba(110, 31, 47, .12);
}

.payment-form-card .form-text {
    display: block;
    margin-top: 6px;
    color: #9A8F89;
    font-size: .8rem;
}

.payment-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid #DED5CC;
}

.payment-form-actions .btn {
    min-height: 42px;
    font-weight: 600;
}

.payment-info-card {
    border-top: 4px solid #6E1F2F;
}

.payment-info-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    border-radius: 10px;
    background: #E8C9CE;
    color: #6E1F2F;
    font-size: 1.25rem;
}

.payment-info-card h5 {
    color: #3D111D;
    font-weight: 750;
}

.payment-info-list {
    padding-left: 20px;
    margin: 20px 0;
}

.payment-info-list li {
    padding-left: 4px;
    margin-bottom: 16px;
    color: #746963;
    line-height: 1.6;
}

.payment-info-list li strong {
    display: block;
    color: #3D111D;
    margin-bottom: 3px;
}

.payment-info-notice {
    padding: 13px;
    border-radius: 8px;
    background: #F8F5F0;
    color: #6E1F2F;
    font-size: .85rem;
    line-height: 1.6;
}

@media (max-width: 991px) {
    .payment-form-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .payment-table {
        min-width: 900px;
    }

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

    .payment-form-actions .btn {
        width: 100%;
    }
}

/* ===== DASHBOARD QUICK ACCESS ===== */

.quick-item-link {
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    border-radius: 10px;
    padding: 15px 12px;
    margin: 0 -8px;
    transition: background .2s ease, transform .2s ease;
}

.quick-item-link:hover {
    color: var(--brand-accent);
    background: rgba(110, 31, 47, .055);
    transform: translateX(4px);
}

.quick-item-link:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 3px;
}

.quick-item-link .quick-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 11px;
    background: #E8C9CE;
    color: #6E1F2F;
    font-size: 17px;
}

.quick-item-content {
    min-width: 0;
    flex: 1;
}

.quick-item-link strong {
    color: #3D111D;
    font-size: 12px;
    font-weight: 700;
}

.quick-item-link small {
    color: #9A8F89;
    font-size: 10px;
}

.quick-arrow {
    color: #9A8F89;
    font-size: 19px;
    transition: transform .2s ease, color .2s ease;
}

.quick-item-link:hover .quick-arrow {
    color: #6E1F2F;
    transform: translateX(4px);
}

@media (max-width: 767px) {
    .quick-item-link {
        padding: 14px 10px;
    }
}


/* ===== LAPORAN PRODUKSI ===== */

.production-filter {
    padding-top: 8px;
}

.production-filter .form-label {
    color: #3D111D;
    font-size: .85rem;
    font-weight: 600;
}

.production-filter .form-control {
    min-height: 43px;
    border-color: var(--border);
    border-radius: 8px;
}

.production-filter .form-control:focus {
    border-color: #6E1F2F;
    box-shadow: 0 0 0 .2rem rgba(110, 31, 47, .12);
}

.production-filter-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.production-filter-actions .form-action {
    min-height: 43px;
    width: 100%;
}

.production-filter-actions .form-action-secondary {
    min-width: 96px;
}

.production-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.production-summary-card {
    min-width: 0;
    padding: 22px;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 13px;
    box-shadow: 0 3px 12px rgba(61, 17, 29, .045);
}

.production-summary-label {
    display: block;
    color: #8A7775;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.production-summary-card h3 {
    color: #6E1F2F;
    font-size: 1.9rem;
    font-weight: 750;
    margin-bottom: 7px;
}

.production-summary-card small {
    color: #9A8F89;
    font-size: .78rem;
    line-height: 1.5;
}

.production-quantity {
    color: #6E1F2F;
    font-weight: 700;
    white-space: nowrap;
}

.production-detail-table {
    min-width: 1050px;
}

.production-detail-table td {
    vertical-align: middle;
}

.production-detail-table td small {
    display: inline-block;
    max-width: 220px;
    margin-top: 4px;
    line-height: 1.5;
    white-space: normal;
}

@media (max-width: 991px) {
    .production-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .production-summary-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .production-summary-card {
        padding: 18px;
    }

    .production-filter > div {
        width: 100%;
    }

    .production-filter-actions {
        grid-template-columns: 1fr 96px;
        width: 100%;
    }

    .production-filter-actions .form-action {
        width: 100%;
    }
}

/* ===== END LAPORAN PRODUKSI ===== */


/* =========================================
   INVOICE
========================================= */

.invoice-stat-card {
    height: 100%;
}

.invoice-stat-card h3 {
    margin: 12px 0 5px;
    font-size: 1.55rem;
    font-weight: 750;
    color: var(--primary, #6e1f2f);
    overflow-wrap: anywhere;
}

.invoice-page-actions .invoice-action {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.invoice-page-actions .invoice-action-primary {
    color: #541725;
    background: #FFFFFF;
    border-color: #FFFFFF;
    box-shadow: 0 5px 14px rgba(20, 5, 9, 0.18);
}

.invoice-page-actions .invoice-action-primary:hover {
    color: #3D111D;
    background: #F7F1F2;
    border-color: #F7F1F2;
    box-shadow: 0 7px 18px rgba(20, 5, 9, 0.24);
    transform: translateY(-2px);
}

.invoice-page-actions .invoice-action-secondary {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.4);
}

.invoice-page-actions .invoice-action-secondary:hover {
    color: #541725;
    background: #FFFFFF;
    border-color: #FFFFFF;
    transform: translateY(-2px);
}

.invoice-page-actions .invoice-action:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 3px;
}

.invoice-action-icon {
    width: 23px;
    height: 23px;
    display: inline-grid;
    flex: 0 0 23px;
    place-items: center;
    border-radius: 7px;
    background: rgba(110, 31, 47, 0.1);
    font-size: 1rem;
}

.invoice-action-secondary .invoice-action-icon {
    background: rgba(255, 255, 255, 0.14);
}

.invoice-table {
    min-width: 1050px;
}

.invoice-paper {
    max-width: 1100px;
    margin: 0 auto 30px;
    padding: 42px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.055);
    color: #252525;
}

.invoice-header h2 {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 800;
    color: #6e1f2f;
}

.invoice-header p {
    color: #6b7280;
}

.invoice-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
}

.invoice-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #6e1f2f;
}

.invoice-divider {
    margin: 28px 0;
    border-color: #d7d7d7;
    opacity: 1;
}

.invoice-section-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #8a5360;
}

.invoice-items-table {
    margin-bottom: 0;
    border-color: #e5e7eb;
}

.invoice-items-table thead th {
    padding: 12px 10px;
    background: #f7f1f2;
    color: #6e1f2f;
    font-size: 0.78rem;
    font-weight: 750;
    white-space: nowrap;
    border-bottom: 1px solid #e5dadd;
}

.invoice-items-table tbody td {
    padding: 12px 10px;
    font-size: 0.88rem;
    vertical-align: middle;
}

.invoice-totals {
    padding: 20px;
    background: #faf7f8;
    border: 1px solid #eee2e5;
    border-radius: 10px;
}

.invoice-grand-total {
    color: #6e1f2f;
    font-size: 1.08rem;
    gap: 12px;
}

.invoice-footer {
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    color: #666;
    font-size: 0.88rem;
}

.invoice-footer strong {
    color: #6e1f2f;
}

@media (max-width: 767px) {
    .invoice-page-action-buttons {
        width: 100%;
    }

    .invoice-page-actions .invoice-action {
        flex: 1 1 100%;
    }

    .invoice-paper {
        padding: 20px 14px;
        border-radius: 8px;
    }

    .invoice-logo {
        width: 58px;
        height: 58px;
    }

    .invoice-header h2 {
        font-size: 1.25rem;
    }

    .invoice-title {
        font-size: 1.5rem;
    }

    .invoice-totals {
        padding: 15px;
    }
}


/* =========================================
   INVOICE PRINT / SAVE AS PDF
========================================= */

@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    html,
    body {
        background: #fff !important;
        color: #000 !important;
    }

    .sidebar,
    .topbar,
    .invoice-page-actions,
    .sidebar-footer,
    .btn,
    .alert,
    .invoice-list-page {
        display: none !important;
    }

    .app-wrapper,
    .main-content,
    .page-content,
    .invoice-detail-page {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        box-shadow: none !important;
        border: 0 !important;
    }

    .invoice-paper {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        color: #000 !important;
    }

    .invoice-paper .table-responsive {
        overflow: visible !important;
    }

    .invoice-items-table {
        width: 100% !important;
        font-size: 9pt !important;
    }

    .invoice-items-table thead {
        display: table-header-group;
    }

    .invoice-items-table tr {
        break-inside: avoid;
    }

    .invoice-totals {
        background: #faf7f8 !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
    }

    .invoice-header,
    .invoice-section-label,
    .invoice-footer {
        break-inside: avoid;
    }

    .invoice-paper * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
