/* =====================================================
   GopekPrint - Stylesheet Utama (Versi Final Tersusun Rapi)
   Tema: Skeuomorphism (Realistis 3D / Mesin Cetak Fisik)
   ===================================================== */

/* ---------- 1. Variabel & Base (Dasar) ---------- */
:root {
    --bg-desk: #D9DEE4;
    --panel-top: #F9FAFB;
    --panel-bottom: #E2E6EC;
    --text-main: #333945;
    --text-muted: #646E82;
    --border-light: #FFFFFF;
    --border-dark: #A5AEBD;
    --btn-blue-top: #6CB0FF;
    --btn-blue-bottom: #2475DB;
    --btn-orange-top: #FFAD5C;
    --btn-orange-bottom: #E06C00;
    --radius-lg: 10px;
    --radius-md: 6px;
    --radius-sm: 4px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0; min-height: 100vh;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-main); background-color: var(--bg-desk);
    overflow-x: hidden; width: 100%;
}

body {
    background-image: 
        linear-gradient(90deg, rgba(255,255,255,0.4) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.4) 1px, transparent 1px);
    background-size: 20px 20px;
    background-attachment: fixed;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
}

h1, h2, h3, h4 { margin: 0 0 0.4em 0; letter-spacing: -0.02em; color: #22262E; }
a { color: #1B5DAB; text-decoration: none; font-weight: bold; }
a:hover { text-decoration: underline; }
p { line-height: 1.6; color: var(--text-muted); }

/* ---------- 2. Layout & Card (Tata Letak) ---------- */
.wrapper {
    max-width: 1180px; margin: 0 auto; padding: 0 20px; padding-top: 80px; overflow-x: hidden;
}
.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.form-centered { max-width: 680px; margin: 0 auto; }
.grid-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: start; }
.grid-2 > div { min-width: 0; } 

.glass, .glass-strong {
    background: linear-gradient(to bottom, var(--panel-top), var(--panel-bottom));
    border: 1px solid var(--border-dark); border-top-color: var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 #FFFFFF;
}

.card { padding: 26px; margin-bottom: 24px; }
.card h3 { font-size: 18px; margin-bottom: 4px; border-bottom: 1px solid #A5AEBD; padding-bottom: 8px; box-shadow: 0 1px 0 #FFF; }
.card .card-sub { font-size: 13.5px; color: var(--text-muted); margin-bottom: 20px; margin-top: 10px;}

/* ---------- 3. Navbar & Logo ---------- */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: linear-gradient(to bottom, #F4F6F9, #CED4DD);
    border-bottom: 1px solid #949BA8; box-shadow: 0 3px 6px rgba(0,0,0,0.1), inset 0 1px 0 #FFFFFF;
}
.navbar-inner {
    max-width: 1180px; margin: 0 auto; padding: 12px 20px;
    display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; text-shadow: 0 1px 0 #FFF; }
.brand-img { height: 38px; width: auto; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.3); border: 1px solid #A5AEBD; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-user { font-size: 14px; color: var(--text-muted); }

.auth-logo { height: 64px; width: auto; margin: 0 auto 16px; display: block; border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,0.3); border: 2px solid #A5AEBD; }

/* ---------- 4. Tombol Utama & Aksi Mengambang ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 22px; border-radius: var(--radius-sm); font-weight: bold; font-size: 15px; cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4); color: #FFF; transition: transform 0.1s, box-shadow 0.1s;
}
.btn:active { box-shadow: inset 0 3px 6px rgba(0,0,0,0.4); transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary { background: linear-gradient(to bottom, var(--btn-blue-top), var(--btn-blue-bottom)); }
.btn-accent { background: linear-gradient(to bottom, var(--btn-orange-top), var(--btn-orange-bottom)); }
.btn-ghost { background: linear-gradient(to bottom, #F9F9F9, #DDE1E8); color: var(--text-main); text-shadow: 0 1px 0 #FFF; border-color: #B5BDC9; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 14px; font-size: 13px; }

/* Tombol Floating Kanan Kiri (Bantuan & Riwayat) */
.btn-help, .btn-history {
    position: fixed; bottom: 24px; width: 54px; height: 54px; border-radius: 50%; border: 2px solid #FFF; 
    cursor: pointer; z-index: 999; display: flex; align-items: center; justify-content: center; 
    transition: transform 0.1s, box-shadow 0.1s;
}
.btn-help {
    right: 24px; background: linear-gradient(to bottom, var(--btn-blue-top), var(--btn-blue-bottom));
    box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 2px 4px rgba(255,255,255,0.5);
    color: #FFF; font-size: 26px; font-weight: bold; font-family: 'Helvetica', sans-serif; text-shadow: 0 -1px 0 rgba(0,0,0,0.4); 
}
.btn-help:active { transform: translateY(2px) scale(0.95); box-shadow: 0 2px 5px rgba(0,0,0,0.3), inset 0 4px 8px rgba(0,0,0,0.4); }

.btn-history {
    left: 24px; background: linear-gradient(to bottom, #FAFAFA, #E2E6EC); border-color: #A5AEBD; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 2px 4px #FFF; color: #333; font-size: 24px; 
}
.btn-history:active { transform: translateY(2px) scale(0.95); box-shadow: 0 2px 5px rgba(0,0,0,0.3), inset 0 2px 4px rgba(0,0,0,0.1); }

/* Badge Angka Notifikasi di Tombol Riwayat */
.cart-badge {
    position: absolute; top: -5px; right: -5px; background: linear-gradient(to bottom, #FF4D4D, #D32F2F);
    color: #FFFFFF; font-size: 11px; font-weight: 800; min-width: 22px; height: 22px; line-height: 18px;
    padding: 0 5px; border-radius: 12px; border: 2px solid #FFFFFF; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.4); display: flex; align-items: center; justify-content: center;
    box-sizing: border-box; animation: popBadge 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popBadge { from { transform: scale(0); } to { transform: scale(1); } }

/* Tombol Hapus File (Silang Merah) */
.btn-hapus-file {
    background: linear-gradient(to bottom, #F0BDBD, #D18282); border: 1px solid #9C4B4B; color: white; border-radius: 50%;
    width: 22px; height: 22px; font-size: 10px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 4px rgba(0,0,0,0.2); padding: 0; flex-shrink: 0;
}
.btn-hapus-file:hover { background: linear-gradient(to bottom, #E8AFAF, #C47272); }
.btn-hapus-file:active { box-shadow: inset 0 2px 5px rgba(0,0,0,0.4); transform: translateY(1px); }

/* ---------- 5. Form & Alert ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: bold; margin-bottom: 6px; text-shadow: 0 1px 0 #FFF; }
.field .hint { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; display: block; }
input[type="text"], input[type="tel"], input[type="password"], select {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); background: #FFFFFF;
    border: 1px solid var(--border-dark); border-top-color: #7D8696;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1), 0 1px 0 rgba(255,255,255,0.8);
    color: #222; font-size: 15px; outline: none; text-shadow: none;
}
input:focus, select:focus { border-color: #2475DB; box-shadow: inset 0 2px 4px rgba(0,0,0,0.1), 0 0 6px rgba(36, 117, 219, 0.6); }
input[type="file"] { padding: 8px; cursor: pointer; }
input[type="file"]::file-selector-button {
    background: linear-gradient(to bottom, var(--panel-top), var(--panel-bottom)); color: var(--text-main);
    border: 1px solid #A5AEBD; box-shadow: inset 0 1px 0 #FFF, 0 1px 2px rgba(0,0,0,0.1);
    border-radius: 4px; padding: 6px 12px; margin-right: 12px; font-weight: bold; text-shadow: 0 1px 0 #FFF; cursor: pointer;
}

.auth-card { width: 100%; max-width: 440px; padding: 36px 32px; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 28px; background: #C4CAD4; border: 1px solid #9EA6B3; border-top-color: #8A92A0; box-shadow: inset 0 2px 5px rgba(0,0,0,0.15), 0 1px 0 #FFF; border-radius: var(--radius-sm); padding: 4px; }
.auth-tabs a { flex: 1; text-align: center; padding: 8px 0; border-radius: 4px; color: #5B6370; font-weight: bold; font-size: 14px; text-shadow: 0 1px 0 #FFF; }
.auth-tabs a.active { background: linear-gradient(to bottom, #FAFAFA, #E6E9ED); color: var(--text-main); border: 1px solid #9EA6B3; box-shadow: 0 2px 4px rgba(0,0,0,0.1), inset 0 1px 0 #FFF; }
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h1 { font-size: 22px; }
.auth-header p { font-size: 14px; margin: 0; }

.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; font-weight: bold; box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 4px rgba(0,0,0,0.1); word-break: break-word; }
.alert-success { background: linear-gradient(to bottom, #E1F0D8, #C4E2A8); border: 1px solid #8EBE63; color: #37591A; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
.alert-error { background: linear-gradient(to bottom, #F9E0E0, #F0BDBD); border: 1px solid #D18282; color: #782C2C; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
.alert-info { background: linear-gradient(to bottom, #E0ECF9, #BDD8F0); border: 1px solid #82A9D1; color: #2C4E78; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }

/* ---------- 6. Fitur Dashboard (Pembeli) ---------- */
.hero { padding: 46px 0 28px; text-align: center; }
.hero h1 { font-size: 30px; text-shadow: 0 2px 0 #FFF; }
.hero p { max-width: 560px; margin: 0 auto; }

.dropzone { background: #FFFFFF; border: 2px dashed #9BA4B5; border-radius: var(--radius-sm); padding: 30px 20px; text-align: center; box-shadow: inset 0 3px 8px rgba(0,0,0,0.05); position: relative; cursor: pointer; overflow: hidden; }
.dropzone:hover { background: #F8FAFC; border-color: #2475DB; }
.dropzone-icon { font-size: 30px; margin-bottom: 10px; text-shadow: none; }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone .fname { color: #1B5DAB; font-weight: bold; font-size: 13.5px; margin-top: 10px; word-break: break-all; overflow-wrap: break-word; line-height: 1.4; }

.scan-status { display: none; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; font-weight: bold; }
.scan-status.active { display: flex; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid #C4CAD4; border-top-color: #2475DB; animation: spin 0.8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-track { width: 100%; height: 14px; background: #D5D9E0; border: 1px solid #9A9FA8; border-top-color: #7A808C; box-shadow: inset 0 2px 4px rgba(0,0,0,0.2), 0 1px 0 #FFF; border-radius: 10px; margin-top: 8px; overflow: hidden; }
.progress-fill { height: 100%; width: 0%; background: linear-gradient(to bottom, #7EE05A, #3A9C18); box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -1px 0 rgba(0,0,0,0.2); border-right: 1px solid #23610D; border-radius: 10px; transition: width 0.2s ease; }

.result-box { display: none; margin-top: 22px; }
.result-box.active { display: block; }
.result-rows { display: flex; flex-direction: column; gap: 1px; background: #C4CAD4; padding: 1px; border-radius: 4px; border: 1px solid #9A9FA8; box-shadow: 0 1px 0 #FFF; }
.result-row { background: #FAFAFA; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.result-row:first-child { border-top-left-radius: 3px; border-top-right-radius: 3px; }
.result-row:last-child { border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; }
.row-info { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.result-row .tag { font-size: 14.5px; font-weight: bold; display: flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.3); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4); flex-shrink: 0; }
.dot-bw { background: linear-gradient(to bottom, #E2E6EC, #A5AEBD); }
.dot-color { background: linear-gradient(to bottom, #FFAD5C, #E06C00); }
.result-row .val { font-size: 13px; color: var(--text-muted); margin-left: 20px; font-weight: bold; }
.result-row .price { font-weight: bold; font-size: 17px; color: #222; text-shadow: none; white-space: nowrap; text-align: right; }
.total-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; margin-top: 14px; background: #FFFCE8; border: 1px solid #D1CBA8; border-left: 6px dashed #D1CBA8; box-shadow: inset 0 0 10px rgba(0,0,0,0.02), 0 2px 4px rgba(0,0,0,0.1); color: #222; text-shadow: none; }
.total-row .label { font-size: 14px; font-weight: bold; }
.total-row .amount { font-size: 24px; font-weight: 800; font-family: 'Courier New', Courier, monospace; letter-spacing: -1px; }

.qris-box { text-align: center; padding: 22px; background: #FFF; border: 1px solid #CCC; border-radius: 4px; box-shadow: inset 0 0 10px rgba(0,0,0,0.05); }
.qris-box img { width: 190px; height: 190px; border: 2px solid #EEE; padding: 4px; margin: 0 auto 14px; display: block; }

.steps { display: flex; flex-direction: column; gap: 18px; }
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-num { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(to bottom, #FFF, #E2E6EC); border: 1px solid #A5AEBD; box-shadow: 0 2px 3px rgba(0,0,0,0.15); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; color: #1B5DAB; flex-shrink: 0; text-shadow: 0 1px 0 #FFF; }
.step h4 { font-size: 15px; margin-bottom: 2px; }
.step p { font-size: 13px; margin: 0; }

.badge { padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: bold; white-space: nowrap; border: 1px solid rgba(0,0,0,0.2); box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 1px 2px rgba(0,0,0,0.1); text-shadow: 0 -1px 0 rgba(0,0,0,0.2); color: #FFF; }
.badge-wait { background: linear-gradient(to bottom, #FFCD66, #D19417); }
.badge-process { background: linear-gradient(to bottom, #6CB0FF, #2475DB); }
.badge-done { background: linear-gradient(to bottom, #7EE05A, #3A9C18); }

/* ---------- 7. Fitur Admin (Tabel & Statistik) ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.stat-card { padding: 16px; text-align: center; }
.stat-card .stat-label { font-size: 12px; font-weight: bold; color: var(--text-muted); margin-bottom: 4px; text-transform: uppercase; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; text-shadow: 0 1px 0 #FFF; color: #222; }
.stat-card.accent-blue .stat-value { color: #1B5DAB; }
.stat-card.accent-orange .stat-value { color: #D65A00; }

.header-tools { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #A5AEBD; padding-bottom: 12px; margin-bottom: 16px; box-shadow: 0 1px 0 #FFF; }
.search-form { display: flex; gap: 8px; }
.search-input { width: 280px; padding: 8px 12px; }
.doc-title { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-icon { font-size: 13px; margin-right: 12px; white-space: nowrap; font-weight: normal;}

/* Tabel Scroll Kiri-Kanan & Atas-Bawah Asli */
.table-wrap { 
    overflow-x: auto; 
    overflow-y: auto; 
    max-height: 65vh; 
    background: #FFF; 
    border: 1px solid #A5AEBD; 
    border-radius: 4px; 
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05); 
    -webkit-overflow-scrolling: touch; 
}
table { width: 100%; border-collapse: collapse; min-width: 860px; }
thead th { 
    position: sticky; top: 0; z-index: 2; 
    text-align: left; font-size: 12px; text-transform: uppercase; color: #444; text-shadow: 0 1px 0 #FFF; 
    padding: 10px 16px; background: linear-gradient(to bottom, #EFEFEF, #D8D8D8); 
    border-bottom: 1px solid #A5AEBD; border-right: 1px solid #C4CAD4; 
}
tbody td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid #EEE; text-shadow: none; color: #333; }
tbody tr:nth-child(even) { background: #F9F9F9; }
tbody tr:hover { background: #EAF2FA; }
tbody tr:last-child td { border-bottom: none; }

/* ---------- 8. Modal & Utilities ---------- */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.75); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-box { width: 100%; max-width: 500px; background: linear-gradient(to bottom, #F9FAFB, #E2E6EC); border-radius: var(--radius-lg); box-shadow: 0 15px 35px rgba(0,0,0,0.5), inset 0 1px 0 #FFF; overflow: hidden; animation: slideDown 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-sizing: border-box; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
.modal-header { background: linear-gradient(to bottom, #EFEFEF, #D8D8D8); border-bottom: 1px solid #A5AEBD; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: inset 0 1px 0 #FFF; }
.modal-header h3 { margin: 0; font-size: 18px; text-shadow: 0 1px 0 #FFF; }
.btn-close { background: linear-gradient(to bottom, #F0BDBD, #D18282); border: 1px solid #9C4B4B; color: white; width: 28px; height: 28px; border-radius: 50%; font-weight: bold; font-size: 16px; cursor: pointer; box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), 0 2px 4px rgba(0,0,0,0.2); display: flex; align-items: center; justify-content: center; }
.btn-close:active { box-shadow: inset 0 2px 5px rgba(0,0,0,0.4); transform: translateY(1px); }
.modal-body { padding: 20px; }
.detail-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.detail-table th { text-align: left; padding: 10px; width: 120px; border-bottom: 1px dashed #A5AEBD; color: #5B6370; text-shadow: 0 1px 0 #FFF; font-size: 13px; }
.detail-table td { padding: 10px; border-bottom: 1px dashed #A5AEBD; font-size: 14px; color: #222; text-shadow: none; }
.detail-table tr:last-child th, .detail-table tr:last-child td { border-bottom: none; }
.modal-footer { background: #D9DEE4; border-top: 1px solid #A5AEBD; padding: 16px 20px; box-shadow: inset 0 1px 0 #FFF; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.status-update-form { display: flex; align-items: center; gap: 12px; }
.status-update-form label { font-weight: bold; font-size: 14px; text-shadow: 0 1px 0 #FFF; }
.status-update-form select { flex: 1; }

.history-scroll::-webkit-scrollbar { width: 8px; }
.history-scroll::-webkit-scrollbar-track { background-color: #D9DEE4; border-radius: 4px; border: 1px solid #A5AEBD; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1); }
.history-scroll::-webkit-scrollbar-thumb { background: linear-gradient(to right, #F9FAFB, #E2E6EC); border: 1px solid #A5AEBD; border-radius: 4px; box-shadow: inset 0 1px 0 #FFF; }

.floating-credit {
    position: fixed; bottom: 42px; left: 0; right: 0; text-align: center; font-size: 11px;
    color: #646E82; font-weight: bold; text-shadow: 0 1px 0 #FFF; pointer-events: none; z-index: 998;
}

/* ---------- 9. Responsivitas Layar (HP & Tablet) ---------- */
@media (max-width: 860px) {
    .grid-2 { grid-template-columns: 1fr; }
    .form-centered { width: 100%; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .header-tools { flex-direction: column; align-items: stretch; gap: 12px; }
    .search-form { flex-direction: column; }
    .search-input { width: 100% !important; }
    .search-actions { display: flex; gap: 8px; }
    .search-actions button, .search-actions a { flex: 1; text-align: center; }
    .status-update-form { flex-direction: column; align-items: stretch; }
    .status-update-form label { margin-bottom: -4px; }
}

@media (max-width: 560px) {
    .auth-card { padding: 28px 22px; }
    .hero h1 { font-size: 24px; }
    .card { padding: 20px; }
    .total-row .amount { font-size: 20px; }
    .navbar-inner { padding: 12px 16px; }
    .nav-user { display: none; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card .stat-value { font-size: 22px; }
}

@media (max-width: 360px) {
    .floating-credit { display: none; } 
}