:root {
    --surface-primary: #ffffff;
    --surface-secondary: #fbfcf7;
    --surface-tertiary: #f4f7ed;
    --text-primary: #12412C;
    --text-secondary: #3b5c49;
    --border-color: #d6e2d9;
    --accent: #12412C;
    --accent-hover: #0b2b1d;
    --accent-light: #e8f4ec;
    
    --color-blue: #12412C;
    --color-cyan: #2a6f4d;
    --color-purple: #1b4d3e;
    --color-pink: #d97706;
    --color-green: #12412C;
    --color-amber: #d97706;
    
    --blue-light: #f1f8f3;
    --cyan-light: #f2f7f4;
    --purple-light: #f3f6f3;
    --pink-light: #fef9e7;
    --green-light: #f1f8f3;
    --amber-light: #fef9e7;
    
    --success: #12412C;
    --warning: #d97706;
    --danger: #ef4444;
    --shadow-xs: 0 2px 4px rgba(18, 65, 44, 0.08);
    --shadow-sm: 0 4px 8px rgba(18, 65, 44, 0.1);
    --shadow-md: 0 8px 16px rgba(18, 65, 44, 0.12);
    --shadow-lg: 0 12px 24px rgba(18, 65, 44, 0.15);
    --shadow-xl: 0 20px 32px rgba(18, 65, 44, 0.2);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #fbfcf7 0%, #f4f7ed 50%, #fef9e7 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #12412C 0%, #2a6f4d 50%, #fef08a 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(254, 240, 138, 0.15) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(30px); }
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(18, 65, 44, 0.3);
    position: relative;
    z-index: 1;
}

