/* Modern CSS Reset  */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS Variables for consistent theming */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #0ea5e9;
    --background-color: #f8fafc;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* Base styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

/* Search Section Styles */
.search-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.status-filter {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background-color: white;
    color: var(--text-primary);
    width: auto;
    flex-shrink: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.status-filter:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(100, 116, 139, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    transition: all 0.2s ease;
    z-index: 2;
}

.clear-search-btn:hover {
    background: var(--error-color);
    transform: translateY(-50%) scale(1.1);
}

.clear-search-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.search-results-info {
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f0f9ff;
    color: var(--info-color);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 500;
}

.search-results-info.hidden {
    display: none;
}

.no-tickets-message {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    background: var(--card-background);
    border-radius: var(--border-radius);
    border: 2px dashed var(--border-color);
}

/* View Toggle Styles */
.header-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.view-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0;
}

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

.view-btn.active {
    background: var(--primary-color);
    color: white;
}

.view-btn + .view-btn {
    border-left: 1px solid var(--border-color);
}

.view-btn.active + .view-btn {
    border-left-color: var(--primary-color);
}

/* Table View Styles */
.tickets-table-view {
    background: var(--card-background);
    border-radius: var(--border-radius);
    overflow: visible;
    box-shadow: var(--shadow-sm);
}

