/* ============================================
   Buttons — Industrial weight
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1.125rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
    font-family: inherit;
    letter-spacing: 0.01em;
}

.btn:hover {
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn svg {
    width: 15px;
    height: 15px;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
    border-color: var(--primary-dark);
    box-shadow: 0 1px 2px rgba(180, 83, 9, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: #92400e;
    box-shadow: 0 2px 4px rgba(180, 83, 9, 0.3);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border-color: var(--border-color);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8), 0 1px 2px rgba(0,0,0,0.05);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--border-strong);
}

.btn-danger {
    background: var(--danger);
    color: var(--text-inverse);
    border-color: #b91c1c;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.2);
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #991b1b;
}

.btn-success {
    background: var(--success);
    color: var(--text-inverse);
    border-color: #15803d;
}

.btn-success:hover {
    background: #15803d;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}

.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.3125rem 0.625rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.625rem 1.5rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    padding: 0.4375rem;
    border-radius: var(--border-radius);
    background: var(--gray-50);
    border: 1px solid var(--border-color);
}

.btn-icon:hover {
    background: var(--gray-100);
    border-color: var(--border-strong);
}

.btn-group {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

/* ============================================
   Forms — Stronger, taller inputs
   ============================================ */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.3125rem;
    letter-spacing: 0.01em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    height: 40px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: inherit;
    box-sizing: border-box;
}

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

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.12);
}

.form-input.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
    border-color: var(--danger);
}

.form-input.is-invalid:focus,
.form-select.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    padding-right: 2.25rem;
    cursor: pointer;
}

.form-error {
    display: block;
    font-size: 0.75rem;
    color: var(--danger);
    margin-top: 0.25rem;
    font-weight: 500;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

/* ============================================
   Cards — Top-border accent stripe
   ============================================ */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-accent {
    border-top: 2px solid var(--primary);
}

.card-header {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.card-accent .card-header {
    border-radius: 0;
}

.card-header h2,
.card-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.005em;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    background: var(--gray-50);
}

/* ============================================
   Tables — Technical data-grid
   ============================================ */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.table th {
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.625rem 1rem;
    background: var(--gray-50);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    color: var(--text-primary);
    vertical-align: middle;
}

/* Alternating row stripes */
.table tbody tr:nth-child(even) td {
    background: var(--gray-50);
}

.table tbody tr:hover td {
    background: var(--primary-50);
    border-left-color: var(--primary);
}

.table tbody tr:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--primary);
}

.table tr:last-child td {
    border-bottom: none;
}

/* Monospace for numeric table cells */
.table .num,
.table .mono {
    font-family: var(--font-data);
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.table-actions {
    display: flex;
    gap: 0.375rem;
    white-space: nowrap;
}

/* Clickable rows */
.table tr[data-href] {
    cursor: pointer;
}

/* ============================================
   Alerts — Left border accent
   ============================================ */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-success {
    background: var(--success-light);
    color: #166534;
    border-color: #bbf7d0;
    border-left-color: var(--success);
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border-color: #fecaca;
    border-left-color: var(--danger);
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border-color: #fde68a;
    border-left-color: var(--warning);
}

.alert-info {
    background: var(--info-light);
    color: #115e59;
    border-color: #99f6e4;
    border-left-color: var(--info);
}

.alert .alert-dismiss {
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 0.25rem;
    font-size: 1.125rem;
    line-height: 1;
}

.alert .alert-dismiss:hover {
    opacity: 1;
}

/* ============================================
   Badges / Status — Bolder
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1875rem 0.5rem;
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: var(--border-radius-sm);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-dark);
}

.badge-success {
    background: var(--success-light);
    color: #166534;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}

.badge-danger {
    background: var(--danger-light);
    color: #991b1b;
}

.badge-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.badge-info {
    background: var(--info-light);
    color: #115e59;
}

/* ============================================
   Stats Cards (Dashboard) — Larger values
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 2px solid transparent;
    transition: border-color var(--transition);
}

.stat-card:hover {
    border-bottom-color: var(--primary);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.stat-icon.green {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.orange {
    background: var(--primary-100);
    color: var(--primary);
}

.stat-icon.purple {
    background: #f3e8ff;
    color: #7c3aed;
}

.stat-icon.teal {
    background: var(--info-light);
    color: var(--info);
}

.stat-info h3 {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-data);
    line-height: 1.1;
}

/* ============================================
   Tabs — Bottom border, amber active
   ============================================ */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-link {
    padding: 0.625rem 1.125rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: all var(--transition);
}

.tab-link:hover {
    color: var(--text-primary);
    text-decoration: none;
}

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

/* ============================================
   Toast Notifications — Left color stripe
   ============================================ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.875rem 1.125rem;
    min-width: 300px;
    max-width: 450px;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-danger { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }

.toast.leaving {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

/* ============================================
   Empty State — Larger icons
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state svg {
    width: 56px;
    height: 56px;
    color: var(--gray-300);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Detail / Show Page
   ============================================ */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.detail-item {
    margin-bottom: 0.75rem;
}

.detail-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.detail-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
}