.login-card h1 {
    margin: 0 0 12px;
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(135deg, #12412C 0%, #2a6f4d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-description {
    margin: 0 0 32px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.help-text {
    margin: 0 0 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.login-card button.btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    font-size: 15px;
}

/* Container & Layout */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    padding: 28px 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f4f7ed 100%);
    border-radius: 12px;
    border: 1px solid rgba(18, 65, 44, 0.15);
    box-shadow: 0 4px 12px rgba(18, 65, 44, 0.08);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(254, 240, 138, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.header > * {
    position: relative;
    z-index: 1;
}

.page-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-description {
    margin: 8px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #12412C 0%, #2a6f4d 100%);
    color: #fef08a;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(18, 65, 44, 0.3);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(254, 240, 138, 0.25);
    transition: left 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(18, 65, 44, 0.4);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: translateY(0);
}

/* Grid & Cards */
.grid {
    display: grid;
    gap: 20px;
}

.summary-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card, .panel {
    background: var(--surface-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--shadow-xs);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-light);
}

/* Card dengan warna berbeda */
.card:nth-child(1) {
    border-left: 4px solid var(--color-blue);
    background: linear-gradient(135deg, var(--surface-primary) 0%, var(--blue-light) 100%);
}

.card:nth-child(1) .card-title {
    color: var(--color-blue);
}

.card:nth-child(1) .card-value {
    color: var(--color-blue);
}

.card:nth-child(2) {
    border-left: 4px solid var(--color-cyan);
    background: linear-gradient(135deg, var(--surface-primary) 0%, var(--cyan-light) 100%);
}

.card:nth-child(2) .card-title {
    color: var(--color-cyan);
}

.card:nth-child(2) .card-value {
    color: var(--color-cyan);
}

.card:nth-child(3) {
    border-left: 4px solid var(--color-purple);
    background: linear-gradient(135deg, var(--surface-primary) 0%, var(--purple-light) 100%);
}

.card:nth-child(3) .card-title {
    color: var(--color-purple);
}

.card:nth-child(3) .card-value {
    color: var(--color-purple);
}

.card:nth-child(4) {
    border-left: 4px solid var(--color-green);
    background: linear-gradient(135deg, var(--surface-primary) 0%, var(--green-light) 100%);
}

.card:nth-child(4) .card-title {
    color: var(--color-green);
}

.card:nth-child(4) .card-value {
    color: var(--color-green);
}

.card-title {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.card-value {
    margin: 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.panel {
    background: linear-gradient(135deg, #ffffff 0%, #f4f7ed 100%);
    border: 1px solid rgba(18, 65, 44, 0.15);
}

.panel h3 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom: 2px solid rgba(18, 65, 44, 0.15);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--surface-primary) 0%, var(--surface-secondary) 100%);
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-blue);
    background: linear-gradient(135deg, var(--surface-primary) 0%, var(--blue-light) 100%);
    box-shadow: 0 0 0 3px var(--accent-light);
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(18, 65, 44, 0.15);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--surface-primary) 0%, var(--surface-secondary) 100%);
    box-shadow: 0 4px 12px rgba(18, 65, 44, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

th {
    background: linear-gradient(135deg, var(--surface-tertiary) 0%, var(--blue-light) 100%);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

tbody tr {
    transition: background-color 0.15s ease, transform 0.15s ease;
}

tbody tr:hover {
    background: linear-gradient(135deg, var(--surface-secondary) 0%, var(--blue-light) 100%);
}

/* Status Badges */
.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.status:hover {
    transform: scale(1.05);
}

.status.Proses {
    background: linear-gradient(135deg, #fef9e7 0%, #fef08a 100%);
    color: #854d0e;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.2);
}

.status.Selesai {
    background: linear-gradient(135deg, #f1f8f3 0%, #d1fae5 100%);
    color: #065f46;
    box-shadow: 0 2px 8px rgba(18, 65, 44, 0.2);
}

.status.Diambil {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
    box-shadow: 0 2px 8px rgba(3, 105, 161, 0.2);
}

.actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 6px;
    color: #fef08a;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.actions a:hover {
    transform: translateY(-2px);
}

.edit-btn {
    background: linear-gradient(135deg, #12412C 0%, #2a6f4d 100%);
    box-shadow: 0 2px 8px rgba(18, 65, 44, 0.3);
}

.edit-btn:hover {
    box-shadow: 0 4px 12px rgba(18, 65, 44, 0.4);
}

.secondary-btn {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    box-shadow: 0 2px 8px rgba(20, 184, 166, 0.3);
}

.secondary-btn:hover {
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.delete-btn:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.receipt-toolbar {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 20px 16px 0;
    background: #f5f5f5;
}

.receipt-toolbar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background: #12412C;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Segoe UI', sans-serif;
}

.receipt-wrapper {
    width: 100%;
    min-height: calc(100vh - 72px);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    padding: 20px 24px 32px;
}

.receipt-box {
    width: 100%;
    max-width: 390px;
    margin: 0 auto;
    background: linear-gradient(180deg, #fffdf5 0%, #ffffff 100%);
    border: 2px solid #1b3a2b;
    border-radius: 18px;
    padding: 18px 16px 20px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 12px 28px rgba(18, 65, 44, 0.12);
    color: #123124;
    position: relative;
    overflow: hidden;
}

.receipt-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(18, 65, 44, 0.06), rgba(254, 240, 138, 0.08));
    pointer-events: none;
}

.receipt-box > * {
    position: relative;
    z-index: 1;
}

.receipt-box .brand-wrap,
.receipt-box .title,
.receipt-box .divider,
.receipt-box .section-label,
.receipt-box .thanks {
    text-align: center;
}

.receipt-box .brand-wrap {
    margin-bottom: 8px;
}

.receipt-box .brand {
    font-weight: 800;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: 1px;
    color: #12412c;
}

.receipt-box .brand-sub {
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 2px;
    color: #1d6a4e;
}

.receipt-box .title {
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: 700;
    color: #1c2d26;
}

.receipt-box .divider {
    border-top: 1px dashed #1c2d26;
    border-bottom: 1px dashed #1c2d26;
    margin: 10px 0;
    padding: 6px 0;
    min-height: 1px;
}

.receipt-box .section-label {
    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 700;
    margin: 4px 0 8px;
}

.receipt-box .meta {
    display: grid;
    gap: 5px;
    font-size: 11px;
    margin-bottom: 8px;
}

.receipt-box .meta-row,
.receipt-box .item-row,
.receipt-box .total-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    line-height: 1.5;
}

.receipt-box .meta-row span {
    min-width: 82px;
}

.receipt-box .meta-row strong {
    flex: 1;
    text-align: right;
    font-weight: 700;
}

.receipt-box .item-row {
    margin: 6px 0;
    align-items: flex-start;
}

.receipt-box .item-row .name {
    flex: 1;
    white-space: normal;
}

.receipt-box .item-row .price {
    min-width: 90px;
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
}

.receipt-box .total-row {
    font-weight: 700;
    margin-top: 6px;
    padding: 8px 0;
    border-top: 1px solid #1c2d26;
    border-bottom: 1px solid #1c2d26;
}

.receipt-box .payment-row {
    margin-top: 8px;
}

.receipt-box .thanks {
    margin-top: 14px;
    font-size: 10px;
    line-height: 1.7;
}

.receipt-box .thanks-line {
    display: block;
    margin-bottom: 4px;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 1px;
    color: #12412c;
}

@media print {
    @page {
        size: 80mm auto;
        margin: 0;
    }

    html, body {
        background: #fff;
        margin: 0;
        padding: 0;
        width: 100%;
        min-height: 100%;
    }

    body {
        display: block;
    }

    .no-print,
    .receipt-toolbar {
        display: none !important;
    }

    .receipt-wrapper {
        min-height: auto;
        background: #fff;
        padding: 0;
        display: block;
    }

    .receipt-box {
        max-width: 100%;
        width: 100%;
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 12px 12px 14px;
    }
}

/* Messages & Alerts */
.message {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f1f8f3 0%, #d1fae5 100%);
    border: 1.5px solid rgba(18, 65, 44, 0.3);
    color: #065f46;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(18, 65, 44, 0.15);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .summary-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    th, td {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .actions a {
        padding: 4px 8px;
        font-size: 11px;
    }
}