:root {
    --bg-deep: #060709; 
    --card-glass: rgba(15, 18, 26, 0.75);
    --gold-primary: #F7C978; 
    --gold-light: #FFE89C; 
    --gold-dark: #8A5809;
    --gold-gradient: linear-gradient(135deg, #FFE89C 0%, #D49B27 50%, #8A5809 100%);
    --gold-border: rgba(247, 201, 120, 0.35); 
    --gold-glow: rgba(247, 201, 120, 0.25);
    --text-white: #FFFFFF; 
    --text-muted: #8E96A5; 
    --green-online: #00E676; 
    --red-danger: #FF3B30;
}
* { box-sizing: border-box; margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif; -webkit-tap-highlight-color: transparent; }
body { 
    background-color: var(--bg-deep); 
    background-image: radial-gradient(ellipse at 50% -10%, rgba(247, 201, 120, 0.18) 0%, transparent 60%), radial-gradient(circle at 100% 100%, rgba(212, 155, 39, 0.08) 0%, transparent 50%); 
    color: var(--text-white); 
    padding-bottom: 90px; 
    display: flex; 
    justify-content: center; 
    width: 100%; 
    min-height: 100vh; 
    overflow-x: hidden; 
    position: relative; 
}
.app-container { width: 100%; max-width: 480px; padding: 20px 16px; display: flex; flex-direction: column; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; width: 100%; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo-wrapper { width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(145deg, #1F2432, #0A0C12); border: 1px solid var(--gold-primary); display: flex; align-items: center; justify-content: center; padding: 4px; box-shadow: 0 8px 25px var(--gold-glow); flex-shrink: 0; }
.brand-logo-img { width: 100%; height: 100%; object-fit: contain; }
.brand-text h2 { font-size: 16.5px; font-weight: 900; letter-spacing: 0.8px; background: var(--gold-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.brand-text p { font-size: 9px; color: var(--text-muted); font-weight: 600; margin-top: 3px; letter-spacing: 0.4px; }
.badge-status { background: rgba(0, 230, 118, 0.08); color: var(--green-online); border: 1px solid rgba(0, 230, 118, 0.35); font-size: 10px; padding: 7px 12px; border-radius: 20px; font-weight: 800; display: flex; align-items: center; gap: 6px; box-shadow: 0 0 15px rgba(0, 230, 118, 0.2); flex-shrink: 0; }
.dot { width: 6px; height: 6px; background: var(--green-online); border-radius: 50%; box-shadow: 0 0 10px var(--green-online); animation: blink 1.8s infinite; }

.card { background: var(--card-glass); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px); border: 1px solid var(--gold-border); border-radius: 22px; padding: 20px; margin-bottom: 18px; box-shadow: 0 15px 35px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.1); width: 100%; }
.card-title { font-size: 11px; font-weight: 900; color: var(--gold-primary); margin-bottom: 14px; letter-spacing: 0.8px; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }

.exchange-box { background: rgba(6, 8, 12, 0.85); border: 1px solid var(--gold-border); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.rate-highlight { display: flex; justify-content: space-between; align-items: center; font-size: 14.5px; font-weight: 900; color: var(--gold-primary); }
.calc-box { display: flex; gap: 8px; width: 100%; margin-top: 8px; }
.calc-input { flex: 1; background: rgba(6, 8, 12, 0.95); border: 1px solid var(--gold-border); border-radius: 14px; padding: 14px; color: #fff; font-size: 13px; font-weight: 600; outline: none; transition: 0.3s; }
.calc-input:focus { border-color: var(--gold-primary); box-shadow: 0 0 15px var(--gold-glow); }

.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 10px; color: var(--gold-primary); font-weight: 800; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-input, .form-select { width: 100%; background: rgba(6, 8, 12, 0.95); border: 1px solid var(--gold-border); border-radius: 14px; padding: 12px 14px; color: #fff; font-size: 12px; font-weight: 600; outline: none; transition: 0.3s; }
.form-input:focus, .form-select:focus { border-color: var(--gold-primary); box-shadow: 0 0 15px var(--gold-glow); }

.item-row { display: flex; gap: 6px; margin-bottom: 8px; align-items: center; }
.item-name { flex: 2; } .item-qty { flex: 1; }
.btn-remove-row { background: rgba(255, 59, 48, 0.15); color: #FF3B30; border: 1px solid rgba(255, 59, 48, 0.4); border-radius: 10px; width: 36px; height: 42px; font-weight: 900; font-size: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.btn-add-item { background: rgba(247, 201, 120, 0.1); color: var(--gold-primary); border: 1px dashed var(--gold-primary); border-radius: 12px; padding: 10px; font-size: 11px; font-weight: 800; cursor: pointer; width: 100%; margin-bottom: 14px; transition: 0.2s; }

.suggest-list { list-style: none; padding: 0; margin: 4px 0 0 0; background: rgba(6, 8, 12, 0.95); border: 1px solid var(--gold-border); border-radius: 12px; max-height: 150px; overflow-y: auto; box-shadow: 0 4px 15px rgba(0,0,0,0.5); display: none; }
.client-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); cursor: pointer; }
.btn-del-client { color: #FF3B30; font-weight: bold; padding: 2px 8px; cursor: pointer; }

.btn-ai-voice { background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%); color: #FFF; border: none; padding: 14px; border-radius: 14px; font-weight: 900; font-size: 12px; cursor: pointer; width: 100%; box-shadow: 0 8px 25px rgba(255, 152, 0, 0.4); display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-ai-scan { background: linear-gradient(135deg, #7C4DFF 0%, #00B0FF 100%); color: #FFF; border: none; padding: 14px; border-radius: 14px; font-weight: 900; font-size: 12px; cursor: pointer; width: 100%; box-shadow: 0 8px 25px rgba(124, 77, 255, 0.4); display: flex; align-items: center; justify-content: center; gap: 8px; }

.btn-gold { background: var(--gold-gradient); color: #000; border: none; padding: 14px 20px; border-radius: 14px; font-weight: 900; font-size: 12px; cursor: pointer; box-shadow: 0 8px 25px rgba(212, 155, 39, 0.4); transition: transform 0.15s; width: 100%; text-align: center; margin-top: 8px; letter-spacing: 0.5px; }
.btn-gold:active { transform: scale(0.97); }
.btn-danger { background: linear-gradient(135deg, #FF3B30 0%, #990000 100%); color: #FFF; border: none; padding: 12px 16px; border-radius: 12px; font-weight: 800; font-size: 11px; cursor: pointer; width: 100%; margin-top: 12px; box-shadow: 0 6px 20px rgba(255, 59, 48, 0.35); }

.video-call-box { background: linear-gradient(160deg, #1C202C 0%, #0D0F16 100%); border: 1px solid var(--gold-primary); border-radius: 24px; padding: 22px; margin-bottom: 18px; text-align: center; box-shadow: 0 15px 35px rgba(0,0,0,0.85), inset 0 0 20px rgba(247, 201, 120, 0.12); width: 100%; }
.btn-video-start { background: linear-gradient(135deg, #FF3B30 0%, #E02B20 100%); color: #FFF; width: 100%; padding: 16px; font-size: 12px; border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.25); font-weight: 900; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 8px 25px rgba(255, 59, 48, 0.45); animation: pulse-red 2.2s infinite; }

.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: rgba(8, 10, 15, 0.94); backdrop-filter: blur(25px); border-top: 1px solid var(--gold-border); display: flex; justify-content: space-around; padding: 12px 0 14px 0; z-index: 100; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-muted); text-decoration: none; font-size: 10px; font-weight: 700; cursor: pointer; }
.nav-item.active { color: var(--gold-primary); } .nav-icon { font-size: 19px; }

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes pulse-red { 0% { transform: scale(1); } 50% { transform: scale(1.02); } 100% { transform: scale(1); } }

#customModal { display: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(12px); z-index: 999999; justify-content: center; align-items: center; padding: 20px; }
.modal-content { background: linear-gradient(160deg, #1C202C 0%, #0E1017 100%); border: 1px solid var(--gold-primary); border-radius: 22px; padding: 20px; width: 100%; max-width: 380px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.95); }
.bill-card-export { background: #0D0F17; border: 2px solid var(--gold-primary); border-radius: 20px; padding: 22px; margin-top: 14px; color: #FFF; }
.draft-card { background: rgba(255,255,255,0.05); border: 1px dashed var(--gold-primary); border-radius: 12px; padding: 12px; margin-bottom: 12px; }