@font-face {
    font-family: "Cooper";
    src: url("fonts/Cooper[wght].woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Cooper";
    src: url("fonts/Cooper-Italic[wght].woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

:root {
    --color-primary: #4f46e5;
    --color-primary-hover: #4338ca;
    --color-primary-light: #eef2ff;
    
    --color-blue: #3b82f6;
    --color-blue-hover: #2563eb;
    --color-blue-light: #dbeafe;
    
    --color-green: #10b981;
    --color-green-hover: #059669;
    --color-green-light: #d1fae5;
    
    --color-red: #dc2626;
    --color-red-hover: #b91c1c;
    --color-red-light: #fee2e2;
    
    --color-amber: #f59e0b;
    --color-amber-light: #fef3c7;
    
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #0F5682;
    
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-family-heading: "Cooper", "Times New Roman", serif;
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);

    --ink: #1e293b;
    --muted: #6b7280;
    --accent: #4f46e5;
    --border: #e5e7eb;
    --surface: #ffffff;
    --surface-muted: #f9fafb;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--color-gray-50);
    color: var(--color-gray-900);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6,
.app-title,
.page-title,
.empty-groups-title,
.empty-list-title,
.sublist-title,
.map-title,
.progress-title {
    font-family: var(--font-family-heading);
}

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

a:hover {
    text-decoration: underline;
}

.btn {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

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

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

.btn-secondary {
    background: white;
    color: var(--color-gray-500);
    border: 1px solid var(--color-gray-200);
}

.btn-secondary:hover {
    background: var(--color-gray-50);
    text-decoration: none;
}

.btn-danger {
    background: white;
    color: var(--color-red);
    border: 1px solid var(--color-red);
}

.btn-danger:hover {
    background: var(--color-red-light);
    text-decoration: none;
}

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

.nav-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 32px;
    background: white;
    border-bottom: 1px solid var(--color-gray-200);
}

.nav-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-gray-500);
    cursor: pointer;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-tab:hover {
    background: var(--color-gray-100);
    color: var(--color-gray-900);
    text-decoration: none;
}

.nav-tab.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.header {
    background: white;
    border-bottom: 1px solid var(--color-gray-200);
    padding: 9px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.app-icon {
    width: 24px;
    height: 24px;
    background: var(--color-blue);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.app-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-gray-900);
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background: var(--color-green-light);
    color: #166534;
    border: 1px solid #86efac;
}

.alert-error {
    background: var(--color-red-light);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-gray-900);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px;
}

.floating-job-indicator {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 16px 20px;
    min-width: 280px;
    max-width: 350px;
    z-index: 9999;
    border: 1px solid var(--color-gray-200);
    display: none;
    animation: slideInUp 0.3s ease;
}

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

.floating-job-indicator.active {
    display: block;
}

.floating-job-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.floating-job-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-job-title .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-primary-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.floating-job-close {
    background: none;
    border: none;
    color: var(--color-gray-400);
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    line-height: 1;
}

.floating-job-close:hover {
    color: var(--color-gray-600);
}

.floating-job-progress {
    height: 6px;
    background: var(--color-gray-100);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.floating-job-progress-bar {
    height: 100%;
    background: var(--color-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.floating-job-message {
    font-size: 12px;
    color: var(--color-gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-job-link {
    font-size: 12px;
    color: var(--color-primary);
    text-decoration: none;
    margin-top: 8px;
    display: inline-block;
}

.floating-job-link:hover {
    text-decoration: underline;
}

.dashboard-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 12px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-header .logo {
    font-family: var(--font-family-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-header .logo span {
    font-size: 22px;
}

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

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 28px 32px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-bottom: 4px;
}

.page-header .subtitle {
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 32px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.search-bar input[type="search"] {
    flex: 1;
    max-width: 360px;
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: white;
    transition: border-color 0.2s;
}

.search-bar input[type="search"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.search-bar .search-meta,
.search-bar .list-count {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

.table-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin: 0 32px 32px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    padding: 0 32px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table thead th {
    text-align: left;
    padding: 14px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background: var(--surface-muted);
}

.status-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pill.status-complete,
.status-pill.status-ready {
    background: #ecfdf3;
    color: #0f5132;
}

.status-pill.status-idle {
    background: #f3f4f6;
    color: #4b5563;
}

.status-pill.status-in_progress,
.status-pill.status-in-progress,
.status-pill.status-processing {
    background: #fff7ed;
    color: #c2410c;
}

.status-pill.status-queued,
.status-pill.status-pending {
    background: #eef2ff;
    color: #4338ca;
}

.status-pill.status-failed,
.status-pill.status-error {
    background: #fff5f5;
    color: #b42318;
}

.status-pill.status-in-review {
    background: #fff4e5;
    color: #b45309;
}

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

.btn-ghost {
    background: transparent;
    color: var(--muted);
    border: none;
}

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

.ghost-link {
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s;
}

.ghost-link:hover {
    color: var(--accent);
    text-decoration: none;
}

.coach-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.coach-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-gray-900);
    margin-top: 8px;
}

.coach-header p {
    font-size: 13px;
    color: var(--muted);
    margin-top: 4px;
}

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