/* TrafficMS — shared look (purple/indigo identity of the original ASP.NET app) */
:root {
    --brand: #5a67d8;
    --brand-2: #764ba2;
    --brand-grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f3f4f8;
    --card: #ffffff;
    --ok: #10b981;
    --warn: #f59e0b;
    --bad: #ef4444;
    --info: #0ea5e9;
    --radius: 14px;
}
* { box-sizing: border-box; }
html, body { overflow-x: hidden; }
body { font-family: "Poppins", "Segoe UI", system-ui, sans-serif; background: var(--bg); color: var(--ink);
       font-size: 14px; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand); }

/* nav */
.app-nav { background: var(--brand-grad); box-shadow: 0 4px 18px rgba(90,103,216,.35); padding: .5rem 0; }
.app-nav .navbar-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; }
.brand-icon { width: 38px; height: 38px; border-radius: 11px; background: rgba(255,255,255,.18);
              display: inline-flex; align-items: center; justify-content: center; }
.brand-sub { display: block; font-size: .66rem; font-weight: 400; opacity: .85; line-height: 1; }
.app-nav .nav-link { color: rgba(255,255,255,.88) !important; border-radius: 9px; padding: .5rem .8rem !important;
                     display: flex; gap: .45rem; align-items: center; font-weight: 500; }
.app-nav .nav-link:hover { background: rgba(255,255,255,.12); }
.app-nav .nav-link.active { background: rgba(255,255,255,.22); color: #fff !important; }
.nav-icon-btn { position: relative; color: #fff; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.15);
                display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.nav-icon-btn:hover { color: #fff; background: rgba(255,255,255,.25); }
.bell-count { position: absolute; top: -3px; right: -3px; background: #ef4444; color: #fff; font-size: .62rem; font-weight: 700;
              min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.user-chip { color: #fff; display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; }
.user-chip:hover { color: #fff; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: var(--brand); font-weight: 700;
          display: inline-flex; align-items: center; justify-content: center; }
.notif-menu { width: 340px; max-width: calc(100vw - 24px); }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .82rem; }
.notif-item.unread { background: #eef0ff; }
.notif-item:hover { background: #f5f5ff; color: var(--ink); }
.notif-item .t { font-weight: 600; }
.notif-item .m { color: var(--muted); }
.notif-item .d { color: #9ca3af; font-size: .7rem; }
@media (max-width: 991.98px) {
    .app-nav .navbar-collapse { margin-top: .6rem; background: rgba(0,0,0,.12); border-radius: 12px; padding: .5rem; }
}

/* layout */
.page-wrap { flex: 1 0 auto; padding-top: 20px; padding-bottom: 20px; }
.app-footer { text-align: center; color: var(--muted); font-size: .78rem; padding: 18px 10px; }
.app-footer .sep { opacity: .5; margin: 0 .4rem; }

.page-head { background: var(--brand-grad); color: #fff; border-radius: var(--radius); padding: 20px 24px; margin-bottom: 18px;
             display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
             box-shadow: 0 8px 24px rgba(118,75,162,.25); }
.page-head h1 { font-size: 1.3rem; font-weight: 700; margin: 0; display: flex; gap: .6rem; align-items: center; }
.page-head .sub { font-size: .8rem; opacity: .85; margin-top: 2px; }
.page-head .head-icon { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.18);
                        display: inline-flex; align-items: center; justify-content: center; }

.cardx { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(17,24,39,.05); margin-bottom: 18px; }
.cardx-head { padding: 13px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.cardx-head h2 { font-size: .95rem; font-weight: 700; margin: 0; color: var(--brand); display: flex; gap: .5rem; align-items: center; }
.cardx-body { padding: 18px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; gap: 12px; align-items: center; }
.stat .ic { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; color: #fff; flex-shrink: 0; }
.stat .v { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.stat .l { font-size: .72rem; color: var(--muted); text-transform: uppercase; font-weight: 600; margin-top: 4px; }
.ic-purple { background: var(--brand-grad); } .ic-green { background: linear-gradient(135deg,#11998e,#38ef7d); }
.ic-orange { background: linear-gradient(135deg,#f7971e,#ffd200); } .ic-red { background: linear-gradient(135deg,#cb2d3e,#ef473a); }
.ic-blue { background: linear-gradient(135deg,#4facfe,#00c6fb); }

.form-label { font-size: .76rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.form-control, .form-select { border-radius: 10px; border-color: var(--line); min-height: 40px; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(90,103,216,.15); }
.btn { border-radius: 10px; font-weight: 500; }
.btn-brand { background: var(--brand-grad); color: #fff; border: none; }
.btn-brand:hover { color: #fff; filter: brightness(1.07); }

.table-modern { margin: 0; }
.table-modern thead th { background: #f5f5ff; color: #4c51bf; font-size: .72rem; text-transform: uppercase; letter-spacing: .4px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-modern td { vertical-align: middle; }
.empty { padding: 40px 16px; text-align: center; color: #9ca3af; }
.empty i { display: block; font-size: 2rem; margin-bottom: 8px; opacity: .4; }

.map { height: 360px; border-radius: 12px; border: 1px solid var(--line); z-index: 1; }
.map.tall { height: calc(100vh - 210px); min-height: 420px; }
.photo-thumb { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); cursor: zoom-in; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 2px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--brand); }
.timeline .t { font-weight: 600; font-size: .85rem; }
.timeline .d { font-size: .72rem; color: var(--muted); }

.auto-chip { font-size: .66rem; font-weight: 700; background: #ede9fe; color: #6d28d9; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; }
.esc-chip { font-size: .66rem; font-weight: 700; background: #fee2e2; color: #b91c1c; padding: 2px 8px; border-radius: 20px; text-transform: uppercase; }

/* report list cards (public) */
.rep-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; display: flex; gap: 12px; margin-bottom: 12px; }
.rep-card img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; flex-shrink: 0; }
.ticket { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--brand); letter-spacing: .5px; }

/* landing */
.hero { background: var(--brand-grad); color: #fff; border-radius: 20px; padding: 48px 28px; text-align: center; position: relative; overflow: hidden; }
.hero h1 { font-weight: 700; font-size: clamp(1.7rem, 4.5vw, 2.8rem); }
.hero p { opacity: .9; max-width: 640px; margin: 10px auto 24px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; height: 100%; }
.feature .ic { width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; margin-bottom: 12px; }

.auth-card { max-width: 440px; margin: 30px auto; }
@media (max-width: 575.98px) {
    .page-head { padding: 16px; }
    .cardx-body { padding: 14px; }
    .map { height: 280px; }
}
