:root {
    --bg-color: #f0f2f5;
    --card-bg: white;
    --text-color: #333;
    --input-border: #ddd;
    --primary-color: #1a73e8;
    --secondary-color: #70757a;
    --status-open: #1e8e3e;
    --status-answered: #1a73e8;
    --status-resolved: #1e8e3e;
}
[data-theme="dark"] {
    --bg-color: #18191a;
    --card-bg: #242526;
    --text-color: #e4e6eb;
    --input-border: #3e4042;
    --primary-color: #4285f4;
}
body { font-family: sans-serif; background: var(--bg-color); color: var(--text-color); margin: 0; display: flex; justify-content: center; align-items: center; min-height: 100vh; transition: background 0.3s, color 0.3s; }
.container { width: 100%; max-width: 800px; padding: 20px; box-sizing: border-box; }
.card { background: var(--card-bg); padding: 30px; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin-bottom: 20px; transition: background 0.3s; }
h1 { color: var(--primary-color); margin-top: 0; }
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-weight: bold; }
input, textarea, select { width: 100%; padding: 10px; border: 1px solid var(--input-border); border-radius: 4px; box-sizing: border-box; font-size: 14px; background: var(--card-bg); color: var(--text-color); }
button { width: 100%; padding: 12px; background: var(--primary-color); color: white; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background 0.2s; }
button:hover { filter: brightness(0.9); }
.ticket-item { border-bottom: 1px solid var(--input-border); padding: 10px 0; display: flex; justify-content: space-between; align-items: center; cursor: pointer; }
.ticket-item:hover { background: rgba(0,0,0,0.05); }
.status-open { color: var(--status-open); font-weight: bold; }
.status-answered { color: var(--status-answered); font-weight: bold; }
.status-resolved { color: var(--status-resolved); font-weight: bold; }
.status-in_progress { color: orange; font-weight: bold; }
.status-closed { color: var(--secondary-color); }
#otpSection, #portalSection { display: none; }
.theme-switch { position: fixed; top: 20px; right: 20px; cursor: pointer; background: var(--card-bg); border: 1px solid var(--input-border); padding: 8px; border-radius: 50%; width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); justify-content: center; align-items: center; z-index: 2000; }
.modal-content { background: var(--card-bg); color: var(--text-color); padding: 25px; border-radius: 8px; width: 100%; max-width: 600px; position: relative; max-height: 90vh; overflow-y: auto; }
.modal-close { position: absolute; top: 15px; right: 15px; width: 30px; height: 30px; border: 1px solid var(--input-border); border-radius: 4px; display: flex; justify-content: center; align-items: center; cursor: pointer; font-weight: bold; transition: background 0.2s; }
.modal-close:hover { background: var(--input-border); }

.chat-box { background: var(--bg-color); border-radius: 8px; padding: 15px; max-height: 400px; overflow-y: auto; margin-bottom: 15px; display: flex; flex-direction: column; gap: 10px; }
.message { padding: 10px; border-radius: 8px; max-width: 80%; font-size: 14px; word-wrap: break-word; }
.message.sent { background: var(--primary-color); color: white; align-self: flex-end; border-bottom-right-radius: 2px; }
.message.received { background: var(--input-border); align-self: flex-start; border-bottom-left-radius: 2px; }
