/* =============================================
   Ticket Dashboard — Dark Theme
   ============================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0a;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #222;
}

h1 {
    font-size: 22px;
    font-weight: 600;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-badge.online { background: #0d2818; color: #4ade80; }
.status-badge.online .dot { background: #4ade80; }
.status-badge.offline { background: #2a1215; color: #f87171; }
.status-badge.offline .dot { background: #f87171; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #141414;
    border: 1px solid #222;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: #888;
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.filters select,
.filters input {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.filters button {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.filters button:hover { background: #1d4ed8; }

/* Table */
.table-wrapper {
    background: #141414;
    border: 1px solid #222;
    border-radius: 10px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #1a1a1a;
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 10px 16px;
    border-top: 1px solid #1e1e1e;
    font-size: 13px;
    vertical-align: top;
}

td.empty {
    text-align: center;
    color: #555;
    padding: 40px;
}

tr:hover td { background: #1a1a1a; }

td:nth-child(1) { white-space: nowrap; color: #888; width: 140px; }
td:nth-child(2) { color: #7cacf8; width: 180px; }
td:nth-child(3) { width: 120px; }
td:nth-child(4) { word-break: break-word; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
}

.pagination button {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: default;
}

#page-info {
    font-size: 13px;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .filters { flex-wrap: wrap; }
    td:nth-child(2) { display: none; }
    th:nth-child(2) { display: none; }
}
