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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header */
.header {
    position: relative;
    z-index: 500;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.8rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    flex: 0 0 auto;
    min-width: 0;
    color: #667eea;
}

.site-brand-link {
    display: inline-flex;
    align-items: center;
    min-height: 54px;
    white-space: nowrap;
}

.site-brand-text {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: bold;
    color: inherit;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-logo-image {
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.9rem;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: auto;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
    padding-bottom: 0;
}

.nav-links li {
    flex: 0 0 auto;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.98rem;
    white-space: nowrap;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #667eea;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

.form-text {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.875rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

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

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

/* Login Form */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-card-wide {
    max-width: 460px;
}

.auth-language-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.25rem;
}

.auth-language-form {
    display: inline-flex;
    align-items: center;
}

.auth-language-select {
    min-width: 150px;
    max-width: 220px;
    padding: 0.65rem 2.5rem 0.65rem 0.9rem;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.08);
    color: #312e81;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
}

.auth-language-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
}

.login-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
    font-size: 2rem;
}

.auth-actions {
    margin-top: 1.25rem;
    text-align: center;
}

.auth-link {
    display: inline-block;
    margin-top: 0.35rem;
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 1rem;
        flex-wrap: nowrap;
        text-align: center;
        width: 100%;
        overflow: visible;
        padding-bottom: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.page-loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 9998;
}

.page-loading-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.page-loading-card {
    min-width: 280px;
    max-width: 420px;
    padding: 1.4rem 1.6rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.25);
    text-align: center;
}

.page-loading-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 0.9rem;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

.page-loading-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
}

.page-loading-note {
    margin-top: 0.35rem;
    color: #6b7280;
    font-size: 0.92rem;
}

.permission-section {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    background: #fff;
}

.permission-count {
    color: #6b7280;
    font-size: 0.9rem;
}

.nav-announcement-item {
    position: relative;
    z-index: 2;
}

.user-announcement-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(241, 245, 249, 0.96) 100%);
    color: #0f172a;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.user-announcement-bell:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
    border-color: rgba(249, 115, 22, 0.35);
}

.user-announcement-bell svg {
    width: 22px;
    height: 22px;
}

.user-announcement-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.95);
}

.user-announcement-dot.is-hidden {
    display: none;
}

.live-announcement-banner {
    max-width: 1100px;
    margin: -0.6rem auto 1.2rem;
    padding: 0 20px;
}

.live-announcement-banner.is-hidden {
    display: none;
}

.live-announcement-inner {
    border-radius: 22px;
    padding: 1rem 1.2rem 1.15rem;
    text-align: center;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.88), transparent 38%),
        linear-gradient(135deg, rgba(254, 243, 199, 0.98) 0%, rgba(254, 215, 170, 0.98) 50%, rgba(251, 146, 60, 0.98) 100%);
    border: 1px solid rgba(194, 65, 12, 0.18);
    box-shadow: 0 16px 40px rgba(124, 45, 18, 0.18);
}

.live-announcement-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.55rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    color: #9a3412;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.live-announcement-title {
    color: #7c2d12;
    font-size: clamp(1.1rem, 2.4vw, 1.55rem);
    font-weight: 900;
    line-height: 1.25;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.live-announcement-message {
    margin-top: 0.55rem;
    color: #7c2d12;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.7;
}

.user-announcement-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(420px, 92vw);
    max-height: 72vh;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.18);
    z-index: 1001;
}

.user-announcement-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.85rem;
    border-bottom: 1px solid #e5e7eb;
}

.user-announcement-panel-title {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}

.user-announcement-panel-note {
    margin-top: 0.2rem;
    color: #64748b;
    font-size: 0.88rem;
}

.user-announcement-panel-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.user-announcement-history {
    display: grid;
    gap: 0.85rem;
    max-height: calc(72vh - 90px);
    overflow-y: auto;
    padding: 1rem;
}

