:root {
    --bg-a: #edf2fb;
    --bg-b: #f9fbff;
    --bg-c: #edf7f0;
    --panel: #ffffff;
    --panel-soft: #f4f7fc;
    --text: #1f2d3d;
    --muted: #6b7b8f;
    --line: #d9e0ec;
    --primary: #1f4f91;
    --primary-soft: #345d95;
    --success: #1f8f49;
    --danger: #b93b3b;
    --shadow: 0 12px 30px rgba(16, 30, 58, 0.1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; color: var(--text); }
body {
    min-height: 100vh;
    background: linear-gradient(150deg, var(--bg-a) 0%, var(--bg-b) 45%, var(--bg-c) 100%);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.trq-shell { max-width: 1240px; margin: 0 auto; padding: 20px 16px 40px; }
.trq-topbar {
    border: 1px solid var(--line);
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.trq-brand strong { display:block; font-size: 18px; }
.trq-brand span { color: var(--muted); font-size: 12px; }
.trq-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.trq-nav a {
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    border-radius: 10px;
    padding: 8px 11px;
    font-size: 14px;
}
.trq-nav a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.trq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.trq-card {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow);
}
.trq-card h3 { margin: 0 0 12px; font-size: 22px; }
.trq-card h4 { margin: 0 0 10px; font-size: 16px; }
.trq-sub { color: var(--muted); font-size: 13px; margin: 0 0 8px; }

.trq-alert { padding: 12px 14px; border-radius: 10px; margin-top: 14px; font-weight: 600; font-size: 14px; }
.trq-alert.error { background: #ffe8e8; border:1px solid #f3b2b2; color: #8b2525; }
.trq-alert.success { background: #e7f6ec; border:1px solid #a8dbba; color: #1b693a; }

.trq-kpi { display: grid; grid-template-columns: repeat(3, minmax(120px,1fr)); gap: 10px; }
.trq-kpi .box { border:1px solid var(--line); background: var(--panel-soft); border-radius:12px; padding:12px; }
.trq-kpi .val { font-size:26px; font-weight:800; }
.trq-kpi .lbl { font-size:12px; color:var(--muted); }

.trq-form { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trq-form .full { grid-column: 1 / -1; }
.trq-label { display:block; font-size:12px; color: var(--muted); margin-bottom: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.trq-input, .trq-select, .trq-textarea {
    width:100%; border:1px solid #c7d1e1; border-radius: 11px; background:#fff;
    color: var(--text); padding: 11px 12px; font-size: 15px;
}
.trq-textarea { min-height: 120px; resize: vertical; }
.trq-btn {
    border: 0; border-radius: 11px; cursor:pointer; font-weight: 700;
    padding: 11px 16px; font-size: 15px;
}
.trq-btn.primary { background: var(--primary); color:#fff; }
.trq-btn.success { background: var(--success); color:#fff; }
.trq-btn.ghost { background: #fff; border:1px solid var(--line); color: var(--text); }

.trq-table { width:100%; border-collapse: collapse; }
.trq-table th, .trq-table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; font-size: 14px; }
.trq-table th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.trq-pill { display:inline-block; border-radius: 999px; padding: 5px 10px; font-size: 12px; font-weight: 700; }
.trq-pill.open { background: #e9f2ff; color: #2254a5; }
.trq-pill.in_progress { background: #fff6e7; color: #8a5e12; }
.trq-pill.waiting_customer { background: #eceffd; color: #4b56a7; }
.trq-pill.closed { background: #e8f6eb; color: #1f7a43; }

.trq-auth-wrap { max-width: 520px; margin: 42px auto; }
.trq-auth-wrap .trq-card h1 { margin: 0 0 12px; }

.trq-ticket-msg { padding:10px 12px; border:1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.trq-ticket-msg small { color: var(--muted); }

/* Floating support button */
.trq-support-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 58px;
    height: 58px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.55);
    background: linear-gradient(145deg, rgba(255,255,255,.50), rgba(255,255,255,.18));
    backdrop-filter: blur(10px);
    box-shadow: 0 14px 35px rgba(20, 46, 84, .24);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1200;
}
.trq-support-fab svg { width: 28px; height: 28px; stroke: #1f4f91; }

.trq-modal {
    position: fixed;
    inset: 0;
    background: rgba(8,14,26,.38);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1250;
    padding: 16px;
}
.trq-modal.show { display: flex; }
.trq-modal-card {
    width: 100%;
    max-width: 560px;
    border-radius: 16px;
    border: 1px solid #d8e0ec;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(6px);
    box-shadow: var(--shadow);
    padding: 18px;
}
.trq-modal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom: 10px; }
.trq-modal-head h3 { margin:0; }
.trq-icon-btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; width: 34px; height: 34px; cursor: pointer; }

@media (max-width: 980px) {
    .trq-grid { grid-template-columns: 1fr; }
    .trq-form { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .trq-shell { padding: 12px 12px 40px; }
    .trq-topbar { padding: 10px 12px; }
    .trq-nav a { font-size: 13px; }
    .trq-kpi { grid-template-columns: 1fr 1fr; }
    .trq-support-fab { width: 54px; height: 54px; right: 14px; bottom: 14px; }
}
