/* ================================================
   cs/style.css — Nusabit Studio Customer Service
   Design: Classic Retro Terminal Chat
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Share+Tech+Mono&display=swap');

:root {
    --brand:       #ffb300;
    --brand-2:     #ff6600;
    --brand-dark:  #c87f00;
    --brand-glow:  rgba(255,179,0,0.25);
    --brand-dim:   rgba(255,179,0,0.1);
    --c-green:     #39ff14;
    --c-red:       #ff3c3c;
    --c-yellow:    #ffe600;
    --c-cyan:      #00e5ff;

    --bg:          #0a0a08;
    --surface:     #0e0e0b;
    --surface2:    #131310;
    --surface3:    #0a0a08;
    --border:      rgba(255,179,0,0.12);
    --border-vis:  rgba(255,179,0,0.28);

    --text:        #e8e4c8;
    --text-sub:    rgba(232,228,200,0.6);
    --muted:       rgba(232,228,200,0.35);

    --bot-bubble:  #131310;
    --user-bubble: var(--brand);

    --font-title:  'Press Start 2P', monospace;
    --font-body:   'Share Tech Mono', monospace;
    --radius:      0px;
    --radius-sm:   0px;
    --radius-xs:   0px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── CRT SCANLINES ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.04) 2px,
        rgba(0,0,0,0.04) 4px
    );
}

/* ── CRT VIGNETTE ── */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    background: radial-gradient(ellipse 90% 90% at 50% 50%, transparent 60%, rgba(0,0,0,0.45) 100%);
}

::-webkit-scrollbar { width: 6px; background: var(--bg); border-left: 1px solid var(--border); }
::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 0; }
::-webkit-scrollbar-track { background: #0a0a08; }

/* ── TOP BAR ── */
.topbar {
    background: var(--surface);
    border-bottom: 2px solid var(--brand);
    box-shadow: 0 2px 0 var(--brand-dark), 0 4px 20px rgba(255,179,0,0.1);
    padding: 0 14px;
    height: 62px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    position: relative;
    z-index: 20;
}

/* top glow line */
.topbar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand), var(--c-cyan), var(--brand), transparent);
    opacity: 0.6;
}

.topbar-back {
    width: 36px; height: 36px;
    border: 1px solid var(--border-vis);
    background: var(--surface2);
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sub);
    font-family: var(--font-body);
    font-size: 1.1em;
    transition: all 0.15s;
    text-decoration: none;
    flex-shrink: 0;
    font-weight: 600;
}
.topbar-back:hover { background: var(--brand); color: #0a0a08; border-color: var(--brand); box-shadow: 0 0 10px rgba(255,179,0,0.3); }

.topbar-avatar {
    width: 40px; height: 40px;
    border-radius: 0;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 2px 2px 0 var(--brand-dark), 0 0 12px rgba(255,179,0,0.2);
    position: relative;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.topbar-avatar::after {
    content: '';
    position: absolute;
    bottom: 2px; right: 2px;
    width: 8px; height: 8px;
    background: var(--c-green);
    border-radius: 0;
    border: 1px solid var(--surface);
    box-shadow: 0 0 6px var(--c-green);
}

.topbar-info { flex: 1; min-width: 0; }
.topbar-name {
    font-family: var(--font-title);
    font-size: 0.55rem;
    font-weight: 400;
    color: var(--brand);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255,179,0,0.5);
}
.topbar-status {
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--c-green);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(57,255,20,0.5);
}
.status-dot {
    width: 5px; height: 5px;
    background: var(--c-green);
    border-radius: 0;
    animation: blinkDot 1s steps(1) infinite;
    box-shadow: 0 0 6px var(--c-green);
}
@keyframes blinkDot { 0%,49%{opacity:1;} 50%,100%{opacity:0.3;} }

