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

:root {
    font-family: Arial, Helvetica, sans-serif;
    color: #1f2937;
    background: #f4f7fb;
}

body {
    min-height: 100vh;
    background: #f4f7fb;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(1200px, 92%);
    margin: 0 auto;
    padding: 40px 0;
}

.page-header {
    margin-bottom: 24px;
}

.eyebrow {
    margin-bottom: 6px;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1 {
    margin-bottom: 8px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.subtitle,
.panel-heading p {
    color: #6b7280;
    line-height: 1.5;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.summary-card {
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.summary-card span {
    display: block;
    margin-bottom: 10px;
    color: #6b7280;
    font-size: 0.9rem;
}

.summary-card strong {
    font-size: 2rem;
}

.panel {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.panel-heading {
    margin-bottom: 20px;
}

.ticket-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ticket-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group-wide {
    grid-column: 1 / -1;
}

label {
    font-size: 0.9rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 11px 12px;
    color: #1f2937;
    background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, 0.12);
}

textarea {
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
}

.primary-button,
.secondary-button,
.danger-button,
.action-button {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 700;
}

.primary-button {
    color: #ffffff;
    background: #2563eb;
}

.primary-button:hover {
    background: #1d4ed8;
}

.secondary-button {
    color: #1f2937;
    background: #e5e7eb;
}

.danger-button {
    color: #ffffff;
    background: #dc2626;
}

.danger-button:hover {
    background: #b91c1c;
}

.filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

th {
    color: #475569;
    background: #f8fafc;
    font-size: 0.82rem;
    text-transform: uppercase;
}

td {
    font-size: 0.92rem;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.78rem;
    font-weight: 700;
}

.priority-low {
    color: #166534;
    background: #dcfce7;
}

.priority-medium {
    color: #92400e;
    background: #fef3c7;
}

.priority-high {
    color: #9a3412;
    background: #ffedd5;
}

.priority-critical {
    color: #991b1b;
    background: #fee2e2;
}

.status-open {
    color: #1d4ed8;
    background: #dbeafe;
}

.status-in-progress {
    color: #6b21a8;
    background: #f3e8ff;
}

.status-resolved {
    color: #166534;
    background: #dcfce7;
}

.actions {
    display: flex;
    gap: 8px;
}

.action-button {
    padding: 7px 10px;
    font-size: 0.8rem;
}

.edit-button {
    color: #1d4ed8;
    background: #dbeafe;
}

.delete-button {
    color: #991b1b;
    background: #fee2e2;
}

.empty-state {
    padding: 30px;
    color: #6b7280;
    text-align: center;
}

.hidden {
    display: none;
}

@media (max-width: 900px) {
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ticket-form,
    .filters {
        grid-template-columns: 1fr;
    }

    .form-group-wide {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
    .container {
        width: min(94%, 1200px);
        padding: 24px 0;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 18px;
    }

    .ticket-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}