.user-announcement-history-item {
    border-radius: 16px;
    padding: 0.95rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.user-announcement-history-item.is-unread {
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
    border-color: #fdba74;
}

.user-announcement-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.55rem;
}

.user-announcement-history-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.26rem 0.64rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
}

.user-announcement-history-chip-banner {
    background: #ffedd5;
    color: #9a3412;
}

.user-announcement-history-chip-popup {
    background: #dbeafe;
    color: #1d4ed8;
}

.user-announcement-history-time {
    color: #64748b;
    font-size: 0.82rem;
}

.user-announcement-history-title {
    color: #0f172a;
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.35;
}

.user-announcement-history-message {
    margin-top: 0.38rem;
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.65;
}

.user-announcement-empty {
    padding: 1.2rem 1rem;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    line-height: 1.65;
}

.announcement-modal[hidden] {
    display: none;
}

.announcement-modal {
    position: fixed;
    inset: 0;
    z-index: 1002;
}

.announcement-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(6px);
}

.announcement-modal-card {
    position: relative;
    width: min(560px, calc(100vw - 32px));
    margin: 8vh auto 0;
    padding: 1.5rem 1.45rem 1.3rem;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.18), transparent 32%),
        linear-gradient(155deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.announcement-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.announcement-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    color: #b45309;
    background: linear-gradient(135deg, rgba(254, 240, 138, 0.82) 0%, rgba(251, 191, 36, 0.22) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.announcement-modal-icon svg {
    width: 28px;
    height: 28px;
}

.announcement-modal-kicker {
    margin-top: 1rem;
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.announcement-modal-title {
    margin-top: 0.4rem;
    color: #0f172a;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 900;
    line-height: 1.25;
}

.announcement-modal-message {
    margin-top: 0.75rem;
    color: #334155;
    font-size: 1rem;
    line-height: 1.75;
}

.announcement-modal-time {
    margin-top: 0.8rem;
    color: #64748b;
    font-size: 0.88rem;
}

.announcement-modal-actions {
    margin-top: 1.2rem;
}

.listing-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(209, 213, 219, 0.9);
}

.listing-toolbar-main {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.listing-summary {
    color: #4b5563;
    font-size: 0.95rem;
    font-weight: 600;
}

.listing-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.listing-inline-form {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin: 0;
}

.listing-inline-label {
    font-size: 0.88rem;
    color: #4b5563;
    font-weight: 600;
}

.listing-select,
.listing-goto-input {
    min-width: 92px;
}

.listing-pagination {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.listing-page,
.listing-page-gap {
    min-width: 40px;
    height: 40px;
    padding: 0 0.8rem;
    border-radius: 12px;
    border: 1px solid #dbe3f0;
    background: #fff;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.listing-page:hover {
    border-color: #667eea;
    box-shadow: 0 10px 22px rgba(102, 126, 234, 0.18);
    transform: translateY(-1px);
}

.listing-page.is-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 22px rgba(102, 126, 234, 0.28);
}

.listing-page.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.listing-page-gap {
    border-style: dashed;
    color: #6b7280;
}

.badge-waiting_admin {
    background-color: #f59e0b;
    color: #fff;
}

.badge-answered {
    background-color: #0ea5e9;
    color: #fff;
}

.badge-closed {
    background-color: #6b7280;
    color: #fff;
}

.ticket-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    gap: 1.5rem;
    align-items: start;
}

.ticket-main-column,
.ticket-side-column {
    min-width: 0;
}

.ticket-form-grid,
.ticket-filter-grid {
    display: grid;
    gap: 1rem;
    align-items: end;
}

.ticket-filter-form {
    margin-bottom: 1rem;
}

.ticket-form-grid-create {
    grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
}

.ticket-filter-grid {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.ticket-form-field,
.ticket-filter-field {
    min-width: 0;
}

.ticket-filter-field {
    margin-bottom: 0;
}

.ticket-filter-field-search {
    grid-column: 1 / -1;
}

.ticket-filter-grid > .ticket-filter-field:not(.ticket-filter-field-search),
.ticket-filter-actions {
    grid-column: span 3;
}

.ticket-filter-actions,
.ticket-form-actions,
.ticket-detail-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ticket-filter-actions {
    justify-content: flex-end;
    min-width: 0;
}

.ticket-panel-form {
    margin-top: 1rem;
}

.ticket-inline-action-form {
    margin: 0;
}

.ticket-closed-notice {
    margin-top: 1rem;
}

.ticket-list {
    display: grid;
    gap: 0.9rem;
}

.ticket-list-item {
    display: block;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: #fff;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.ticket-list-item:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 16px 32px rgba(99, 102, 241, 0.12);
}

.ticket-list-item.is-active {
    border-color: rgba(99, 102, 241, 0.58);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(243, 244, 255, 0.98) 100%);
}

.ticket-list-head,
.ticket-list-meta,
.ticket-detail-row,
.ticket-message-head,
.ticket-status-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ticket-list-title {
    font-size: 1rem;
    font-weight: 800;
    color: #111827;
    min-width: 0;
    word-break: break-word;
}

.ticket-list-meta {
    margin-top: 0.6rem;
    justify-content: flex-start;
    color: #64748b;
    font-size: 0.88rem;
}

.ticket-list-meta span {
    min-width: 0;
    word-break: break-word;
}

.ticket-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.priority-high {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.priority-medium {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.priority-slow {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.ticket-detail-summary {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(203, 213, 225, 0.92);
    background: #f8fafc;
}

.ticket-detail-row span {
    color: #64748b;
    font-size: 0.9rem;
    flex: 0 0 112px;
}

.ticket-detail-row strong {
    color: #111827;
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
    word-break: break-word;
}

.ticket-thread {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
    max-height: 540px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.ticket-message {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(203, 213, 225, 0.92);
    background: #fff;
}

.ticket-message.is-admin {
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.98) 0%, rgba(224, 242, 254, 0.98) 100%);
    border-color: rgba(125, 211, 252, 0.8);
}

.ticket-message.is-user {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(241, 245, 249, 0.98) 100%);
}

.ticket-message-head {
    color: #475569;
    font-size: 0.88rem;
    margin-bottom: 0.55rem;
    align-items: flex-start;
}

.ticket-message-head strong,
.ticket-message-head span {
    min-width: 0;
}

.ticket-message-head span {
    white-space: nowrap;
}

.ticket-message-body {
    color: #111827;
    line-height: 1.7;
    word-break: break-word;
}

@media (max-width: 1180px) {
    .ticket-layout {
        grid-template-columns: 1fr;
    }
}

.app-footer {
    width: 100%;
    margin-top: auto;
    padding: 1.15rem 20px 1.35rem;
    background: rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
}

.app-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.92);
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

@media (max-width: 768px) {
    .live-announcement-banner {
        margin-top: -0.25rem;
    }

    .user-announcement-panel {
        right: 50%;
        transform: translateX(50%);
    }

    .announcement-modal-card {
        margin-top: 5vh;
        padding: 1.35rem 1.1rem 1.15rem;
    }

    .listing-toolbar-actions {
        margin-left: 0;
        justify-content: flex-start;
    }

    .listing-inline-form {
        width: 100%;
    }

    .listing-select,
    .listing-goto-input {
        width: 100%;
    }

    .ticket-layout {
        grid-template-columns: 1fr;
    }

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

    .ticket-filter-field-search,
    .ticket-filter-grid > .ticket-filter-field:not(.ticket-filter-field-search),
    .ticket-filter-actions {
        grid-column: auto;
    }

    .ticket-filter-actions {
        justify-content: flex-start;
    }

    .ticket-thread {
        max-height: none;
    }

    .app-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .app-footer-inner {
        font-size: 0.88rem;
    }
}