.topbar-actions { display: flex; gap: 5px; align-items: center; }
.topbar-btn {
    width: 36px; height: 36px;
    border: 1px solid var(--border-vis);
    background: var(--surface2);
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-sub);
    transition: all 0.15s;
}
.topbar-btn:hover { background: var(--brand); color: #0a0a08; border-color: var(--brand); }
.topbar-btn.active { background: rgba(255,179,0,0.12); color: var(--brand); border-color: var(--border-vis); }

/* ── CHAT WRAP ── */
.chat-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    position: relative;
    /* subtle scanline pattern on chat bg */
    background:
        repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255,179,0,0.015) 40px, rgba(255,179,0,0.015) 41px),
        var(--bg);
}

/* ── MESSAGES ── */
.messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    scroll-behavior: smooth;
    min-height: 0;
}

.date-sep {
    text-align: center;
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 2px;
    margin: 8px 0;
    position: relative;
    text-transform: uppercase;
}
.date-sep::before, .date-sep::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 28%;
    height: 1px;
    background: var(--border);
}
.date-sep::before { left: 0; }
.date-sep::after  { right: 0; }

/* ── MESSAGE ROW ── */
.msg-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    animation: msgIn 0.18s ease;
    margin-bottom: 2px;
}
@keyframes msgIn { from{opacity:0;transform:translateY(6px);} to{opacity:1;transform:translateY(0);} }

.msg-row.user { flex-direction: row-reverse; }

.msg-avatar {
    width: 30px; height: 30px;
    border-radius: 0;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0 var(--brand-dark);
}
.msg-avatar img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }

.msg-row.user .msg-avatar { display: none; }

.msg-content { max-width: min(72%, 500px); display: flex; flex-direction: column; }
.msg-name {
    font-family: var(--font-body);
    font-size: 0.65rem;
    color: var(--brand);
    margin-bottom: 4px;
    padding-left: 2px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 8px rgba(255,179,0,0.4);
}
.msg-row.user .msg-name { display: none; }

.msg-bubble {
    background: var(--bot-bubble);
    border: 1px solid var(--border-vis);
    padding: 10px 13px;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 0.84rem;
    line-height: 1.7;
    color: var(--text);
    word-break: break-word;
    white-space: pre-wrap;
    position: relative;
    letter-spacing: 0.3px;
    box-shadow: 2px 2px 0 rgba(255,179,0,0.06);
}
.msg-row.user .msg-bubble {
    background: var(--brand);
    color: #0a0a08;
    border: none;
    box-shadow: 2px 2px 0 var(--brand-dark);
    font-weight: 700;
}

.msg-bubble strong { font-weight: 700; color: var(--brand); }

/* Attachment thumbnails */
.bubble-attachments { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.bubble-thumb {
    width: 72px; height: 54px;
    border-radius: 0;
    object-fit: cover;
    border: 1px solid var(--border-vis);
    cursor: pointer;
    transition: opacity 0.2s;
}
.bubble-thumb:hover { opacity: 0.75; }

.msg-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    padding: 0 2px;
}
.msg-time { font-family: var(--font-body); font-size: 0.62rem; color: var(--muted); letter-spacing: 0.5px; }
.msg-row.user .msg-meta { justify-content: flex-end; }

/* ── TICKET BUBBLE ── */
.ticket-bubble {
    background: rgba(255,179,0,0.06);
    border: 1px solid rgba(255,179,0,0.3);
    border-radius: 0;
    padding: 12px 14px;
    margin-top: 6px;
    box-shadow: 2px 2px 0 rgba(255,179,0,0.08);
}
.ticket-bubble-num {
    font-family: var(--font-title);
    font-size: 0.65rem;
    color: var(--brand);
    display: block;
    margin-bottom: 4px;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255,179,0,0.5);
}
.ticket-bubble-hint { font-family: var(--font-body); font-size: 0.72rem; color: var(--text-sub); margin-bottom: 10px; display: block; letter-spacing: 0.3px; }
.ticket-bubble-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand);
    color: #0a0a08;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 0;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    transition: all 0.15s;
    letter-spacing: 0.5px;
    box-shadow: 2px 2px 0 var(--brand-dark);
}
.ticket-bubble-link:hover { background: var(--brand-dark); transform: translate(-1px,-1px); }