.tickets-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.tickets-table th {
    background: var(--background-color);
    padding: 0.75rem 0.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Sortable column headers */
.tickets-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.tickets-table th.sortable:hover {
    background: var(--border-color);
}

.tickets-table th.sortable.sort-asc,
.tickets-table th.sortable.sort-desc {
    background: var(--primary-color);
    color: white;
}

.tickets-table th.sortable.sort-asc:hover,
.tickets-table th.sortable.sort-desc:hover {
    background: var(--primary-hover);
}

.sort-indicator {
    font-size: 0.7rem;
    margin-left: 0.25rem;
    opacity: 0.8;
}

/* Notes preview tooltip */
.notes-tooltip {
    position: fixed;
    background: var(--text-primary);
    color: white;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    line-height: 1.4;
    max-width: 400px;
    width: max-content;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    display: block;
}

.notes-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.notes-tooltip .note-item {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.notes-tooltip .note-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.notes-tooltip .note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    font-size: 0.7rem;
    opacity: 0.8;
}

.notes-tooltip .note-author {
    font-weight: 600;
}

.notes-tooltip .note-date {
    font-size: 0.65rem;
}

.notes-tooltip .note-text {
    color: white;
    font-size: 0.75rem;
    line-height: 1.3;
}

.notes-tooltip .more-notes {
    text-align: center;
    font-size: 0.65rem;
    opacity: 0.7;
    margin-top: 0.5rem;
    font-style: italic;
}

.tickets-table td {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

/* Prominent zebra striping for table rows */
.ticket-row:nth-child(even) {
    background: #f1f5f9;
}

.ticket-row:nth-child(odd) {
    background: #ffffff;
}

.ticket-row:hover {
    background: #e2e8f0 !important;
}

.priority-cell {
    text-align: left;
    font-weight: 600;
    color: var(--primary-color);
    vertical-align: top;
    width: 120px;
}

.priority-number {
    display: block;
    margin-bottom: 0.25rem;
}

.drag-handle-table {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: grab;
}

.drag-handle-table:active {
    cursor: grabbing;
}

.priority-actions {
    display: flex;
    gap: 0.0625rem;
    margin-top: 0.125rem;
    justify-content: flex-start;
}

.move-top-btn,
.move-bottom-btn,
.move-up-btn,
.move-down-btn {
    padding: 0.0625rem 0.125rem;
    font-size: 0.5rem;
    line-height: 1;
    min-width: unset;
    min-height: 16px;
    width: 18px;
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    color: white;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.move-top-btn {
    grid-column: 1 / -1; /* Span both columns */
}

.move-bottom-btn {
    grid-column: 1 / -1; /* Span both columns */
}

.move-top-btn:hover,
.move-bottom-btn:hover,
.move-up-btn:hover,
.move-down-btn:hover {
    background: #1d4ed8;
    color: white;
    border-color: #1d4ed8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-xxs {
    padding: 0.125rem 0.25rem;
    font-size: 0.6rem;
    line-height: 1;
}

.ticket-number-cell {
    font-weight: 600;
    color: var(--primary-color);
}

.status-cell {
    position: relative;
}

.table-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.table-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
}

.urgency-cell .urgency-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.description-cell {
    max-width: 300px;
}

.description-text {
    max-height: 4rem;
    overflow: hidden;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.submitter-cell {
    font-size: 0.9rem;
}

.submitter-name {
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.submitter-email {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.submitter-email a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.submitter-email a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.email-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.email-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.email-btn-inline {
    font-size: 0.75rem;
    padding: 0.15rem 0.35rem;
    margin-left: 0.25rem;
}

.created-cell {
    text-align: center;
    font-size: 0.9rem;
}

.created-date {
    font-weight: 500;
    margin-bottom: 0.125rem;
}

.created-time {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.notes-cell {
    text-align: center;
}

.notes-cell .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
}

.notes-cell .notes-count {
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

/* View State Management */
.view-cards {
    display: block;
}

.view-table {
    display: block;
}

.view-cards.hidden,
.view-table.hidden {
    display: none;
}

/* Responsive Table */
@media (max-width: 1200px) {
    .tickets-table th,
    .tickets-table td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .description-cell {
        max-width: 200px;
    }
    
    .description-text {
        max-height: 3rem;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 768px) {
    .header-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .view-toggle {
        order: -1;
        align-self: center;
    }
    
    .tickets-table-view {
        overflow-x: auto;
    }
    
    .tickets-table {
        min-width: 800px;
    }
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px; /* Touch-friendly */
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

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

.btn-success:hover {
    background-color: #059669;
}

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

.btn-warning:hover {
    background-color: #d97706;
}

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

.btn-danger:hover {
    background-color: #dc2626;
}

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

.btn-info:hover {
    background-color: #0284c7;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    min-height: 36px;
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    min-height: 24px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.025em;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-compact {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    min-height: 36px;
}

/* Enhanced Button Styles for Better Contrast */
.btn-success.btn-xs {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #059669;
}

.btn-success.btn-xs:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-warning.btn-xs {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-color: #d97706;
}

.btn-warning.btn-xs:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.btn-secondary.btn-xs {
    background: linear-gradient(135deg, #64748b, #475569);
    border-color: #475569;
}

.btn-secondary.btn-xs:hover {
    background: linear-gradient(135deg, #475569, #334155);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.4);
}

.btn-info.btn-xs {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    border-color: #0284c7;
}

.btn-info.btn-xs:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}

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

.form-group-compact {
    margin-bottom: 1rem;
}

.form-group-compact:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: white;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Cards */
.card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: #f8fafc;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: #f8fafc;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    border: 1px solid;
}

.success-message {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 2px solid #bbf7d0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: #166534;
    font-weight: 500;
    box-shadow: 0 4px 16px rgb(16 185 129 / 0.15);
    animation: slideInDown 0.5s ease;
}

.error-message {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 2px solid #fecaca;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: #991b1b;
    font-weight: 500;
    box-shadow: 0 4px 16px rgb(239 68 68 / 0.15);
    animation: slideInDown 0.5s ease;
}

.warning-message {
    background-color: #fffbeb;
    border-color: #fed7aa;
    color: #92400e;
}

.info-message {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: fadeInUp 0.5s ease;
}

.login-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
}

.login-header h1 {
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.login-header p {
    opacity: 0.9;
    margin-bottom: 0;
}

.login-form {
    padding: 2rem;
}

.login-footer {
    text-align: center;
    padding: 1rem 2rem 2rem;
}

.login-footer p {
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* Dashboard Styles */
.dashboard-container {
    min-height: 100vh;
    background-color: var(--background-color);
}

.dashboard-header {
    background: linear-gradient(135deg, var(--card-background) 0%, #f8fafc 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dashboard-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.dashboard-content {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    margin: 1rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Statistics Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card-compact {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card-compact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    transition: all 0.3s ease;
}

.stat-card-compact:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Color coding for different stat types */
.stat-total::before {
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.stat-open::before {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.stat-progress::before {
    background: linear-gradient(90deg, #3b82f6, #1e40af);
}

.stat-completed::before {
    background: linear-gradient(90deg, #10b981, #059669);
}

.stat-archived::before {
    background: linear-gradient(90deg, #0ea5e9, #0284c7);
}

.stat-locations::before {
    background: linear-gradient(90deg, #8b5cf6, #7c3aed);
}

.stat-icon {
    font-size: 1.5rem;
    opacity: 0.8;
    min-width: 2rem;
    text-align: center;
}

.stat-content {
    flex: 1;
}

.stat-number-compact {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-total .stat-number-compact {
    color: #667eea;
}

.stat-open .stat-number-compact {
    color: #f59e0b;
}

.stat-progress .stat-number-compact {
    color: #3b82f6;
}

.stat-completed .stat-number-compact {
    color: #10b981;
}

.stat-archived .stat-number-compact {
    color: #0ea5e9;
}

.stat-locations .stat-number-compact {
    color: #8b5cf6;
}

.stat-label-compact {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Table Styles */
.table-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text-primary);
}

tr:hover {
    background-color: #f8fafc;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-open {
    background-color: #fef3c7;
    color: #92400e;
}

.status-in-progress {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-complete {
    background-color: #d1fae5;
    color: #065f46;
}

/* Status button groups */
.status-buttons-group, .status-buttons-group-table, .status-buttons-group-modal {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-items: center;
}

.status-buttons-group-table {
    gap: 0.15rem;
}

.status-buttons-group-modal {
    gap: 0.5rem;
}

/* Status buttons */
.status-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border: 2px solid;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.status-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-btn:active {
    transform: translateY(0);
}

/* Status button colors */
.status-btn-open {
    background-color: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.status-btn-open:hover {
    background-color: #fde68a;
    border-color: #d97706;
}

.status-btn-progress {
    background-color: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.status-btn-progress:hover {
    background-color: #bfdbfe;
    border-color: #1d4ed8;
}

.status-btn-complete {
    background-color: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.status-btn-complete:hover {
    background-color: #a7f3d0;
    border-color: #059669;
}

/* Compact sizing for different contexts */
.status-btn.btn-xs {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

.status-btn.btn-compact {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

/* Urgency badges */
.urgency-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 0.5rem;
}

.urgency-normal {
    background-color: #e0f2fe;
    color: #0369a1;
}

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

.urgency-emergency {
    background-color: #fee2e2;
    color: #991b1b;
    animation: pulse 2s infinite;
}

/* Tickets Grid Layout */
.tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

/* Ticket Cards */
.ticket-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    user-select: none;
    position: relative;
}

.ticket-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.ticket-card:hover .drag-handle {
    color: var(--primary-color);
    opacity: 1;
}

.ticket-card:active {
    cursor: grabbing;
}

.ticket-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, var(--primary-color) 30%, var(--primary-color) 32%, transparent 32%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.ticket-card:hover::after {
    opacity: 0.05;
}

/* Dragging States */
.ticket-chosen {
    opacity: 0.8;
    transform: rotate(2deg);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    background: #f8fafc;
}

.ticket-chosen::after {
    opacity: 0.1;
}

.ticket-dragging {
    opacity: 0.4;
    transform: rotate(5deg) scale(0.95);
}

.ticket-drag {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: rotate(3deg);
}

.sortable-ghost {
    opacity: 0.4;
}

.sortable-chosen {
    cursor: grabbing;
}

/* Ticket Header */
.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.ticket-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ticket-number {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.ticket-actions {
    display: flex;
    gap: 0.25rem;
}

/* Priority Circle */
.priority-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    margin-right: 0.5rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Special colors for high priority */
.ticket-card:nth-child(1) .priority-circle {
    background-color: #dc2626; /* Red for P1 */
}

.ticket-card:nth-child(2) .priority-circle {
    background-color: #d97706; /* Orange for P2 */
}

.ticket-card:nth-child(3) .priority-circle {
    background-color: #059669; /* Green for P3 */
}

/* Drag Handle */
.drag-handle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: grab;
    padding: 0.25rem;
    line-height: 1;
    user-select: none;
    display: inline-block;
    width: 1.5rem;
    text-align: center;
    opacity: 0.6;
    transition: all 0.2s ease;
    font-family: monospace; /* Better support for vertical dots */
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle:hover {
    color: var(--text-primary);
    opacity: 1;
}

/* Prevent dragging on buttons */
.no-drag {
    cursor: pointer !important;
}

.no-drag:hover {
    cursor: pointer !important;
}

/* Ticket Content Sections */
.ticket-location {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.ticket-location strong {
    color: var(--text-primary);
}

.ticket-description {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    
    /* Limit to 2-3 lines with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.9rem; /* Roughly 3 lines */
}

.ticket-submitter {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.ticket-submitter strong {
    color: var(--text-primary);
}

/* Ticket Footer */
.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
}

.ticket-meta {
    flex: 1;
}

.ticket-dates {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.ticket-notes-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notes-count {
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    padding: 0.1rem 0.3rem;
    font-size: 0.65rem;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

/* Notes modal should appear above other modals */
#notes-modal {
    z-index: 1100;
}

.modal-content {
    background-color: var(--card-background);
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    animation: slideInDown 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-content {
    max-height: 85vh;
    overflow-y: auto;
}

.modal-compact {
    max-width: 600px;
}

.modal-large {
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-small {
    max-width: 450px;
}

/* Archive confirmation modal styles */
.archive-ticket-info {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
}

.archive-ticket-desc {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.archive-warning {
    color: #6b7280;
    margin-top: 1rem;
    text-align: center;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-compact {
    padding: 1rem 1.25rem;
}

.modal-header h3,
.modal-header-compact h3 {
    margin: 0;
    font-size: 1.25rem;
}

.modal-close {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body-compact {
    padding: 1rem 1.25rem;
}

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

.modal-footer-compact {
    padding: 0.75rem 1.25rem;
    gap: 0.75rem;
}

/* Archived Tickets Modal Styles */
.archived-header {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.archived-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.archived-tickets-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
}

.archived-ticket-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    transition: background-color 0.2s ease;
}

.archived-ticket-item:hover {
    background-color: #f8fafc;
}

.archived-ticket-item:last-child {
    border-bottom: none;
}

.archived-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.archived-ticket-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.archived-ticket-actions {
    display: flex;
    gap: 0.25rem;
}

.archived-ticket-location {
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    color: var(--text-secondary);
}

.archived-ticket-location strong {
    color: var(--text-primary);
}

.archived-ticket-description {
    font-size: 0.85rem;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.archived-ticket-submitter {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.archived-ticket-submitter strong {
    color: var(--text-primary);
}

.archived-ticket-dates {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.2;
}

.no-archived-tickets {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 3rem;
    font-size: 0.9rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Ticket Detail Modal Styles */
.ticket-detail-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.ticket-detail-badges {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.ticket-detail-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ticket-detail-row strong {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

.ticket-detail-description {
    background: #f8fafc;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
    line-height: 1.5;
    white-space: pre-wrap;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
    font-size: 1rem;
}

.ticket-detail-notes-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.ticket-detail-notes-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.ticket-detail-actions {
    display: flex;
    gap: 0.5rem;
}

/* Notes Modal Styles */
.add-note-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.add-note-section textarea {
    width: 100%;
    min-height: 60px;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    resize: vertical;
}

.add-note-section textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgb(37 99 235 / 0.1);
}

.notes-list {
    max-height: 300px;
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .notes-list {
        max-height: 350px;
    }
}

.note-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.2s ease;
    animation: slideInNote 0.3s ease;
}

.note-item:hover {
    box-shadow: var(--shadow-sm);
}

.note-item:last-child {
    margin-bottom: 0;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.note-header strong {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.note-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.note-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    white-space: pre-wrap;
}

.no-notes {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
    font-size: 0.9rem;
}

/* Password Requirements Styles */
.password-group {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.password-field {
    margin-bottom: 0.75rem;
}

.password-field:last-of-type {
    margin-bottom: 0.5rem;
}

.password-field label {
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.password-field input {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    height: auto;
    min-height: 38px;
}

.password-requirements {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: #f8fafc;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.password-requirements-compact {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 0.75rem;
}

.password-requirements .requirement,
.password-requirements-compact .requirement {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin: 0;
    transition: color 0.2s ease;
}

.password-requirements .requirement {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.password-requirements .requirement:last-child {
    margin-bottom: 0;
}

.password-requirements .requirement.met,
.password-requirements-compact .requirement.met {
    color: var(--success-color);
    font-weight: 500;
}


.password-requirements .indicator,
.password-requirements-compact .indicator {
    display: inline-block;
    width: 0.875rem;
    margin-right: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.password-requirements .indicator {
    width: 1rem;
    margin-right: 0.25rem;
}

/* Password Match Text */
.password-match-text {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    min-height: 1rem;
}

.password-match-text.text-success {
    color: var(--success-color);
}

.password-match-text.text-error {
    color: var(--error-color);
}

.password-match-text.text-muted {
    color: var(--text-secondary);
}

/* Helper Text */
.helper-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.reset-user-info {
            margin-bottom: 1rem;
            font-size: 0.9rem;
            color: var(--text-primary);
        }

        /* Notification Modal Styles */
        .notification-user-info {
            margin-bottom: 1.5rem;
            font-size: 0.9rem;
            color: var(--text-primary);
            text-align: center;
            padding: 0.75rem;
            background-color: #f8fafc;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
        }

        .notification-email-info {
            margin-bottom: 1.5rem;
            font-size: 0.9rem;
            color: var(--text-primary);
            text-align: center;
            padding: 0.75rem;
            background-color: #f0f9ff;
            border-radius: 8px;
            border: 1px solid #bae6fd;
        }

        .notification-email-info #user-email-display {
            color: var(--primary-color);
            font-weight: 600;
            font-style: normal;
        }

        .notification-email-info.no-email {
            background-color: #fef2f2;
            border-color: #fecaca;
        }

/* Statistics Badges */
.stats-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: default;
}

.stat-badge:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-badge .stat-icon {
    font-size: 1rem;
    opacity: 0.8;
}

.stat-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
}

/* Subtle color indicators */
.stat-badge.stat-total {
    border-left: 3px solid #6366f1;
}

.stat-badge.stat-open {
    border-left: 3px solid #0ea5e9;
}

.stat-badge.stat-progress {
    border-left: 3px solid #3b82f6;
}

.stat-badge.stat-completed {
    border-left: 3px solid #10b981;
}

.stat-badge.stat-archived {
    border-left: 3px solid #8b5cf6;
}

        .notification-email-info.no-email #user-email-display {
            color: var(--error-color);
        }

        .notification-settings {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .notification-item {
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 1rem;
            transition: all 0.2s ease;
        }

        .notification-item:hover {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        }

        .notification-item.emergency {
            border-color: #fee2e2;
            background: linear-gradient(135deg, #fef2f2, #fff);
        }

        .notification-header {
            margin-bottom: 0.75rem;
        }

        .notification-label {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            cursor: pointer;
            font-weight: 500;
            margin-bottom: 0;
        }

        .notification-checkbox {
            width: 1rem;
            height: 1rem;
            margin: 0;
            cursor: pointer;
        }

        .notification-title {
            font-size: 0.9rem;
            color: var(--text-primary);
        }






/* Enhanced Form Styling */
.ticket-form {
    position: relative;
}

.ticket-form .form-group {
    position: relative;
    margin-bottom: 2rem;
}

.ticket-form label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticket-form label::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.6;
}

.ticket-form input,
.ticket-form select,
.ticket-form textarea {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgb(0 0 0 / 0.02);
}

.ticket-form input:focus,
.ticket-form select:focus,
.ticket-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgb(37 99 235 / 0.1), 0 4px 12px rgb(0 0 0 / 0.1);
    transform: translateY(-1px);
}

.ticket-form input:hover,
.ticket-form select:hover,
.ticket-form textarea:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 8px rgb(0 0 0 / 0.05);
}

.ticket-form small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-left: 1.25rem;
}

.ticket-form select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 1.5rem;
    padding-right: 3rem;
    appearance: none;
}

/* Enhanced Form Cards */
.public-form-card {
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgb(0 0 0 / 0.1);
    border: 1px solid rgb(255 255 255 / 0.2);
    backdrop-filter: blur(20px);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.public-form-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 60px rgb(0 0 0 / 0.15);
}

.public-form-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.public-form-card .card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Ccircle cx='7' cy='7' r='1'/%3E%3Ccircle cx='27' cy='7' r='1'/%3E%3Ccircle cx='47' cy='7' r='1'/%3E%3Ccircle cx='7' cy='27' r='1'/%3E%3Ccircle cx='27' cy='27' r='1'/%3E%3Ccircle cx='47' cy='27' r='1'/%3E%3Ccircle cx='7' cy='47' r='1'/%3E%3Ccircle cx='27' cy='47' r='1'/%3E%3Ccircle cx='47' cy='47' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.public-form-card .card-header h3 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.public-form-card .card-header p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.public-form-card .card-body {
    padding: 2.5rem;
}

/* Instructions Card Enhancement */
.instructions-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgb(0 0 0 / 0.08);
}

.instructions-card .card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    padding: 1.5rem;
}

.instructions-card .card-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.instructions-card .card-body {
    padding: 2rem;
}

.instruction-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.05);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.instruction-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgb(0 0 0 / 0.1);
}

.instruction-item h5 {
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.instruction-item p,
.instruction-item ul {
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.instruction-item ul {
    padding-left: 1rem;
}

.instruction-item ul li {
    margin-bottom: 0.25rem;
}

/* Enhanced Submit Button */
.ticket-form .btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgb(37 99 235 / 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ticket-form .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.ticket-form .btn-primary:hover::before {
    left: 100%;
}

.ticket-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgb(37 99 235 / 0.4);
}

.ticket-form .btn-primary:active {
    transform: translateY(0);
}

/* Public Page Background */
body:not(.login-page):not(.dashboard-container) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Public Header Enhancement */
.public-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgb(0 0 0 / 0.1);
}

/* Compact Form Labels and Inputs */
.modal-compact label {
    font-size: 0.875rem;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.modal-compact input[type="text"],
.modal-compact input[type="email"],
.modal-compact input[type="password"] {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
    height: auto;
    min-height: 38px;
}

/* Focus States */
.ticket-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-success { color: var(--success-color); font-weight: 500; }
.text-error { color: var(--error-color); font-weight: 500; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-full { width: 100%; }
.hidden { display: none; }

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInNote {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Desktop: Show inline emojis, normal text flow, no line breaks */
.table-header .btn .btn-emoji {
    display: inline;
    margin-right: 0.25rem;
}

.table-header .btn .btn-break {
    display: inline;
}

.table-header .btn .btn-break::before {
    display: none !important;
    content: none !important;
}

.table-header .btn::before {
    display: none;
}

/* Responsive Design */



/* Responsive Design */
@media (max-width: 1200px) {
    .tickets-grid {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
    
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* Desktop styles - hide hamburger menu and mobile nav */
@media (min-width: 769px) {
    .hamburger-menu {
        display: none !important;
    }
    
    .mobile-nav-overlay,
    .mobile-nav {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Mobile-first approach with better touch targets */
    body {
        font-size: 16px; /* Prevent zoom on iOS */
        -webkit-text-size-adjust: 100%;
    }
    
    .dashboard-header {
        padding: 1rem;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 1rem;
        position: sticky;
        top: 0;
        background: white;
        z-index: 100;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    .dashboard-nav {
        justify-content: flex-start;
    }

    /* Hide desktop navigation on mobile */
    .desktop-nav,
    .desktop-user-info {
        display: none !important;
    }

    /* Hamburger Menu Button */
    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px;
        height: 44px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }

    .hamburger-menu:hover {
        background-color: #f1f5f9;
    }

    .hamburger-line {
        width: 24px;
        height: 3px;
        background-color: #334155;
        border-radius: 2px;
        transition: all 0.3s ease;
        margin: 2px 0;
    }

    .hamburger-menu.active .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .hamburger-menu.active .hamburger-line:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* Mobile Navigation Overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-nav-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Mobile Navigation Menu */
    .mobile-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100%;
        background: white;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
    }

    .mobile-nav.active {
        left: 0;
    }

    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
        background: #f8fafc;
    }

    .mobile-nav-header h3 {
        margin: 0;
        font-size: 1.125rem;
        font-weight: 600;
        color: #334155;
    }

    .mobile-nav-close {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        font-size: 24px;
        color: #64748b;
        cursor: pointer;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }

    .mobile-nav-close:hover {
        background-color: #e2e8f0;
    }

    .mobile-nav-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow-y: auto;
    }

    .mobile-nav-user {
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
        background: #f1f5f9;
    }

    .mobile-user-welcome {
        font-size: 0.875rem;
        color: #64748b;
        font-weight: 500;
    }

    .mobile-nav-links {
        flex: 1;
        padding: 0.5rem 0;
    }

    .mobile-nav-link {
        display: flex;
        align-items: center;
        padding: 1rem;
        text-decoration: none;
        color: #334155;
        transition: background-color 0.2s ease;
        border: none;
        background: none;
        width: 100%;
        min-height: 48px;
    }

    .mobile-nav-link:hover {
        background-color: #f1f5f9;
        color: #1e40af;
    }

    .mobile-nav-link.active {
        background-color: #dbeafe;
        color: #1e40af;
        border-left: 3px solid #3b82f6;
    }

    .mobile-nav-link.logout-link {
        color: #dc2626;
    }

    .mobile-nav-link.logout-link:hover {
        background-color: #fef2f2;
        color: #b91c1c;
    }

    .mobile-nav-icon {
        font-size: 1.25rem;
        margin-right: 0.75rem;
        min-width: 24px;
    }

    .mobile-nav-text {
        font-weight: 500;
        font-size: 1rem;
    }

    .mobile-nav-footer {
        border-top: 1px solid #e2e8f0;
        padding: 0.5rem 0;
        margin-top: auto;
    }
	
	/* Mobile layout for Add Location form */
#add-location-form {
    flex-direction: column !important;
    gap: 1rem !important;
    align-items: stretch;
}

#add-location-form > div[style*="flex"] {
    flex: none !important;
    width: 100% !important;
}

#add-location-form > .btn-primary {
    width: 100% !important;
    margin-top: 0.5rem;
    align-self: center;
    flex: none !important;
}
    
    .dashboard-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .dashboard-nav .btn {
        font-size: 0.8rem;
        padding: 0.6rem 1rem;
        white-space: nowrap;
        min-height: 44px; /* iOS touch target minimum */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }

    .table-header h3 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .header-controls {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .view-toggle {
        display: flex;
        gap: 0.5rem;
        width: 100%;
    }

    .view-toggle .btn {
        flex: 1;
        min-height: 44px;
        font-size: 0.9rem;
        padding: 0.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .header-controls .d-flex {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .header-controls .btn {
        width: 100%;
        min-height: 50px;
        font-size: 1rem;
        padding: 0.75rem 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        white-space: normal;
        text-align: center;
    }

.table-header .btn::before {
    content: attr(data-icon);
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-right: 0.25rem;
    display: block;
}

.table-header .btn .btn-emoji {
    display: none;
}

.table-header .btn .btn-break::before {
    content: "\A";
    white-space: pre;
    display: block;
}

.table-header .btn .btn-break {
    display: inline;
}
    
    /* Mobile card layout - optimized for touch */
    .tickets-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .ticket-card {
        padding: 1rem;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        cursor: pointer;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .ticket-card:active {
        transform: scale(0.98);
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    }
    
    .ticket-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    .ticket-info {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .priority-circle {
        align-self: flex-start;
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
        min-width: 60px;
        text-align: center;
    }

    .ticket-number {
        font-size: 1.1rem;
        margin: 0.25rem 0;
    }

    .status-badges-row {
        display: flex;
        gap: 0.5rem;
        margin-top: 0.5rem;
        flex-wrap: wrap;
    }

    .status-badge, .urgency-badge {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        border-radius: 8px;
        font-weight: 600;
    }

    /* Mobile ticket actions - larger touch targets */
    .ticket-actions {
        margin-top: 1rem;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .ticket-actions .btn {
        width: 100%;
        min-height: 48px;
        font-size: 1rem;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    /* Mobile ticket content */
    .ticket-location, .ticket-description, .ticket-submitter {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .ticket-description {
        -webkit-line-clamp: 4; /* Show more lines on mobile */
        max-height: 6rem;
    }

    /* Mobile ticket footer */
    .ticket-footer {
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
        flex-direction: column;
        gap: 1rem;
    }

    .ticket-notes-section {
        width: 100%;
    }

    .notes-btn {
        width: 100%;
        min-height: 44px;
        font-size: 1rem;
        padding: 0.75rem 1rem;
        border-radius: 8px;
    }

    /* Hide drag handle on mobile */
    .drag-handle {
        display: none;
    }

    /* Mobile table view improvements - Card-like layout */
    .tickets-table-view.view-table {
        display: block;
    }
    
    .tickets-table {
        width: 100%;
        min-width: unset;
    }
    
    /* Hide table header on mobile */
    .tickets-table thead {
        display: none;
    }
    
    /* Transform table rows into card-like layout */
    .tickets-table tbody {
        display: block;
    }
    
    .tickets-table tr {
        display: block;
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        margin-bottom: 1rem;
        padding: 1rem;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .tickets-table tr:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        transform: translateY(-2px);
    }
    
    /* Style table cells as stacked content */
    .tickets-table td {
        display: block;
        padding: 0;
        border: none;
        margin-bottom: 0.5rem;
    }
    
    .tickets-table td:last-child {
        margin-bottom: 0;
    }
    
    /* Add labels for mobile */
    .tickets-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        display: block;
        margin-bottom: 0.25rem;
    }
    
    /* Hide certain columns on mobile */
    .tickets-table .created-cell,
    .tickets-table .submitter-cell {
        display: none;
    }
    
    /* Special styling for priority cell */
    .priority-cell {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        background: #f8fafc;
        padding: 0.75rem !important;
        border-radius: 8px;
        margin-bottom: 0.75rem !important;
    }
    
    .priority-cell:before {
        display: none;
    }

    /* Mobile-specific table cell styling */
    .tickets-table .status-cell .table-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .tickets-table .status-cell .table-actions .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .tickets-table .notes-cell .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Improve description readability on mobile */
    .tickets-table .description-cell .description-text {
        line-height: 1.5;
        font-size: 0.9rem;
    }

    /* Mobile priority actions - make them more touch-friendly */
    .priority-actions {
        display: flex; /* Single row on mobile */
        gap: 0.125rem;
        justify-content: flex-start;
    }

    .move-top-btn, .move-bottom-btn,
    .move-up-btn, .move-down-btn {
        padding: 0.125rem 0.25rem;
        font-size: 0.6rem;
        min-height: 24px;
        width: 24px;
        border-radius: 3px;
        border: 1px solid var(--primary-color);
        background: var(--primary-color);
        color: white;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    }

    /* Mobile modal improvements */
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }

    .modal-large {
        width: calc(100vw - 2rem);
        max-width: none;
    }

    /* Improve search on mobile */
    .search-container {
        margin-bottom: 1rem;
    }

    .search-input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 0.75rem 1rem;
        border-radius: 8px;
        min-height: 44px;
    }
}

.ticket-info .status-badge,
.ticket-info .urgency-badge {
    font-size: 0.6rem;
    padding: 0.1rem 0.3rem;
    flex-shrink: 0;
}
	
	.ticket-info .ticket-number {
    width: 100%;
    margin-bottom: 0.25rem;
}

.ticket-info .status-badges-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: nowrap;
    width: auto;
}
    
    .ticket-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .ticket-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .ticket-notes-section {
        width: 100%;
        justify-content: flex-end;
    }
    
    .drag-handle {
        align-self: flex-start;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-card-compact {
        padding: 0.75rem;
    }
    
    .stat-icon {
        font-size: 1.25rem;
        min-width: 1.5rem;
    }
    
    .stat-number-compact {
        font-size: 1.5rem;
    }
    
    /* Mobile styles for stat badges */
    .stats-badges {
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .stat-badge {
        padding: 0.4rem 0.6rem;
        gap: 0.4rem;
    }
    
    .stat-badge .stat-icon {
        font-size: 0.875rem;
    }
    
    .stat-number {
        font-size: 1.1rem;
    }
    
    .stat-label {
        font-size: 0.625rem;
    }
    
    .stat-label-compact {
        font-size: 0.7rem;
    }
    
    .modal-large {
        width: 95%;
        max-width: none;
        margin: 1rem;
        max-height: 85vh;
    }
    
    .archived-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .archived-tickets-list {
        max-height: 400px;
    }
    
    .archived-ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .archived-ticket-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .stats-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .login-form {
        padding: 1.5rem;
    }
    
    .btn {
        width: 100%;
    }
    
    .dashboard-nav .btn {
        width: auto;
        flex: 1;
        min-width: 0;
        font-size: 0.65rem;
        padding: 0.35rem 0.6rem;
    }
    
    .dashboard-header .d-flex.align-center {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .dashboard-header .d-flex.align-center .btn {
        width: auto;
        padding: 0.4rem 0.8rem;
    }
    
    .tickets-grid {
        padding: 0.5rem;
    }
    
    .ticket-card {
        padding: 0.5rem;
    }
    
    .ticket-description {
        -webkit-line-clamp: 2;
        max-height: 2.6rem; /* Roughly 2 lines on mobile */
    }
    
    .ticket-dates {
        font-size: 0.65rem;
    }
    
    .btn-xs {
        padding: 0.2rem 0.4rem;
        font-size: 0.65rem;
    }
    
    .add-note-section {
        padding: 0.75rem;
    }
    
    .notes-list {
        max-height: 300px;
    }
    
    .public-form-card .card-body {
        padding: 1.5rem;
    }
    
    .instructions-card .card-body {
        padding: 1.5rem;
        grid-template-columns: 1fr;
    }
    
    .ticket-form input,
    .ticket-form select,
    .ticket-form textarea {
        padding: 0.875rem 1rem;
    }
    
    .modal-compact {
        width: 95%;
        max-width: none;
        margin: 1rem;
    }
    
    .password-requirements-compact {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .modal-header-compact,
    .modal-body-compact,
    .modal-footer-compact {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .archived-ticket-item {
        padding: 0.75rem;
    }
    
    .archived-ticket-description {
        font-size: 0.8rem;
    }
    
    .archived-ticket-dates {
        font-size: 0.65rem;
    }
}

/* Print Styles */
@media print {
    .ticket-actions,
    .drag-handle,
    .ticket-notes-section {
        display: none;
    }
    
    .tickets-grid {
        display: block;
    }
    
    .ticket-card {
        break-inside: avoid;
        margin-bottom: 1rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .ticket-description {
        -webkit-line-clamp: unset;
        max-height: none;
        overflow: visible;
    }
    
    .archived-ticket-item {
        break-inside: avoid;
        margin-bottom: 1rem;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .archived-ticket-actions {
        display: none;
    }
}
        .notification-email-info {
            margin-bottom: 1.5rem;
            font-size: 0.9rem;
            color: var(--text-primary);
            text-align: center;
            padding: 0.75rem;
            background-color: #f0f9ff;
            border-radius: 8px;
            border: 1px solid #bae6fd;
        }


        .notification-email-info.no-email {
            background-color: #fef2f2;
            border-color: #fecaca;
        }

/* Statistics Badges */
.stats-badges {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: default;
}

.stat-badge:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stat-badge .stat-icon {
    font-size: 1rem;
    opacity: 0.8;
}

.stat-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
}

/* Subtle color indicators */
.stat-badge.stat-total {
    border-left: 3px solid #6366f1;
}

.stat-badge.stat-open {
    border-left: 3px solid #0ea5e9;
}

.stat-badge.stat-progress {
    border-left: 3px solid #3b82f6;
}

.stat-badge.stat-completed {
    border-left: 3px solid #10b981;
}

.stat-badge.stat-archived {
    border-left: 3px solid #8b5cf6;
}



/* Snooze functionality styles */
.snooze-btn {
    background-color: var(--warning-color) !important;
    border-color: var(--warning-color) !important;
    color: white !important;
}

.snooze-btn:hover {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    transform: scale(1.05);
}

.unsnooze-btn {
    background-color: #6b7280 !important;
    border-color: #6b7280 !important;
    color: white !important;
}

.unsnooze-btn:hover {
    background-color: #4b5563 !important;
    border-color: #4b5563 !important;
}

/* Alarm clock icon styling for retro look */
.alarm-clock {
    display: inline-block;
    font-size: 0.9em;
    animation: tick 2s ease-in-out infinite alternate;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.5));
}

@keyframes tick {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}

/* Snooze badge */
.snooze-badge {
    background-color: var(--warning-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Snoozed card styling */
.ticket-card.snoozed {
    border: 2px solid var(--warning-color);
    background: linear-gradient(45deg, #fff7ed 0%, #ffffff 100%);
    opacity: 0.8;
    position: relative;
}

.ticket-card.snoozed::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--warning-color), #fbbf24);
    border-radius: 8px 8px 0 0;
}

/* Active snooze filter button */
.btn-warning.active {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Snooze Modal Styling */
.snooze-modal-content {
    text-align: center;
    padding: 1rem 0;
}

.alarm-clock-large {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: gentle-swing 3s ease-in-out infinite;
    text-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.4));
}

@keyframes gentle-swing {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.ticket-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    text-align: left;
}

.ticket-desc-preview {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.snooze-duration {
    margin-top: 1.5rem;
    text-align: center;
}

.duration-badge {
    background: linear-gradient(135deg, var(--warning-color), #fbbf24);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 0.5rem;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.snooze-duration small {
    display: block;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Modal size variation for snooze */
.modal-small {
    max-width: 400px;
}

/* Enhanced snooze button in modal */
#snooze-confirm-modal .btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #fbbf24);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.2);
}

#snooze-confirm-modal .btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(245, 158, 11, 0.3);
}

#snooze-confirm-modal .btn-warning .alarm-clock {
    margin-right: 0.5rem;
}

/* Attachment Styles */
.ticket-attachments {
    margin: 0.5rem 0;
}

.attachments-btn {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.attachments-btn:hover {
    background: #e2e8f0;
    color: var(--text-primary);
    border-color: var(--secondary-color);
}

.attachments-btn:active {
    transform: translateY(1px);
}

/* Attachments Modal */
.modal-medium {
    max-width: 600px;
}

.attachments-list {
    max-height: 400px;
    overflow-y: auto;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    background: var(--card-background);
    transition: all 0.2s ease;
}

.attachment-item:hover {
    background: #f8fafc;
    border-color: var(--secondary-color);
}

.attachment-info {
    flex: 1;
}

.attachment-name {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.attachment-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.attachment-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.loading-message, .empty-message, .error-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.error-message {
    color: var(--error-color);
}

/* File input styling for submit form */
.file-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    background: #fafbfc;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-input:hover {
    border-color: var(--primary-color);
    background: #f0f9ff;
}

.file-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.file-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.file-preview-item {
    display: inline-block;
    margin: 5px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
    vertical-align: top;
    max-width: 150px;
}

.file-preview-item img {
    max-width: 100px;
    max-height: 100px;
    display: block;
    margin: 5px 0;
    border-radius: 4px;
}

.attachments-btn-table {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.attachments-btn-table:hover {
    background: #e2e8f0;
    color: var(--text-primary);
    border-color: var(--secondary-color);
}

.attachments-cell {
    text-align: center;
}

.attachments-count {
    margin-left: 0.25rem;
}
