/* Jazital Support Ticket — stats dashboard (admin + front-end) */

.jst-db {
    --jst-primary: #2563eb;
    --jst-primary-dark: #1d4ed8;
    --jst-border: #e5e7eb;
    --jst-muted: #6b7280;
    --jst-text: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--jst-text);
    max-width: 1200px;
}
@keyframes jstDbUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.jst-db-card, .jst-db-panel { animation: jstDbUp .4s ease both; }
.jst-db-bar-fill { transition: width .6s cubic-bezier(.2,.8,.2,1); }
@media (prefers-reduced-motion: reduce) { .jst-db * { animation: none !important; transition: none !important; } }

/* Headline cards */
.jst-db-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin: 16px 0 22px;
}
.jst-db-card {
    background: #fff;
    border: 1px solid var(--jst-border);
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    color: var(--jst-text);
    transition: box-shadow .15s, transform .15s;
}
a.jst-db-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-1px); }
.jst-db-num { font-size: 30px; font-weight: 700; line-height: 1.1; }
.jst-db-num small { font-size: 15px; color: var(--jst-muted); font-weight: 600; }
.jst-db-label { font-size: 12px; color: var(--jst-muted); text-transform: uppercase; letter-spacing: .04em; }
.jst-db-accent { background: var(--jst-primary); border-color: var(--jst-primary); }
.jst-db-accent .jst-db-num, .jst-db-accent .jst-db-label { color: #fff; }
.jst-db-accent .jst-db-num small { color: rgba(255,255,255,.7); }
.jst-db-danger { border-color: #fecaca; background: #fef2f2; }
.jst-db-danger .jst-db-num { color: #dc2626; }
.jst-db-warn { border-color: #fde68a; background: #fffbeb; }
.jst-db-warn .jst-db-num { color: #b45309; }

/* Panels grid */
.jst-db-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.jst-db-panel {
    background: #fff;
    border: 1px solid var(--jst-border);
    border-radius: 12px;
    padding: 18px 20px;
}
.jst-db-panel h3 { margin: 0 0 14px; font-size: 14px; text-transform: uppercase; letter-spacing: .03em; color: var(--jst-muted); }
.jst-db-wide { margin-bottom: 16px; }

/* Bar list (by status) */
.jst-db-bars { list-style: none; margin: 0; padding: 0; }
.jst-db-bars li { margin-bottom: 10px; }
.jst-db-bars a { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--jst-text); }
.jst-db-bar-label { flex: 0 0 84px; font-size: 13px; }
.jst-db-bar-track { flex: 1; height: 10px; background: #f1f5f9; border-radius: 999px; overflow: hidden; }
.jst-db-bar-fill { display: block; height: 100%; border-radius: 999px; min-width: 2px; }
.jst-db-bar-num { flex: 0 0 36px; text-align: right; font-weight: 600; font-size: 13px; }

/* Priority */
.jst-db-priority { display: flex; gap: 10px; }
.jst-db-pri { flex: 1; text-align: center; padding: 14px 6px; border: 1px solid var(--jst-border); border-radius: 10px; text-decoration: none; color: var(--jst-text); }
.jst-db-pri-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.jst-db-pri-num { display: block; font-size: 24px; font-weight: 700; margin: 4px 0 2px; }
.jst-db-pri-label { font-size: 12px; color: var(--jst-muted); }

/* Key-value lists */
.jst-db-kv { list-style: none; margin: 0; padding: 0; }
.jst-db-kv li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.jst-db-kv li:last-child { border-bottom: none; }
.jst-db-kv li span { color: var(--jst-muted); }
.jst-db-kv li strong { font-size: 15px; }
.jst-db-kv a { text-decoration: none; color: var(--jst-primary); }

/* Quick links */
.jst-db-links { display: flex; flex-wrap: wrap; gap: 8px; }
.jst-db-link {
    display: inline-block; padding: 8px 14px; border-radius: 8px;
    background: #f8fafc; border: 1px solid var(--jst-border);
    text-decoration: none; color: var(--jst-text); font-size: 13px; font-weight: 500;
}
.jst-db-link:hover { background: var(--jst-primary); color: #fff; border-color: var(--jst-primary); }

/* Tables */
.jst-db-table { width: 100%; border-collapse: collapse; }
.jst-db-table th, .jst-db-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.jst-db-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--jst-muted); }
.jst-db-table tbody tr:hover { background: #fafbfc; }
.jst-db-table a { color: var(--jst-primary); text-decoration: none; }
.jst-db-empty { color: var(--jst-muted); }
.jst-db .jst-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 600; }

/* Admin tweaks */
.jst-db-wrap .jst-db { margin-top: 10px; }
