/* Common styles like .page-container, .page-header-bar, .stats-grid, .breadcrumbs,
   .truncated-id, .btn-*, .badge, .stat-card-small, .stat-label, .stat-value-small,
   .stat-success, .stat-warning, .stat-info are in portal-common.css */

/* ==========================================
   Account Selector
   ========================================== */

.account-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: var(--dark-bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.account-selector label {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.account-select {
    flex: 1;
    max-width: 400px;
    padding: 10px 15px;
    font-size: 1rem;
    border: 2px solid var(--dark-3);
    border-radius: 8px;
    background: var(--dark-1);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.account-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(34, 199, 224, 0.1);
}

.account-select option {
    background: var(--dark-1);
    color: var(--text-primary);
}



/* ==========================================
   Filter Tabs
   ========================================== */

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 10px 20px;
    font-size: var(--font-size-small, 0.875rem);
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--dark-bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-tab.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

/* ==========================================
   Support View Toggle
   ========================================== */

.support-view-toggle {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    display: inline-flex;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

/* Brand cyan, not the #3b82f6 that matched nothing else in the portal. */
.toggle-label input:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle-label input:checked + .toggle-slider::after {
    left: 23px;
}

.toggle-text {
    font-size: var(--font-size-small, 0.875rem);
    font-weight: 600;
    color: var(--text-primary);
}

/* ==========================================
   Request Type Badges
   ========================================== */

/* Request-type badges lived here: .badge-type plus seven colour modifiers. Types are
   classifications and now render as the shared neutral .type-tag (css/portal-common.css).
   Three of the seven — Billing green, Reactivation amber, Bug Report red — were status
   tones, sitting one cell away from an actual status. */

/* ==========================================
   Priority Badges
   ========================================== */

.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-low {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.priority-normal {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.priority-high {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.priority-urgent {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* ==========================================
   Request Number
   ========================================== */

.request-number {
    font-family: 'Courier New', monospace;
    font-size: var(--font-size-small, 0.875rem);
    font-weight: 600;
    color: var(--primary-color);
}

/* ==========================================
   Subject with Type
   ========================================== */

.subject-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.subject-text {
    font-weight: 500;
    color: var(--text-primary);
}

.subject-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 968px) {
    .account-selector {
        flex-direction: column;
        align-items: flex-start;
    }

    .account-select {
        width: 100%;
        max-width: none;
    }

    .filter-tabs {
        overflow-x: auto;
        padding-bottom: 10px;
        flex-wrap: nowrap;
    }

    .filter-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}
