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

:root {
    --primary-color: #F56600;
    --primary-hover: #d45500;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #212529;
    --text-muted: #6c757d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--light-bg);
}

.hidden {
    display: none !important;
}

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

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    margin-bottom: 10px;
    font-size: 24px;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: normal;
    color: var(--text-muted);
    text-align: center;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* Messages */
.error-message {
    color: var(--danger-color);
    font-size: 14px;
    margin-bottom: 15px;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    color: var(--success-color);
    font-size: 14px;
    margin-bottom: 15px;
}

/* Header */
header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
}

.header-content h1 {
    font-size: 24px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Tabs */
.tabs {
    display: flex;
    padding: 0 40px;
    gap: 5px;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Main Content */
.main-content {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-card.warning {
    border-left: 4px solid var(--warning-color);
}

.stat-card h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-color);
}

/* Tables */
.table-container {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

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

th, td {
    padding: 12px 16px;
    text-align: left;
}

th {
    background-color: var(--light-bg);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

tbody tr {
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background-color: var(--light-bg);
}

td.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

.badge-secondary {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Filters */
.filters {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.filters label {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 20px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Code/Key Display */
.key-display {
    background-color: var(--light-bg);
    padding: 15px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin: 15px 0;
    word-break: break-all;
}

.copy-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.copy-btn:hover {
    background-color: #5a6268;
}

/* Actions */
.actions {
    display: flex;
    gap: 8px;
}

/* Info Box */
.info-box {
    background-color: #e7f3ff;
    border-left: 4px solid var(--primary-color);
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.info-box strong {
    display: block;
    margin-bottom: 5px;
}

.info-box p {
    margin: 5px 0 0;
    font-size: 14px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .main-content {
        padding: 20px;
    }

    .tabs {
        padding: 0 20px;
        overflow-x: auto;
    }

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

    .tab-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* ==========================================
   TICKET SYSTEM STYLING
   ========================================== */

/* Ticket Stats Badges */
.ticket-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
}

.stat-badge strong {
    font-size: 1.2rem;
    margin-left: 0.5rem;
}

.stat-open {
    border-color: #0dcaf0;
    background: #e7f6fd;
    color: #055160;
}

.stat-progress {
    border-color: #ffc107;
    background: #fff8e1;
    color: #7a5a00;
}

.stat-waiting {
    border-color: #dc3545;
    background: #fdecea;
    color: #721c24;
}

.stat-closed {
    border-color: #6c757d;
    background: #f1f3f5;
    color: #495057;
}

/* Priority Badges */
.priority {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-low {
    background: #e8f5e9;
    color: #2e7d32;
}

.priority-normal {
    background: #e3f2fd;
    color: #1565c0;
}

.priority-high {
    background: #fff3e0;
    color: #e65100;
}

.priority-urgent {
    background: #ffebee;
    color: #c62828;
}

/* Ticket Modal Styling */
.ticket-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.ticket-info-grid div {
    padding: 0.5rem 0;
}

.ticket-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #fff3cd;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

.ticket-actions select {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

.ticket-actions button {
    white-space: nowrap;
}

/* Ticket Messages */
.ticket-messages {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.message {
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.message:hover {
    transform: translateX(4px);
}

.message-customer {
    border-left-color: #0d6efd;
    background: linear-gradient(to right, #e7f1ff 0%, white 20%);
}

.message-admin {
    border-left-color: #6f42c1;
    background: linear-gradient(to right, #f3e5f5 0%, white 20%);
}

.message.internal {
    border-left-color: #ffc107;
    background: linear-gradient(to right, #fff8e1 0%, white 20%);
    opacity: 0.9;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.message-header strong {
    font-size: 1rem;
    color: #212529;
}

.message-type {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.message-customer .message-type {
    background: #cfe2ff;
    color: #084298;
}

.message-admin .message-type {
    background: #e0cffc;
    color: #432874;
}

.internal-badge {
    background: #ffc107;
    color: #000;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.message-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.message-body {
    color: #495057;
    line-height: 1.6;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Reply Form */
.modal-body h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #dee2e6;
    color: #495057;
}

.modal-body form {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.modal-body textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ced4da;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s;
}

.modal-body textarea:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,.25);
}

.modal-body .form-group {
    margin: 1rem 0;
}

.modal-body .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem;
    background: #fff8e1;
    border-radius: 6px;
    transition: background 0.2s;
}

.modal-body .form-group label:hover {
    background: #fff3cd;
}

.modal-body .form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.modal-body button[type="submit"] {
    margin-top: 1rem;
}

/* Empty States */
.closed-notice {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
}

/* ==========================================
   TICKET CARD LAYOUT (Portal Style)
   ========================================== */

/* Override table styling for tickets tab with card-based layout */
#tickets-tab .table-container {
    background: transparent;
    border: none;
    box-shadow: none;
}

#tickets-tab table {
    display: none; /* Hide table view */
}

/* Ticket Cards Container */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Individual Ticket Card */
.ticket-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

.ticket-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.ticket-card .ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.ticket-card .ticket-header h3 {
    margin: 0;
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
}

.ticket-card .ticket-status {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Ticket Status Colors */
.ticket-card .status-open {
    background: #e3f2fd;
    color: #1976d2;
}

.ticket-card .status-in_progress {
    background: #fff3e0;
    color: #f57c00;
}

.ticket-card .status-waiting_customer {
    background: #fce4ec;
    color: #c2185b;
}

.ticket-card .status-closed {
    background: #f5f5f5;
    color: #616161;
}

/* Ticket Meta Information */
.ticket-card .ticket-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-muted);
    align-items: center;
}

.ticket-card .ticket-meta > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticket-card .ticket-meta strong {
    color: var(--text-color);
    font-weight: 600;
}

/* Priority Badge in Card */
.ticket-card .priority {
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.ticket-card .priority-low {
    background: #e8f5e9;
    color: #2e7d32;
}

.ticket-card .priority-normal {
    background: #e3f2fd;
    color: #1565c0;
}

.ticket-card .priority-high {
    background: #fff3e0;
    color: #e65100;
}

.ticket-card .priority-urgent {
    background: #ffebee;
    color: #c62828;
}

/* Customer Name in Ticket Card */
.ticket-card .customer-name {
    color: var(--primary-color);
    font-weight: 500;
}

/* Assigned Admin Badge */
.ticket-card .assigned-badge {
    background: #e7f3ff;
    color: var(--primary-color);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Unassigned Badge */
.ticket-card .unassigned-badge {
    background: #f5f5f5;
    color: #9e9e9e;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-style: italic;
}

/* Message Count Badge */
.ticket-card .message-count {
    background: var(--light-bg);
    color: var(--text-muted);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Empty State for Tickets */
.tickets-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.tickets-empty h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

/* Ticket Stats Row */
.ticket-stats-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.ticket-stats-row .stat-badge {
    flex: 1;
    min-width: 150px;
    padding: 1rem;
    border-radius: 8px;
    background: var(--white);
    border: 2px solid var(--border-color);
    text-align: center;
}

.ticket-stats-row .stat-badge strong {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.ticket-stats-row .stat-badge span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive for Ticket Cards */
@media (max-width: 768px) {
    .ticket-card .ticket-header {
        flex-direction: column;
    }
    
    .ticket-card .ticket-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .ticket-stats-row {
        flex-direction: column;
    }
    
    .ticket-stats-row .stat-badge {
        min-width: 100%;
    }
}


/* ==========================================
   ADMIN TICKET MODAL - PORTAL STYLE
   ========================================== */

/* Override admin ticket modal styling to match portal */
.modal .ticket-info-grid {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.modal .ticket-info-grid div {
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.modal .ticket-info-grid strong {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Clean ticket actions area */
.modal .ticket-actions {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.modal .ticket-actions select {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: white;
    font-size: 0.95rem;
}

.modal .ticket-actions button {
    white-space: nowrap;
    padding: 0.6rem 1.5rem;
}

/* Messages Container - Portal Style */
.modal .ticket-messages {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.modal .ticket-messages h3 {
    margin: 0 0 1rem 0;
    padding: 0;
    border: none;
    font-size: 1.1rem;
    color: var(--text-color);
}

/* Individual Messages - Clean Portal Style */
.modal .message {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.modal .message:last-child {
    margin-bottom: 0;
}

.modal .message.message-customer {
    border-left-color: #1976d2;
    background: linear-gradient(to right, #e3f2fd 0%, white 15%);
}

.modal .message.message-admin {
    border-left-color: var(--primary-color);
    background: linear-gradient(to right, #fff3e0 0%, white 15%);
}

.modal .message.internal {
    border-left-color: #ffc107;
    background: linear-gradient(to right, #fff8e1 0%, white 15%);
    opacity: 0.95;
}

.modal .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

.modal .message-header strong {
    font-size: 0.95rem;
    color: var(--text-color);
}

.modal .message-type {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.modal .message-customer .message-type {
    background: #bbdefb;
    color: #0d47a1;
}

.modal .message-admin .message-type {
    background: #ffe0b2;
    color: #e65100;
}

.modal .internal-badge {
    background: #ffc107;
    color: #000;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.modal .message-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.modal .message-body {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 0.95rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Reply Form - Portal Style */
.modal .reply-form {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.modal .reply-form h3 {
    margin: 0 0 1rem 0;
    padding: 0 0 0.75rem 0;
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.1rem;
    color: var(--text-color);
}

.modal .reply-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s;
}

.modal .reply-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 102, 0, 0.1);
}

.modal .reply-form .form-group {
    margin: 1rem 0;
}

.modal .reply-form .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.modal .reply-form .form-group label:hover {
    background: #fff3cd;
}

.modal .reply-form .form-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.modal .reply-form .form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.modal .reply-form button {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

/* Closed Notice */
.modal .closed-notice {
    text-align: center;
    padding: 2rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    font-style: italic;
}

/* Scrollbar Styling for Messages */
.modal .ticket-messages::-webkit-scrollbar {
    width: 8px;
}

.modal .ticket-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal .ticket-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.modal .ticket-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}


/* Fix for ticket actions wrapping */
.modal .ticket-actions {
    flex-wrap: wrap;
}

.modal .ticket-actions select {
    min-width: 150px;
}

/* Ensure button stays in flow on small screens */
@media (max-width: 768px) {
    .modal .ticket-actions {
        flex-direction: column;
    }
    
    .modal .ticket-actions select,
    .modal .ticket-actions button {
        width: 100%;
    }
}

