/* --- VARIABLE WARNA --- */
:root {
    --bg-main: #3b82f6;
    --bg-header: #ffffff;
    --text-color: #000000;
    --line-color: #000000;
    --btn-start: #ffffff; 
    --sidebar-bg: #ffffff;
    --box-bg: rgba(255, 255, 255, 0.85);
    --sub-text: #666666;
    --item-bg: #f3f3f3;
}

body.dark-mode {
    --bg-main: #1e3a8a;
    --bg-header: #1a1a1a;
    --text-color: #ffffff;
    --line-color: #ffffff;
    --btn-start: #262626; 
    --sidebar-bg: #262626;
    --box-bg: rgba(30, 30, 30, 0.85);
    --sub-text: #bbbbbb;
    --item-bg: #333333;
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
    transition: background-color 0.3s, color 0.3s;
}

body {
    height: 100vh; height: 100dvh; 
    display: flex; flex-direction: column; overflow: hidden;
    background-color: var(--bg-header);
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes dropdownSlide { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scroll-left { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes dots { 0%, 20% { content: ''; } 40% { content: '.'; } 60% { content: '..'; } 80%, 100% { content: '...'; } }
@keyframes zoomIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.rotate-180 { transform: rotate(180deg); }

/* --- COMPONENTS --- */
.running-text-container {
    background-color: var(--bg-header); height: 40px;
    border-bottom: 4px solid var(--line-color);
    display: flex; align-items: center; overflow: hidden;
    color: var(--text-color); flex-shrink: 0; z-index: 25;
}
.scrolling-text {
    display: inline-block; font-weight: bold; font-size: 14px;
    white-space: nowrap; animation: scroll-left 20s linear infinite;
}

header {
    background-color: var(--bg-header); height: 80px;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; border-bottom: 4px solid var(--line-color);
    position: relative; z-index: 20; flex-shrink: 0;
}

.photo-box {
    width: 50px; height: 50px; background-color: #ddd;
    border: 3px solid var(--line-color); display: flex;
    justify-content: center; align-items: center; overflow: hidden;
}
.store-name {
    position: absolute; left: 50%; transform: translateX(-50%);
    font-size: 24px; font-weight: 900; text-transform: uppercase;
    letter-spacing: 2px; color: var(--text-color);
}
.menu-btn { cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.menu-btn div { width: 30px; height: 4px; background-color: var(--line-color); }

/* --- SIDEBAR --- */
#sidebar {
    position: fixed; top: 0; right: -80%; width: 80%; max-width: 300px; height: 100%;
    background-color: var(--sidebar-bg); border-left: 4px solid var(--line-color);
    z-index: 1000; transition: 0.4s ease-in-out; padding: 20px;
    display: flex; flex-direction: column; align-items: center; color: var(--text-color);
    overflow-y: auto;
}
#sidebar.active { right: 0; }
.sidebar-logo { width: 100px !important; height: 100px !important; margin: 0 auto 15px !important; }
.sidebar-divider { width: 100%; height: 4px; background-color: var(--line-color); margin: 20px 0; }
.side-btn {
    width: 100%; padding: 15px; background-color: var(--btn-start);
    border: 3px solid var(--line-color); margin-bottom: 10px;
    font-weight: 900; cursor: pointer; text-align: left;
    box-shadow: 4px 4px 0px var(--line-color); color: var(--text-color);
    display: flex; justify-content: space-between; align-items: center;
    opacity: 0; transition: transform 0.2s ease, background-color 0.3s;
}
.side-btn:hover { background-color: #e5e5e5; transform: translateX(5px); }
body.dark-mode .side-btn:hover { background-color: #404040; }
.btn-blue-sidebar { background-color: #3b82f6 !important; color: #ffffff !important; }
.btn-blue-sidebar:hover { background-color: #2563eb !important; }
.coming-soon { font-size: 10px; background: #000; color: #fff; padding: 2px 4px; border-radius: 2px; margin-left: 5px; }
.owner-options {
    display: none; width: 100%; margin-top: -5px; margin-bottom: 15px;
    border: 3px solid var(--line-color); background: #f9f9f9;
    box-shadow: 4px 4px 0px var(--line-color); animation: dropdownSlide 0.3s ease forwards;
}
.owner-options a { 
    display: flex; align-items: center; padding: 12px; text-decoration: none; 
    color: #000; font-weight: bold; border-bottom: 2px solid var(--line-color); font-size: 13px;
}
.owner-options a:last-child { border-bottom: none; }
.owner-options i { margin-right: 10px; width: 20px; text-align: center; font-size: 18px; }

/* --- MAIN --- */
main {
    background-color: var(--bg-main); flex: 1; display: flex;
    flex-direction: column; align-items: center;
    background-image: linear-gradient(var(--line-color) 2px, transparent 2px), linear-gradient(90deg, var(--line-color) 2px, transparent 2px);
    background-size: 80px 80px; position: relative; z-index: 1; padding: 20px;
    overflow-y: auto; overflow-x: hidden;
}
main::before {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; 
    background-image: url('https://api.deline.web.id/86Gt6CBHNt.png');
    background-repeat: no-repeat; background-position: right bottom; background-size: contain; pointer-events: none;
}
#landing-page { display: flex; justify-content: center; align-items: center; width: 100%; height: 100%; }
#main-content { 
    display: none; width: 100%; min-height: 100%; justify-content: flex-start; 
    align-items: center; flex-direction: column; padding-top: 20px; padding-bottom: 50px;
    animation: fadeInUp 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* --- BUTTONS & BOXES --- */
.btn-start {
    background-color: var(--btn-start); color: var(--text-color); font-size: 2rem;
    font-weight: 900; padding: 15px 40px; border: 4px solid var(--line-color);
    cursor: pointer; box-shadow: 8px 8px 0px 0px var(--line-color);
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-start:hover { transform: translate(2px, 2px); box-shadow: 6px 6px 0px 0px var(--line-color); }
.content-box {
    background: var(--box-bg); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 4px solid var(--line-color); padding: 30px 20px; width: 100%; max-width: 450px;
    box-shadow: 10px 10px 0px var(--line-color); text-align: center; margin-bottom: 20px;
}
.notes-container {
    background: var(--box-bg); backdrop-filter: blur(8px); border: 4px solid var(--line-color);
    padding: 20px; width: 100%; max-width: 450px; box-shadow: 10px 10px 0px var(--line-color);
    text-align: left; margin-bottom: 50px;
}
.welcome-text { font-size: 22px; font-weight: 900; font-style: italic; text-transform: uppercase; color: var(--text-color); margin-bottom: 10px; }
.sub-text { font-size: 12px; color: var(--sub-text); margin-bottom: 25px; font-weight: bold; line-height: 1.4; }
.input-group { text-align: left; margin-bottom: 15px; }
.input-group label { display: block; font-weight: 900; margin-bottom: 5px; font-size: 14px; color: var(--text-color); }
.input-group input {
    width: 100%; padding: 10px; border: 3px solid var(--line-color);
    font-family: inherit; font-weight: bold; background: #fff; outline: none; color: #000;
}
.product-select-box {
    width: 100%; padding: 12px; background-color: #ffffff; border: 3px solid var(--line-color); 
    color: var(--text-color); font-weight: 900; cursor: pointer; display: flex;
    justify-content: space-between; align-items: center; margin-bottom: 5px;
}
body.dark-mode .product-select-box { background-color: #333333; color: #ffffff; }
.product-btn {
    width: 100%; padding: 12px; background: var(--btn-start); border: 3px solid var(--line-color);
    font-weight: bold; cursor: pointer; text-align: left; display: flex; justify-content: space-between;
    align-items: center; color: var(--text-color); margin-bottom: 5px;
}
.product-dropdown { display: none; border: 3px solid var(--line-color); border-top: none; background: var(--item-bg); margin-bottom: 10px; }
.variant-item { padding: 10px; border-bottom: 2px solid var(--line-color); display: flex; justify-content: space-between; cursor: pointer; font-size: 13px; color: var(--text-color); opacity: 0; animation: dropdownSlide 0.3s ease forwards; }
.variant-item:hover { background: #d4d4d4; color: #000; }
body.dark-mode .variant-item:hover { background: #555; color: #fff; }
.status-badge { font-size: 10px; padding: 2px 6px; border: 2px solid var(--line-color); font-weight: 900; margin-right: 10px; }
.status-open { background: #4ade80; color: #000; }
.status-close { background: #f87171; color: #000; }
.order-box { min-height: 80px; border: 3px solid var(--line-color); background: #fff; padding: 10px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.order-item { display: flex; justify-content: space-between; align-items: center; background: var(--btn-start); border: 2px solid var(--line-color); padding: 8px; font-weight: bold; font-size: 12px; color: var(--text-color); box-shadow: 2px 2px 0px var(--line-color); animation: dropdownSlide 0.3s ease forwards; }
.btn-remove { background: #ff4444; color: white; border: 2px solid var(--line-color); width: 20px; height: 20px; display: flex; justify-content: center; align-items: center; cursor: pointer; font-size: 10px; margin-left: 10px; }
.btn-checkout { width: 100%; padding: 15px; font-size: 16px; font-weight: 900; text-transform: uppercase; border: 3px solid var(--line-color); cursor: pointer; box-shadow: 4px 4px 0px var(--line-color); transition: 0.3s; background-color: #d1d5db; color: #6b7280; pointer-events: none; }
.btn-checkout.active { background-color: #4ade80; color: #000; pointer-events: auto; }
.notes-box { border: 3px dashed var(--line-color); background: #fff; padding: 15px; color: #000; font-weight: bold; font-size: 13px; line-height: 1.6; }

/* --- MODALS --- */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px); z-index: 3000; justify-content: center; align-items: center; }
.modal-box { background: var(--bg-header); border: 4px solid var(--line-color); padding: 30px; width: 90%; max-width: 400px; text-align: center; box-shadow: 10px 10px 0px #000; animation: zoomIn 0.3s ease-out forwards; color: var(--text-color); }
.modal-title { font-size: 20px; font-weight: 900; margin-bottom: 20px; text-transform: uppercase; }
.btn-modal { display: block; width: 100%; padding: 12px; margin-bottom: 10px; font-weight: bold; text-decoration: none; border: 3px solid var(--line-color); box-shadow: 4px 4px 0px var(--line-color); color: #fff; cursor: pointer; text-align: left; }
.btn-modal:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0px var(--line-color); }
.btn-wa { background: #25D366; } .btn-tele { background: #0088cc; } .btn-cancel { background: #ff4444; color: #fff; margin-top: 15px; text-align: center;}
.btn-tool { background: #3b82f6; color: white; display:flex; justify-content: space-between; align-items: center;}
body.dark-mode .btn-tool { background: #1e3a8a; }

/* --- TOOLS SPECIFIC --- */
.tool-input { width: 100%; padding: 12px; border: 3px solid var(--line-color); font-weight: bold; margin-bottom: 15px; outline: none; }
.btn-confirm-tool { width: 100%; padding: 12px; background: #22c55e; color: #000; font-weight: 900; border: 3px solid var(--line-color); cursor: pointer; box-shadow: 4px 4px 0px var(--line-color); margin-bottom: 15px; text-transform: uppercase; }
.btn-confirm-tool:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0px var(--line-color); }
.tool-result-container { margin-top: 20px; width: 100%; }
.video-wrapper { width: 100%; border: 3px solid var(--line-color); background: #000; margin-bottom: 10px; }
.video-wrapper video { width: 100%; display: block; }
.btn-download { display: block; width: 100%; padding: 10px; background: #3b82f6; color: #fff; border: 3px solid var(--line-color); text-align: center; font-weight: bold; text-decoration: none; box-shadow: 4px 4px 0px var(--line-color); }
.author-info { font-size: 12px; font-weight: bold; margin-bottom: 10px; text-align: left; border-bottom: 2px dashed var(--line-color); padding-bottom: 5px; }

/* --- LOADING & TOAST --- */
#loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: var(--bg-main); display: none; flex-direction: column; justify-content: center; align-items: center; z-index: 2000; }
.spinner { width: 60px; height: 60px; border: 8px solid var(--line-color); border-top: 8px solid var(--btn-start); border-radius: 50%; animation: spin 1s linear infinite; }
.loading-text { color: var(--text-color); font-weight: 900; margin-top: 20px; font-size: 24px; position: relative; }
.loading-text::after { content: ''; animation: dots 2s steps(4, end) infinite; position: absolute; left: 100%; width: 1.5em; text-align: left; }
#custom-toast { visibility: hidden; min-width: 250px; margin-left: -125px; background-color: var(--btn-start); color: var(--text-color); text-align: center; border: 3px solid var(--line-color); padding: 16px; position: fixed; z-index: 9999; left: 50%; bottom: 30px; font-size: 14px; font-weight: 900; box-shadow: 4px 4px 0px var(--line-color); opacity: 0; transition: opacity 0.3s, bottom 0.3s; }
#custom-toast.show { visibility: visible; opacity: 1; bottom: 50px; }
.overlay-bg { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.5); z-index: 999; }

/* --- CALCULATOR --- */
.calculator-box { max-width: 350px !important; padding: 20px !important; }
.calc-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 2px solid var(--line-color); padding-bottom: 10px; }
.calc-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.calc-keys button { padding: 15px; font-size: 18px; font-weight: bold; border: 2px solid var(--line-color); cursor: pointer; background: var(--btn-start); color: var(--text-color); box-shadow: 3px 3px 0px var(--line-color); }
.calc-keys button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0px var(--line-color); }
.key-ac { background: #ef4444 !important; color: white !important; }
.key-del { background: #fca5a5 !important; color: #000 !important; }
.key-op { background: #3b82f6 !important; color: white !important; }
.key-eq { background: #22c55e !important; color: #000 !important; box-shadow: 3px 3px 0px #000 !important; }
#calc-display { width: 100%; height: 70px; margin-bottom: 15px; background: var(--item-bg); border: 3px solid var(--line-color); text-align: right; padding: 10px; font-size: 28px; font-weight: bold; color: var(--text-color); outline: none; letter-spacing: 2px; }