.detail-value.mono {
    font-family: var(--font-data);
    font-size: 0.8125rem;
}

/* ============================================
   Miscellaneous
   ============================================ */
.link-small {
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

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

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

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Confirm delete dialog */
.confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.confirm-dialog {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    border-top: 3px solid var(--danger);
}

.confirm-dialog h3 {
    margin: 0 0 0.5rem;
    font-size: 1.0625rem;
}

.confirm-dialog p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 1.5rem;
}

.confirm-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

/* Search bar enhancement */
.search-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.search-bar .form-input {
    max-width: 320px;
}

/* Dropdown menus */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 50;
    min-width: 180px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 0.25rem 0;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background var(--transition);
}

.dropdown-item:hover {
    background: var(--gray-50);
    text-decoration: none;
}

.dropdown-item svg {
    width: 15px;
    height: 15px;
    color: var(--text-secondary);
}

.dropdown-divider {
    border-top: 1px solid var(--border-color);
    margin: 0.25rem 0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal {
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 560px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    background: var(--gray-50);
}

/* ============================================
   Two-Column Grid
   ============================================ */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.grid-1-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .grid-2,
    .grid-1-2 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Notification List
   ============================================ */
.notification-list {
    display: flex;
    flex-direction: column;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: background var(--transition);
}

.notification-item:hover {
    background: var(--gray-50);
}

.notification-item.unread {
    background: color-mix(in srgb, var(--primary) 5%, white);
}

.notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 50%;
    color: var(--text-secondary);
}

.notification-item.unread .notification-icon {
    background: color-mix(in srgb, var(--primary) 15%, white);
    color: var(--primary);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.notification-message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.notification-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 0.5rem;
}

/* ============================================
   Key-Value Table (detail tables)
   ============================================ */
.kv-table {
    width: 100%;
    font-size: 0.875rem;
}

.kv-table td {
    padding: 0.375rem 0;
}

.kv-table td:first-child {
    color: var(--text-secondary);
    width: 40%;
}

/* ============================================
   Seat / Progress Bar
   ============================================ */
.progress-box {
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
}

.progress-track {
    background: var(--gray-200);
    border-radius: var(--border-radius-sm);
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--border-radius-sm);
    transition: width 0.3s;
}

/* ============================================
   Info Box / Callout
   ============================================ */
.callout {
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.callout-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.callout-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.callout-warning {
    background: #fef3c7;
    border: 1px solid #fde68a;
}

.callout-purple {
    background: #f5f3ff;
    border: 1px solid #c4b5fd;
}

/* ============================================
   Price Display
   ============================================ */
.price-big {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    font-family: var(--font-data);
}

.price-sub {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.price-summary {
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
}

/* Feature list with checkmarks */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 2;
}

.feature-list svg {
    vertical-align: middle;
    margin-right: 0.25rem;
}

/* ============================================
   Collapsible Sections — <details>/<summary>
   ============================================ */
details.collapsible-section {
    border-top: 1px solid var(--border-color);
    margin-top: 0.75rem;
    padding-top: 0;
}

details.collapsible-section > summary {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.625rem 0;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

details.collapsible-section > summary::-webkit-details-marker { display: none; }

details.collapsible-section > summary::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid var(--text-muted);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

details.collapsible-section[open] > summary::before {
    transform: rotate(90deg);
}

details.collapsible-section > summary:hover {
    color: var(--primary);
}

details.collapsible-section > summary:hover::before {
    border-left-color: var(--primary);
}

details.collapsible-section > .collapsible-content {
    padding: 0.5rem 0 0.25rem 0.75rem;
    border-left: 2px solid var(--gray-200);
    margin-left: 2px;
}
