/* Merchant Recon for KEV Group - Reconciliation Portal
   Theme: White background with blue accent (KEV Group brand)
*/

:root {
    /* Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #eff5f9;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-coral: #66b0ff;
    --accent-coral-hover: #4d97e4;
    --accent-coral-light: rgba(102, 176, 255, 0.1);
    --accent-blue: #66b0ff;
    --accent-blue-hover: #4d97e4;
    --accent-blue-light: rgba(102, 176, 255, 0.1);
    --accent-teal: #00bac7;
    --accent-teal-hover: #04a6b1;
    --success: #22c55e;
    --success-light: rgba(34, 197, 94, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Borders */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent-coral);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-coral-hover);
}

/* ===== Layout ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding: 32px 0;
}

/* ===== Header / Navbar ===== */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
}

.nav-logo:hover {
    color: var(--text-primary);
}

.logo-icon {
    height: 28px;
    width: 28px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text-main {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-text-sub {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-user-dropdown {
    position: relative;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.nav-user-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.nav-user-btn.active {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.nav-user-chevron {
    color: var(--text-muted);
    transition: transform 0.2s ease;
}

.nav-user-btn.active .nav-user-chevron {
    transform: rotate(180deg);
}

.nav-user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.nav-user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.nav-user-org {
    font-size: 12px;
    color: var(--text-muted);
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 200;
}

.nav-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-section {
    padding: 12px;
}

.nav-dropdown-header {
    padding: 4px 8px;
}

.nav-dropdown-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-dropdown-user-email {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.nav-dropdown-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 8px 8px;
}

.nav-dropdown-team {
    max-height: 200px;
    overflow-y: auto;
}

.nav-dropdown-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
}

.nav-dropdown-member:hover {
    background: var(--bg-secondary);
}

.nav-dropdown-avatar {
    width: 28px;
    height: 28px;
    background: var(--accent-coral-light);
    color: var(--accent-coral);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.nav-dropdown-member-info {
    flex: 1;
    min-width: 0;
}

.nav-dropdown-member-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-dropdown-member-email {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 0;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.nav-dropdown-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-dropdown-logout:hover {
    color: var(--accent-coral);
}

.nav-dropdown-upgrade {
    color: var(--accent-coral);
    font-weight: 500;
}

.nav-dropdown-upgrade:hover {
    background: var(--accent-coral-light);
    color: var(--accent-coral);
}

.nav-dropdown-loading {
    padding: 12px 8px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.nav-dropdown-empty {
    padding: 12px 8px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

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

.btn-primary {
    background-color: var(--accent-coral);
    color: white;
    box-shadow: 0 2px 8px rgba(252, 99, 115, 0.25);
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--accent-coral-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(252, 99, 115, 0.35);
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--border-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--text-secondary);
    background-color: var(--bg-secondary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.btn-icon {
    padding: 8px;
    border-radius: var(--radius-sm);
}

/* ===== Cards ===== */
.card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

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

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-coral);
    box-shadow: 0 0 0 3px var(--accent-coral-light);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

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

.form-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ===== Status Badges ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-pending {
    background-color: var(--warning-light);
    color: var(--warning);
}

.status-submitted {
    background-color: var(--accent-coral-light);
    color: var(--accent-coral);
}

.status-reviewed {
    background-color: var(--success-light);
    color: var(--success);
}

.status-cancelled {
    background-color: #fef2f2;
    color: #ef4444;
}

.status-expired {
    background-color: #f5f5f5;
    color: #737373;
}

.status-in_progress {
    background-color: #dbeafe;
    color: #1d4ed8;
}

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

.status-review {
    background-color: #e0e7ff;
    color: #4338ca;
}

.status-resolved {
    background-color: var(--success-light);
    color: var(--success);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

/* ===== Tables ===== */
.table-container {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--bg-secondary);
}

.table tr:hover td {
    background-color: var(--bg-secondary);
}

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

.table-link:hover {
    color: var(--accent-coral);
}

/* ===== Page Header ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.credits-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.credits-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
}

.credits-upgrade-link {
    font-size: 11px;
    color: var(--accent-coral);
    text-decoration: none;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.credits-upgrade-link:hover {
    background: var(--accent-coral-light);
    color: var(--accent-coral);
}

.credits-count {
    font-weight: 600;
    color: var(--text-primary);
}

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

.credits-plan {
    color: var(--text-muted);
    font-size: 11px;
    padding-left: 8px;
    border-left: 1px solid var(--border-color);
}

.credits-reset {
    color: var(--text-muted);
    font-size: 11px;
    padding-left: 8px;
    border-left: 1px solid var(--border-color);
}

.credits-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
}

.credits-badge-inline {
    color: var(--text-secondary);
}

.credits-badge-inline span:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

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

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

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

.page-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    padding: 6px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    width: fit-content;
}

.tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.tab.active {
    color: var(--text-primary);
    background-color: var(--bg-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.filter-group label {
    color: var(--text-muted);
    white-space: nowrap;
}

.filter-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 8px 32px 8px 12px;
    font-size: 13px;
    font-family: var(--font-family);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    min-width: 140px;
}

.filter-group select:hover {
    border-color: var(--text-muted);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-coral);
    box-shadow: 0 0 0 3px var(--accent-coral-light);
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

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

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: left;
    font-family: inherit;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-coral);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    border-color: var(--accent-coral);
    box-shadow: 0 4px 12px rgba(252, 99, 115, 0.15);
    transform: translateY(-2px);
}

.stat-card:hover::before {
    transform: scaleY(1);
}

.stat-card.active {
    border-color: var(--accent-coral);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--accent-coral-light) 100%);
    box-shadow: 0 4px 16px rgba(252, 99, 115, 0.2);
}

.stat-card.active::before {
    transform: scaleY(1);
}

.stat-card.active .stat-icon {
    background: var(--accent-coral);
    color: white;
}

.stat-icon {
    width: 52px;
    height: 52px;
    background: var(--accent-coral-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-coral);
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-arrow {
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.2s ease;
}

.stat-card:hover .stat-arrow {
    opacity: 1;
    transform: translateX(0);
}

.stat-card.active .stat-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent-coral);
}

/* ===== Request Cards ===== */
.requests-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Request Table Row */
.request-row {
    display: grid;
    grid-template-columns: 1fr 100px 110px 130px 150px;
    align-items: center;
    gap: 12px;
    background: var(--bg-primary);
    padding: 14px 20px;
    text-decoration: none;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--border-light);
}

.request-row:hover {
    background: var(--bg-secondary);
}

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

.request-col {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    min-width: 0;
}

.request-col svg {
    opacity: 0.5;
    flex-shrink: 0;
}

.request-col-name {
    gap: 10px;
}

.request-col-status {
    justify-content: flex-start;
}

.request-col-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-col-activity {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-business {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.request-business::before {
    content: "•";
    margin-right: 8px;
    color: var(--border-color);
}

/* Status badge in row */
.request-row .status-badge {
    padding: 4px 10px;
    font-size: 10px;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .request-row {
        grid-template-columns: 1fr 90px 100px;
    }
    .request-col-meta:nth-child(3),
    .request-col-activity {
        display: none;
    }
}

@media (max-width: 600px) {
    .request-row {
        grid-template-columns: 1fr 80px;
    }
    .request-col-meta {
        display: none;
    }
}

/* ===== Pagination ===== */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding: 12px 0;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-muted);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--accent-coral);
    color: var(--accent-coral);
}

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

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.pagination-page:hover {
    background: var(--bg-tertiary);
}

.pagination-page.active {
    background: var(--accent-coral);
    color: white;
}

.page-size-select {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    padding-left: 16px;
    border-left: 1px solid var(--border-color);
}

.page-size-select label {
    font-size: 13px;
    color: var(--text-muted);
}

.page-size-select select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    font-family: var(--font-family);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.page-size-select select:hover {
    border-color: var(--text-muted);
}

.page-size-select select:focus {
    outline: none;
    border-color: var(--accent-coral);
    box-shadow: 0 0 0 3px var(--accent-coral-light);
}

/* ===== Detail Page ===== */
.detail-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detail-list {
    display: flex;
    flex-direction: column;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

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

.detail-label {
    font-size: 13px;
    color: var(--text-muted);
}

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

.link-box {
    background: var(--bg-secondary);
    padding: 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    word-break: break-all;
    color: var(--text-secondary);
    font-family: monospace;
}

.instructions-content {
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ===== Loading State ===== */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    text-align: center;
}

.loading-state .spinner {
    margin-bottom: 16px;
}

.loading-state p {
    font-size: 14px;
    color: var(--text-muted);
}

.error-state {
    text-align: center;
    padding: 48px;
    color: var(--accent-coral);
}

/* ===== Dashboard ===== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.dashboard-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.filter-btn.active {
    color: var(--accent-coral);
    background-color: var(--accent-coral-light);
    border-color: transparent;
}

/* ===== Request Detail ===== */
.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.header-actions-divider {
    width: 1px;
    height: 20px;
    background-color: var(--border-color);
    margin: 0 4px;
}

.detail-info h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.detail-meta {
    font-size: 14px;
    color: var(--text-secondary);
}

.detail-grid {
    display: grid;
    grid-template-columns: calc(55% - 12px) calc(45% - 12px);
    gap: 24px;
}

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

/* Video Player */
.video-container {
    background-color: var(--text-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.video-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Event Log / Timeline */
.event-log {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 16px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

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

.event-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.event-icon svg {
    width: 12px;
    height: 12px;
    color: var(--text-secondary);
}

.event-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}

.event-type {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.event-actor {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.event-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}

.card-section {
    padding: 0;
}

/* ===== Login Page ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.auth-logo {
    margin-bottom: 32px;
}

.auth-logo img {
    height: 40px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.auth-btn {
    width: 100%;
}

/* ===== Applicant Verify Page ===== */
.verify-page {
    min-height: 100vh;
    background-color: var(--bg-secondary);
}

.verify-header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    text-align: center;
}

.verify-content {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 24px;
}

.verify-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
}

.verify-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    text-align: center;
}

.instructions-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
}

.instructions-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.instructions-text {
    white-space: pre-wrap;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.tips-list {
    list-style: none;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.tips-list li::before {
    content: "•";
    color: var(--accent-coral);
    font-weight: bold;
}

/* Recording Interface */
.recorder-container {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.recorder-preview {
    background-color: #000;
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.recorder-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.recorder-placeholder {
    text-align: center;
    color: var(--text-muted);
}

.recorder-controls {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.recording-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.recording-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--accent-coral);
    animation: pulse 1s infinite;
}

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

.btn-record {
    background-color: var(--accent-coral);
    color: white;
    padding: 16px 32px;
    font-size: 16px;
}

.btn-record:hover:not(:disabled) {
    background-color: var(--accent-coral-hover);
}

.btn-stop {
    background-color: #ef4444;
    color: white;
}

.btn-stop:hover:not(:disabled) {
    background-color: #dc2626;
}

/* Upload Progress */
.upload-progress {
    padding: 24px;
    text-align: center;
}

.progress-bar {
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-coral);
    border-radius: var(--radius-full);
    transition: width var(--transition-base);
}

.progress-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Success Page */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    padding: 24px;
}

.success-card {
    max-width: 480px;
    background-color: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.success-icon {
    width: 64px;
    height: 64px;
    background-color: var(--success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.success-icon svg {
    width: 32px;
    height: 32px;
    color: var(--success);
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.success-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Invalid/Expired Page */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    padding: 24px;
}

.error-card {
    max-width: 480px;
    background-color: var(--bg-primary);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.error-icon {
    width: 64px;
    height: 64px;
    background-color: var(--accent-coral-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.error-icon svg {
    width: 32px;
    height: 32px;
    color: var(--accent-coral);
}

.error-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.error-text {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 64px 24px;
}

.empty-icon {
    width: 64px;
    height: 64px;
    background-color: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.empty-icon svg {
    width: 32px;
    height: 32px;
    color: var(--text-muted);
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-small { font-size: 13px; }

.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-top: 16px; }
.mb-6 { margin-top: 24px; }

.flex { display: flex; }
.flex-center { align-items: center; justify-content: center; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .dashboard-filters {
        flex-wrap: wrap;
    }

    .detail-header {
        flex-direction: column;
        gap: 16px;
    }

    .auth-card {
        padding: 32px 24px;
    }

    .verify-content {
        padding: 24px 16px;
    }

    .recorder-controls {
        flex-direction: column;
    }
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-coral);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 400px;
    width: 90%;
    transform: scale(0.95);
    transition: transform var(--transition-base);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: 24px 24px 0;
    text-align: center;
}

.modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.modal-icon.warning {
    background: #fef2f2;
    color: #ef4444;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-body {
    padding: 16px 24px 24px;
    text-align: center;
}

.modal-body p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
}

.modal-footer .btn {
    flex: 1;
}

.btn-danger {
    background-color: #ef4444;
    color: #fff;
    border: none;
}

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

.btn-success {
    background-color: #22c55e;
    color: #fff;
    border: none;
}

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