/* ── TYPING INDICATOR ── */
.typing-bubble {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
}
.typing-dot {
    width: 6px; height: 6px;
    background: var(--brand);
    border-radius: 0;
    animation: typingBlink 1.2s steps(1) infinite;
    box-shadow: 0 0 4px rgba(255,179,0,0.5);
}
.typing-dot:nth-child(2) { animation-delay: 0.4s; }
.typing-dot:nth-child(3) { animation-delay: 0.8s; }
@keyframes typingBlink {
    0%,49%{opacity:1;} 50%,100%{opacity:0.1;}
}

/* ── QUICK AREA ── */
#quick-area {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 10px 14px 12px;
    flex-shrink: 0;
}

.quick-label {
    font-family: var(--font-body);
    font-size: 0.6rem;
    color: var(--muted);
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.quick-section {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.quick-section::-webkit-scrollbar { display: none; }

/* ── SHOPEE-STYLE PILL CHIPS ── */
.quick-chip {
    background: #fff;
    border: 1.5px solid var(--brand);
    border-radius: 20px;
    padding: 7px 16px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--brand);
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 4px rgba(212,130,10,0.1);
}
.quick-chip:hover, .quick-chip:active {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 2px 10px rgba(212,130,10,0.25);
    transform: translateY(-1px);
}


/* ── SEE ALL BAR ── */
.see-all-bar {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 0;
    flex-shrink: 0;
}
.see-all-btn {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    color: var(--brand);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background 0.15s;
}
.see-all-btn:hover { background: rgba(255,179,0,0.06); text-shadow: 0 0 8px rgba(255,179,0,0.4); }

/* ── INPUT AREA ── */
.input-area-wrap {
    background: var(--surface);
    border-top: 2px solid var(--brand);
    padding: 8px 10px 10px;
    flex-shrink: 0;
    box-shadow: 0 -2px 0 var(--brand-dark);
}

.upload-preview-bar {
    background: var(--surface2);
    border: 1px solid var(--border-vis);
    border-radius: 0;
    padding: 7px 9px;
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.upload-preview-inner {
    flex: 1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.preview-thumb-wrap {
    position: relative;
    width: 48px; height: 48px;
    flex-shrink: 0;
}
.preview-thumb {
    width: 48px; height: 48px;
    object-fit: cover;
    border-radius: 0;
    border: 1px solid var(--border-vis);
}
.preview-rm {
    position: absolute;
    top: -4px; right: -4px;
    width: 14px; height: 14px;
    background: var(--c-red);
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 0.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}
.upload-clear-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--muted);
    padding: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}
.upload-clear-btn:hover { color: var(--c-red); }

.input-bar {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    background: var(--surface2);
    border: 1px solid var(--border-vis);
    border-radius: 0;
    padding: 7px 7px 7px 11px;
    transition: border-color 0.2s;
}
.input-bar:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(255,179,0,0.08), 0 0 12px rgba(255,179,0,0.1);
}

.attach-btn {
    width: 32px; height: 32px;
    border-radius: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    flex-shrink: 0;
    transition: all 0.15s;
}
.attach-btn:hover { background: var(--brand); color: #0a0a08; border-color: var(--brand); }

#msg-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.85rem;
    resize: none;
    max-height: 110px;
    line-height: 1.5;
    padding: 3px 0;
    letter-spacing: 0.3px;
}
#msg-input::placeholder { color: var(--muted); }

.send-btn {
    width: 34px; height: 34px;
    background: var(--brand);
    border: none;
    border-radius: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a08;
    flex-shrink: 0;
    transition: all 0.15s;
    box-shadow: 2px 2px 0 var(--brand-dark);
}
.send-btn:hover { background: var(--brand-dark); transform: translate(-1px,-1px); box-shadow: 3px 3px 0 #7a4d00; }
.send-btn:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 var(--brand-dark); }

