:root {
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --primary: #0284c7;
    --primary-hover: #0369a1;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

.auth-card {
    max-width: 420px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.auth-card form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-card input {
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

.auth-card button {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    cursor: pointer;
}

.auth-error {
    color: #dc2626;
}

.auth-hint {
    color: #475569;
    font-size: 0.95rem;
}

.app-header {
    background: #0f172a;
    color: white;
    padding: 1rem 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
}

.logo-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.logo-highlight {
    color: #38bdf8;
}

.app-subtitle {
    font-size: 0.875rem;
    color: #94a3b8;
}

.app-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}

.nav-link {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #38bdf8;
}

.user-pill {
    font-size: 0.8rem;
    color: #94a3b8;
    padding: 0.25rem 2rem 0 2rem;
}

.app-content {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.page-container {
    max-width: 1000px;
    margin: 0 auto;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.data-table th, .data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.data-table th {
    background-color: #f1f5f9;
    font-weight: 600;
    color: #475569;
}

.data-table tr:hover {
    background-color: #f8fafc;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

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

.btn-action {
    background-color: #e2e8f0;
    color: #334155;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
}

.btn-action:hover {
    background-color: #cbd5e1;
}

.card {
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.muted {
    color: #64748b;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    align-items: end;
}

.form-grid label {
    display: block;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 0.25rem;
}

.form-grid input, .form-grid select, .form-grid textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: inherit;
}

.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-tile {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    min-width: 140px;
}

.stat-tile .stat-label {
    font-size: 0.8rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-tile .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #e2e8f0;
    color: #334155;
    white-space: nowrap;
}

.badge-flag-overdue, .badge-flag-rev-overdue {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-flag-who, .badge-flag-turnover, .badge-flag-timelogs {
    background: #fef3c7;
    color: #92400e;
}

.badge-flag-flow {
    background: #dbeafe;
    color: #1d4ed8;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.board-column {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
}

.board-column h3 {
    margin-top: 0;
    font-size: 1rem;
}

.board-card {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.board-card .board-card-title {
    font-weight: 600;
}

textarea.import-paste {
    width: 100%;
    min-height: 220px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.85rem;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-sizing: border-box;
}

.import-banner {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.import-result {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}
