/* TEMS Admin Panel - Shared Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
}

/* Header */
.header {
    background: white;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    text-decoration: none;
}

.theater-name {
    color: #888;
    font-size: 14px;
    font-weight: 400;
    padding-left: 15px;
    border-left: 2px solid #e0e0e0;
}

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

.user-name {
    color: #333;
    font-weight: 500;
}

.btn-logout {
    background: #f44336;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

/* Layout */
.layout {
    display: flex;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #e0e0e0;
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    overflow-y: auto;
}

.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 30px;
}

/* Sidebar Navigation */
.nav-item {
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    display: block;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #f5f5f5;
    color: #667eea;
}

.nav-item.active {
    background: #f0f0ff;
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 600;
}

.nav-section {
    padding: 20px 20px 10px;
    font-size: 12px;
    text-transform: uppercase;
    color: #999;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Common Components */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 32px;
    color: #333;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

/* Buttons */
.btn {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #999;
}

.btn-secondary:hover {
    background: #777;
}

.btn-danger {
    background: #f44336;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-group {
    display: flex;
    gap: 10px;
}

/* Alerts */
.alert {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
}

table tr:hover {
    background: #f9f9f9;
}

/* Badges */
.badge,
.status-badge,
.ticket-status,
.show-status,
.seat-badge,
.contact-type-badge,
.event-type-badge,
.event-type,
.perf-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Status badges */
.status-active { background: #e8f5e9; color: #2e7d32; }
.status-inactive { background: #ffebee; color: #c62828; }
.status-paid { background: #e8f5e9; color: #2e7d32; }
.status-reserved { background: #fff3e0; color: #f57c00; }
.status-used { background: #e0e0e0; color: #666; }
.status-cancelled { background: #ffebee; color: #c62828; }

/* Role badges */
.role-admin { background: #f3e5f5; color: #7b1fa2; }
.role-staff { background: #e3f2fd; color: #1976d2; }
.role-volunteer { background: #e8f5e9; color: #388e3c; }
.role-customer { background: #fff3e0; color: #f57c00; }

/* Utility */
.back-link {
    display: inline-block;
    color: #667eea;
    text-decoration: none;
    margin-bottom: 20px;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

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

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.stat-card .number,
.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
    display: block;
}

.stat-card .label,
.stat-card .stat-label {
    color: #666;
    font-size: 14px;
    display: block;
}

/* Search/Filter Bars */
.search-bar,
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-bar input,
.filter-bar input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.search-bar select,
.filter-bar select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

/* ============================================
   PAGE-SPECIFIC STYLES
   ============================================ */

/* Login Page */
.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 100%;
    padding: 40px;
}

.login-container .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-container .logo h1 {
    color: #667eea;
    font-size: 36px;
    margin-bottom: 5px;
}

.login-container .logo p {
    color: #666;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.remember-me input {
    margin-right: 8px;
}

body.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Dashboard Page */
.event-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.event-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.event-date {
    color: #666;
    font-size: 14px;
}

.event-type {
    margin-left: 10px;
}

.type-show { background: #e3f2fd; color: #1976d2; }
.type-rehearsal { background: #f3e5f5; color: #7b1fa2; }
.type-audition { background: #fff3e0; color: #f57c00; }
.type-workshop { background: #e8f5e9; color: #388e3c; }
.type-volunteer { background: #fce4ec; color: #c2185b; }
.type-fundraiser { background: #fff9c4; color: #f57f17; }
.type-other { background: #e0e0e0; color: #616161; }

.show-status {
    margin-left: 10px;
}

.status-planning { background: #e0e0e0; color: #666; }
.status-auditions { background: #fff3e0; color: #f57c00; }
.status-rehearsal { background: #f3e5f5; color: #7b1fa2; }
.status-running { background: #e8f5e9; color: #388e3c; }
.status-closed { background: #ffebee; color: #c62828; }
.status-reserved { background: #fff3e0; color: #f57c00; }
.status-used { background: #e0e0e0; color: #666; }
.status-succeeded { background: #e8f5e9; color: #2e7d32; }
.status-pending { background: #fff3e0; color: #f57c00; }
.status-processing { background: #e3f2fd; color: #1976d2; }
.status-failed { background: #ffebee; color: #c62828; }
.status-refunded { background: #e0e0e0; color: #666; }

/* Settings Page */
.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    color: #666;
    font-weight: 500;
}

.info-row .value {
    color: #333;
}

.info-box {
    background: #f0f0ff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-box h3 {
    color: #667eea;
    margin-bottom: 10px;
}

.info-box p {
    color: #666;
    line-height: 1.6;
}

.tabs-container {
    margin-bottom: 20px;
}

.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 20px;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
    margin-bottom: -2px;
}

.tab-button:hover {
    color: #667eea;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

.tab-content {
    display: none;
}

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

/* Contacts Page */
.contacts-table {
    width: 100%;
    border-collapse: collapse;
}

.contacts-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.contacts-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.contacts-table tr:hover {
    background: #f9f9f9;
}

.contact-name {
    font-weight: 600;
    color: #333;
}

.contact-type-badge {
    font-size: 11px;
    margin: 2px;
}

.type-donor { background: #fff9c4; color: #f57f17; }
.type-volunteer { background: #fce4ec; color: #c2185b; }
.type-cast { background: #f3e5f5; color: #7b1fa2; }
.type-crew { background: #e1bee7; color: #6a1b9a; }
.type-student { background: #e8f5e9; color: #388e3c; }
.type-subscriber { background: #e3f2fd; color: #1976d2; }

.contact-detail {
    margin-bottom: 15px;
}

.contact-detail strong {
    display: inline-block;
    width: 150px;
    color: #666;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.purchase-history {
    margin-top: 30px;
}

.purchase-history h3 {
    color: #333;
    margin-bottom: 15px;
}

/* Users Page */
.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.users-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* Calendar Page */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.view-toggle {
    display: flex;
    gap: 5px;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 4px;
}

.view-toggle a {
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: all 0.2s;
}

.view-toggle a.active {
    background: #667eea;
    color: white;
}

.view-toggle a:hover:not(.active) {
    background: #e0e0e0;
}

.date-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.date-navigation .current-date {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    min-width: 200px;
    text-align: center;
}

.nav-btn {
    background: #f5f5f5;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    font-weight: 600;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: #667eea;
    color: white;
}

.calendar-grid {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #667eea;
    color: white;
}

.calendar-header-day {
    padding: 15px;
    text-align: center;
    font-weight: 600;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
}

.calendar-day {
    background: white;
    min-height: 120px;
    padding: 8px;
    position: relative;
}

.calendar-day.other-month {
    background: #f9f9f9;
    opacity: 0.5;
}

.calendar-day.today {
    background: #fff3e0;
}

.day-number {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.calendar-day.other-month .day-number {
    color: #999;
}

.calendar-day.today .day-number {
    display: inline-block;
    background: #ff9800;
    color: white;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    border-radius: 50%;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.day-event {
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.1s;
    text-decoration: none;
    color: inherit;
    display: block;
    overflow-wrap: break-word;
    word-wrap: break-word;
    line-height: 1.3;
}

.day-event:hover {
    transform: translateX(2px);
}

.agenda-view {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 30px;
}

.agenda-date-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.agenda-date-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 5px;
}

.agenda-date-header .day-name {
    font-size: 16px;
    color: #666;
}

.event-list {
    list-style: none;
}

.event-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.event-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 5px;
}

/* Event type badge - uses common badge styles from line 308 */

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

/* Box Office Page */
.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
}

.orders-table td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.order-detail {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.order-detail strong {
    display: inline-block;
    width: 150px;
    color: #666;
}

.tickets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.ticket-card {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.ticket-card.cancelled {
    opacity: 0.5;
    border-color: #ffcdd2;
    background: #ffebee;
}

/* Ticketing Page */
.performance-item {
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: border-color 0.3s;
}

.performance-item:hover {
    border-color: #667eea;
}

.perf-info h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.perf-meta {
    color: #666;
    font-size: 14px;
}

.tickets-stat {
    text-align: right;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.tickets-table th {
    background: #f5f5f5;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.tickets-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* Ticket status - uses common badge styles from line 308 */

.seats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.seat-checkbox {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.seat-checkbox:hover {
    background: #e8f5e9;
}

.seat-checkbox input {
    margin-right: 8px;
    width: 18px;
    height: 18px;
}

#contact_search {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

#contact_search:focus {
    outline: none;
    border-color: #667eea;
}

/* Seat Types Page */
.seat-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.seat-type-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    border-left: 5px solid #ccc;
    transition: transform 0.2s, box-shadow 0.2s;
}

.seat-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.seat-type-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.seat-type-name {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.seat-type-identifier {
    font-size: 12px;
    color: #999;
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

.seat-type-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.seat-type-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    color: #666;
}

.seat-type-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-input-group input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
}

/* Check-in Page */
.check-in-container {
    max-width: 1200px;
    margin: 0 auto;
}

.scan-modes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.scan-mode {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
}

.scan-mode h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

.camera-select {
    margin-bottom: 20px;
}

.camera-select select {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.camera-select select:focus {
    outline: none;
    border-color: #667eea;
}

#scanner-status {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
}

#scanner-status.scanning {
    background: #e3f2fd;
    color: #1976d2;
}

#scanner-status.success {
    background: #e8f5e9;
    color: #2e7d32;
}

#scanner-status.error {
    background: #ffebee;
    color: #c62828;
}

#scanner-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

#scanner-video {
    width: 100%;
    height: auto;
    display: block;
}

.scanner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    border: 3px solid #4caf50;
    border-radius: 10px;
    pointer-events: none;
}

.scanner-corner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid #4caf50;
}

.scanner-corner.top-left {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
}

.scanner-corner.top-right {
    top: -2px;
    right: -2px;
    border-left: none;
    border-bottom: none;
}

.scanner-corner.bottom-left {
    bottom: -2px;
    left: -2px;
    border-right: none;
    border-top: none;
}

.scanner-corner.bottom-right {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
}

.btn-large {
    padding: 15px 40px;
    font-size: 18px;
}

.btn-success {
    background: #4caf50;
}

.btn-success:hover {
    background: #45a049;
}

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

#search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 15px;
}

.search-result-item:hover {
    background: #f0f0ff;
}

.search-result-item:last-child {
    border-bottom: none;
}

.ticket-info-display {
    text-align: left;
}

.ticket-info-display .ticket-number {
    font-weight: 700;
    font-size: 14px;
    color: #667eea;
    font-family: 'Courier New', monospace;
}

.ticket-info-display .show-title {
    font-weight: 600;
    color: #333;
    margin: 5px 0;
}

.ticket-info-display .customer-name {
    color: #666;
    font-size: 14px;
}

.alert-warning {
    background: #fff3e0;
    color: #f57c00;
    border: 2px solid #ff9800;
}

.ticket-details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.ticket-details-modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #666;
    font-weight: 500;
}

.detail-value {
    color: #333;
    font-weight: 600;
    text-align: right;
}

.check-in-option {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
}

.check-in-option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.check-in-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.check-in-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.order-ticket-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: white;
    border-radius: 4px;
    margin-bottom: 6px;
}

.ticket-seat {
    font-weight: 600;
    color: #333;
}

.ticket-status-small {
    font-size: 10px;
    padding: 3px 8px;
}

/* Visual Seat Select Page */
.seat-selection-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    height: calc(100vh - 180px);
}

.map-viewer {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    padding: 0;
}

.viewport-container {
    width: 100%;
    height: 100%;
    overflow: auto;
    position: relative;
    cursor: grab;
}

.viewport-container:active {
    cursor: grabbing;
}

.seats-map-container {
    position: relative;
    transform-origin: 0 0;
    transition: transform 0.1s ease-out;
}

.zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.zoom-btn {
    width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.zoom-btn:hover {
    background: #5568d3;
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-level {
    font-size: 12px;
    text-align: center;
    color: #666;
    font-weight: 600;
}

.stage-display {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    z-index: 1;
}

.seat-display {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.seat-display:hover:not(.sold):not(.reserved) {
    transform: scale(1.15);
    z-index: 10;
}

.seat-display.available {
    background: #4caf50;
}

.seat-display.selected {
    background: #667eea;
    transform: scale(1.1);
}

.seat-display.sold {
    background: #f44336;
    cursor: not-allowed;
    opacity: 0.6;
}

.seat-display.premium.available {
    background: #ffa726;
}

.seat-display.accessible.available {
    background: #29b6f6;
}

.seat-label {
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
}

.selection-panel {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.selection-panel h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.performance-info {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.performance-info h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}

.performance-info p {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.legend {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.legend h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.selected-seats {
    margin-bottom: 20px;
}

.selected-seats h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.selected-seat-item {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-seat-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
}

.customer-search {
    margin-bottom: 20px;
}

/* Print Tickets Page */
.no-print {
    text-align: center;
    margin-bottom: 20px;
}

.print-btn {
    background: #667eea;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-right: 10px;
}

.print-btn:hover {
    background: #5568d3;
}

.back-btn {
    background: #999;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.back-btn:hover {
    background: #777;
}

.ticket {
    background: white;
    width: 8.5in;
    margin: 0 auto 20px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    page-break-after: always;
    position: relative;
    border: 2px solid #333;
}

.ticket:last-child {
    margin-bottom: 0;
}

.ticket-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-bottom: 3px dashed #333;
}

.ticket-header .theater-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.ticket-number {
    font-size: 14px;
    opacity: 0.9;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.ticket-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    padding: 30px;
}

.ticket-info {
    flex: 1;
}

.show-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.2;
}

.info-label {
    font-weight: 600;
    color: #666;
}

.info-value {
    color: #333;
    font-weight: 500;
}

.seat-info {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid #e0e0e0;
}

.seat-value {
    font-size: 48px;
    font-weight: 700;
    color: #667eea;
    line-height: 1;
}

.qr-section {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

.qr-code {
    width: 200px;
    height: 200px;
    margin: 0 auto 10px;
}

.qr-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ticket-footer {
    padding: 15px 30px;
    background: #f5f5f5;
    border-top: 3px dashed #333;
    font-size: 11px;
    color: #666;
    text-align: center;
}

.price-paid {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* Seat Map Builder Page */
.seat-map-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    height: calc(100vh - 140px);
}

.seat-map-container .zoom-controls {
    position: fixed;
    top: 140px;
    right: 40px;
}

.seat-map-container .zoom-controls button {
    width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.seat-map-container .zoom-controls button:hover {
    background: #5568d3;
}

.seat-map-container .zoom-controls button:active {
    transform: scale(0.95);
}

.seat-controls {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow-y: auto;
}

.seat-controls h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.control-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.control-section:last-child {
    border-bottom: none;
}

.control-section .btn {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    text-align: center;
}

.control-section .btn:last-of-type {
    margin-bottom: 0;
}

.section-filter {
    margin-bottom: 15px;
}

.section-filter select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.seat-list {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
}

.seat-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.seat-item:hover {
    background: #e8f5e9;
}

.seat-item.positioned {
    background: #e3f2fd;
}

.map-canvas {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: relative;
    overflow: auto;
    height: 100%;
    cursor: grab;
}

.map-canvas:active {
    cursor: grabbing;
}

.stage-area {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    z-index: 1;
}

.seat-on-map {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: move;
    font-size: 11px;
    font-weight: 600;
    color: white;
    transition: transform 0.2s;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.seat-on-map:hover {
    transform: scale(1.1);
    z-index: 10;
}

.seat-on-map.dragging {
    opacity: 0.5;
    z-index: 100;
}

.seat-on-map.selected {
    outline: 3px solid #667eea;
    outline-offset: 2px;
    z-index: 5;
}

.grid-toggle {
    margin-top: 10px;
}

.grid-toggle label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    cursor: pointer;
}

.canvas-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 24px, #e0e0e0 24px, #e0e0e0 25px),
        repeating-linear-gradient(90deg, transparent, transparent 24px, #e0e0e0 24px, #e0e0e0 25px);
    pointer-events: none;
    display: none;
}

.canvas-grid.active {
    display: block;
}

.stats {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.stats div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 13px;
}

.stats div:last-child {
    margin-bottom: 0;
}

.lasso-selection {
    position: absolute;
    border: 2px dashed #667eea;
    background: rgba(102, 126, 234, 0.1);
    pointer-events: none;
    z-index: 1000;
}

.mode-indicator {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #667eea;
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    z-index: 10;
    display: none;
}

.mode-indicator.active {
    display: block;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.file-input-wrapper {
    margin: 20px 0;
}

.file-input-wrapper input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 2px dashed #667eea;
    border-radius: 6px;
    background: #f8f9fa;
    cursor: pointer;
}

.select-wrapper {
    margin: 20px 0;
}

.select-wrapper label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.select-wrapper select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

.btn-cancel {
    background: #e0e0e0;
    color: #333;
}

.btn-cancel:hover {
    background: #d0d0d0;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.warning-box strong {
    color: #856404;
    display: block;
    margin-bottom: 5px;
}

.warning-box p {
    color: #856404;
    margin: 0;
}

/* Shows Page */
.shows-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.show-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.show-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.show-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.show-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.show-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 15px;
}

.show-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.show-detail {
    margin-bottom: 15px;
}

.show-detail strong {
    display: inline-block;
    width: 150px;
    color: #666;
}

.performances-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.perf-datetime {
    font-weight: 600;
    color: #333;
}

.perf-status {
    margin-left: 10px;
}

.status-unpublished { background: #e0e0e0; color: #666; }
.status-on-sale { background: #e8f5e9; color: #388e3c; }
.status-sold-out { background: #fff3e0; color: #f57c00; }

/* Seats Page - .seat-badge uses common badge styles from line 308 */

.type-standard { background: #e3f2fd; color: #1976d2; }
.type-premium { background: #fff3e0; color: #f57c00; }
.type-accessible { background: #e8f5e9; color: #388e3c; }
.type-obstructed { background: #ffebee; color: #c62828; }

.bulk-actions-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
}

.bulk-actions-bar span {
    color: #495057;
}

.seats-table th input[type="checkbox"],
.seats-table td input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    margin: 0;
}

.seats-table th {
    vertical-align: middle;
}

/* Responsive Header/Sidebar */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    color: #333;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* ============================================
   RESPONSIVE STYLES
   ============================================ */

@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
        min-width: 44px;
        min-height: 44px;
    }

    .header .theater-name {
        display: none !important;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 60px;
        bottom: 0;
        width: 250px;
        background: white;
        z-index: 101;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
        transition: none;
    }

    .calendar-controls {
        flex-direction: column;
        gap: 15px;
    }

    .calendar-day {
        min-height: 80px;
        padding: 5px;
    }

    .day-event {
        font-size: 10px;
        padding: 2px 4px;
    }

    .event-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .seat-selection-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .selection-panel {
        order: 1;
    }

    .map-viewer {
        order: 2;
        height: 500px;
    }

    /* Check-in page mobile */
    .scan-modes {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .scan-mode {
        padding: 20px;
    }

    .scan-mode h2 {
        font-size: 20px;
    }

    .camera-select select {
        font-size: 16px;
        padding: 14px;
    }

    #scanner-container {
        max-width: 100%;
    }

    .check-in-container {
        padding: 0;
    }

    .modal-content {
        padding: 20px;
        width: 95%;
    }

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

    .detail-row {
        flex-direction: column;
        gap: 5px;
    }

    .detail-value {
        text-align: left;
    }

    .check-in-actions {
        flex-direction: column;
    }

    .check-in-actions .btn {
        width: 100%;
    }
}

@media print {
    body {
        background: white;
        padding: 0;
    }

    .no-print {
        display: none !important;
    }

    .ticket {
        box-shadow: none;
        margin: 0;
        page-break-after: always;
        width: 100%;
    }

    .ticket:last-child {
        page-break-after: auto;
    }
}

@page {
    size: letter;
    margin: 0.5in;
}