/* ── REPORT MODAL ── */
.modal-bg {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.88);
    align-items: flex-end;
    justify-content: center;
}
.modal-bg.open { display: flex; }

.modal-card {
    background: var(--surface);
    border: 2px solid var(--brand);
    border-bottom: none;
    border-radius: 0;
    width: 100%;
    max-width: 500px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 0;
    box-shadow: 0 -4px 0 var(--brand-dark), 0 -8px 40px rgba(255,179,0,0.1);
    animation: sheetIn 0.25s ease;
}
@keyframes sheetIn {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* drag handle */
.modal-card::before {
    content: '';
    display: block;
    width: 32px; height: 3px;
    background: var(--border-vis);
    border-radius: 0;
    margin: 10px auto 0;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}
.modal-icon {
    width: 36px; height: 36px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid;
}
.modal-icon { background: rgba(255,60,60,0.08); border-color: rgba(255,60,60,0.3); color: var(--c-red); }
.modal-icon.saran { background: rgba(255,179,0,0.08); border-color: rgba(255,179,0,0.3); color: var(--brand); }
.modal-title-text {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 400;
    color: var(--text);
    flex: 1;
    letter-spacing: 0.5px;
}
.modal-close {
    background: var(--surface2);
    border: 1px solid var(--border-vis);
    border-radius: 0;
    width: 28px; height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all 0.15s;
}
.modal-close:hover { background: var(--c-red); color: #fff; border-color: var(--c-red); }

/* Type toggle */
.type-toggle {
    display: flex;
    gap: 6px;
    padding: 12px 18px 0;
}
.type-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-vis);
    border-radius: 0;
    background: var(--surface2);
    color: var(--text-sub);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.type-btn.active {
    background: rgba(255,179,0,0.1);
    border-color: var(--brand);
    color: var(--brand);
}
.type-btn:hover:not(.active) { border-color: var(--border-vis); color: var(--text); }

/* Form */
#modal-form { padding: 14px 18px 18px; }

.field { margin-bottom: 12px; }
.field label {
    display: block;
    font-family: var(--font-body);
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 5px;
}
.field input,
.field select,
.field textarea {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border-vis);
    border-radius: 0;
    padding: 9px 12px;
    font-family: var(--font-body);
    font-size: 0.84rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    letter-spacing: 0.3px;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(255,179,0,0.08);
}
.field select option { background: var(--surface); }
.field textarea { resize: none; }

/* Upload area */
.modal-upload-area {
    border: 1px dashed var(--border-vis);
    border-radius: 0;
    overflow: hidden;
}
.modal-upload-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    cursor: pointer;
    color: var(--text-sub);
    font-family: var(--font-body);
    font-size: 0.8rem;
    transition: background 0.15s;
    letter-spacing: 0.3px;
}
.modal-upload-label:hover { background: rgba(255,179,0,0.04); }
.modal-upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0 10px 10px;
}
.modal-preview-img {
    width: 56px; height: 56px;
    object-fit: cover;
    border-radius: 0;
    border: 1px solid var(--border-vis);
}

