* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: #f4f6fa;
    color: #111827;
}

a {
    text-decoration: none;
}

.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2f7;
}

.login-wrapper {
    width: 100%;
    max-width: 460px;
    padding: 20px;
}

.login-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.brand-block {
    margin-bottom: 20px;
}

.brand-logo {
    font-size: 30px;
    font-weight: 700;
    color: #2451b2;
}

.brand-subtitle {
    color: #64748b;
    margin-top: 4px;
}

.login-title {
    font-size: 28px;
    margin-bottom: 8px;
}

.login-text {
    color: #64748b;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.form-control {
    width: 100%;
    height: 46px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 14px;
    font-size: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
}

.btn-primary {
    background: #2f5cb9;
    color: #fff;
    height: 46px;
}

.btn-full {
    width: 100%;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: #12203a;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px 18px;
}

.sidebar-brand {
    font-size: 34px;
    font-weight: 700;
    color: #2d64d8;
    margin-bottom: 30px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-section-title {
    color: #8b97ad;
    font-size: 13px;
    font-weight: 700;
    margin: 18px 0 6px;
    letter-spacing: 1px;
}

.nav-link {
    padding: 14px 16px;
    border-radius: 10px;
    color: #e5e7eb;
    display: block;
}

.nav-link:hover,
.nav-link.active {
    background: #2a3b63;
    color: #fff;
}

.sidebar-footer {
    margin-top: 24px;
}

.user-box {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 24px;
}

.user-name {
    font-size: 18px;
    font-weight: 600;
}

.user-role {
    color: #94a3b8;
    margin-top: 4px;
}

.logout-btn {
    display: block;
    margin-top: 14px;
    padding: 14px 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    color: #fff;
}

.main-content {
    flex: 1;
    padding: 42px 34px;
}

.page-header h1 {
    font-size: 48px;
    margin-bottom: 8px;
}

.page-header p {
    color: #64748b;
    font-size: 18px;
    margin-bottom: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 18px;
    padding: 26px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 130px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}

.stat-label {
    color: #5b6b87;
    font-size: 17px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 38px;
    font-weight: 700;
}

.stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.stat-icon.blue { background: #e8f0ff; color: #2d64d8; }
.stat-icon.purple { background: #f0eaff; color: #7c3aed; }
.stat-icon.red { background: #fde8e8; color: #ef4444; }
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-icon.orange { background: #ffedd5; color: #ea580c; }

.panel-card {
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
    min-height: 260px;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
}

.empty-state {
    color: #64748b;
    text-align: center;
    padding-top: 60px;
    font-size: 18px;
}

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 34px;
    }
.btn-secondary {
    background: #e5e7eb;
    color: #111827;
    height: 46px;
    padding: 0 18px;
}

.top-action-btn {
    padding: 0 18px;
}

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.filters-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.filter-input {
    min-width: 280px;
    flex: 1;
}

.filter-select {
    min-width: 180px;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    border-top: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
    font-size: 14px;
}

.data-table th {
    color: #5b6b87;
    font-weight: 700;
    white-space: nowrap;
}

.table-link {
    color: #2f5cb9;
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-status {
    background: #eef2ff;
    color: #4338ca;
}

.badge-priority {
    background: #fff7ed;
    color: #c2410c;
}

.compact-empty {
    padding-top: 24px;
    padding-bottom: 8px;
}

.form-card {
    max-width: 980px;
}

.ticket-form .form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 18px;
}

.form-group-full {
    grid-column: 1 / -1;
}

.textarea-control {
    height: auto;
    padding: 14px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.detail-row span {
    color: #64748b;
}

.description-block {
    margin-top: 24px;
}

.description-title {
    font-weight: 700;
    margin-bottom: 10px;
}

.description-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    line-height: 1.6;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 24px;
}

.comment-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    background: #fafafa;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 13px;
}

.comment-body {
    line-height: 1.6;
}

.comment-form {
    margin-top: 12px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-item {
    border-bottom: 1px solid #eef2f7;
    padding-bottom: 12px;
}

.activity-main {
    font-size: 14px;
    margin-bottom: 4px;
}

.activity-sub,
.activity-time,
.muted {
    color: #64748b;
    font-size: 13px;
}

@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-header-row {
        flex-direction: column;
    }

    .ticket-form .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group-full {
        grid-column: auto;
    }

    .filters-row {
        flex-direction: column;
    }

    .filter-input,
    .filter-select {
        min-width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }
}