.submit-btn {
    width: 100%;
    background: var(--brand);
    color: #0a0a08;
    border: none;
    border-radius: 0;
    padding: 13px;
    font-family: var(--font-title);
    font-size: 0.5rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 6px;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 3px 3px 0 var(--brand-dark);
}
.submit-btn:hover { background: var(--brand-dark); transform: translate(-1px,-1px); box-shadow: 4px 4px 0 #7a4d00; }
.submit-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* Success */
.modal-success {
    padding: 36px 18px;
    text-align: center;
}
.success-icon {
    width: 56px; height: 56px;
    background: rgba(57,255,20,0.08);
    border: 1px solid rgba(57,255,20,0.3);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    color: var(--c-green);
    font-size: 1.5rem;
}
.success-title {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text);
    display: block;
    margin-bottom: 6px;
    font-weight: 400;
    letter-spacing: 0.5px;
}
.success-msg {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: var(--text-sub);
    display: block;
    margin-bottom: 20px;
    line-height: 1.7;
    letter-spacing: 0.3px;
}
.ticket-box {
    background: var(--surface2);
    border: 1px solid var(--border-vis);
    border-radius: 0;
    padding: 16px;
    text-align: center;
}
.ticket-label {
    font-family: var(--font-body);
    font-size: 0.62rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 6px;
}
.ticket-number {
    font-family: var(--font-title);
    font-size: 0.9rem;
    color: var(--brand);
    display: block;
    letter-spacing: 3px;
    text-shadow: 0 0 12px rgba(255,179,0,0.5);
}
.ticket-note {
    font-family: var(--font-body);
    font-size: 0.68rem;
    color: var(--muted);
    display: block;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

/* ── RESPONSIVE ── */
@media (min-width: 600px) {
    .modal-bg { align-items: center; }
    .modal-card { border-bottom: 2px solid var(--brand); border-radius: 0; max-width: 480px; }
}
@media (max-width: 380px) {
    
    .topbar { height: 56px; }
}

/* ────────────────────────────────────────────────
   CS LIGHT THEME
──────────────────────────────────────────────── */
[data-theme="light"] {
    --bg:          #f5f0e8;
    --surface:     #ede7d9;
    --surface2:    #e6dece;
    --surface3:    #f5f0e8;
    --border:      rgba(120,80,20,0.12);
    --border-vis:  rgba(120,80,20,0.25);

    --text:        #2a2215;
    --text-sub:    rgba(42,34,21,0.65);
    --muted:       rgba(42,34,21,0.4);

    --brand:       #d4820a;
    --brand-2:     #cc5500;
    --brand-dark:  #995500;
    --brand-glow:  rgba(212,130,10,0.2);
    --brand-dim:   rgba(212,130,10,0.08);

    --bot-bubble:  #ede7d9;
    --user-bubble: var(--brand);

    --c-green:     #1a9900;
    --c-red:       #cc2222;
    --c-cyan:      #0088bb;
    --c-yellow:    #cc8800;
}

[data-theme="light"] body {
    background: var(--bg);
    color: var(--text);
}

[data-theme="light"] .topbar {
    background: var(--surface);
    border-bottom-color: var(--brand);
}

[data-theme="light"] .topbar-name { color: var(--brand); text-shadow: none; }
[data-theme="light"] .topbar-status { color: var(--c-green); text-shadow: none; }

[data-theme="light"] .msg-bubble {
    background: var(--bot-bubble);
    border-color: var(--border-vis);
    color: var(--text);
}

[data-theme="light"] .msg-row.user .msg-bubble {
    background: var(--brand);
    color: #fff;
}

[data-theme="light"] .input-area-wrap {
    background: var(--surface);
    border-top-color: var(--brand);
}

[data-theme="light"] .input-bar {
    background: var(--surface2);
    border-color: var(--border-vis);
}

[data-theme="light"] #msg-input { color: var(--text); }
[data-theme="light"] #msg-input::placeholder { color: var(--muted); }

[data-theme="light"] .quick-chip {
    background: #fff;
    color: var(--brand);
    border-color: var(--brand);
}
[data-theme="light"] .quick-chip:hover {
    background: var(--brand);
    color: #fff;
}

[data-theme="light"] .modal-card {
    background: var(--surface);
    border-color: var(--brand);
}

[data-theme="light"] .field input,
[data-theme="light"] .field select,
[data-theme="light"] .field textarea {
    background: var(--surface2);
    border-color: var(--border-vis);
    color: var(--text);
}

[data-theme="light"] .field select option { background: var(--surface); }
