/* AppraisalTool.com - base styles (Phase 1 foundation) */

:root {
    --color-bg: #f7f8fa;
    --color-surface: #ffffff;
    --color-text: #1a1d23;
    --color-muted: #6b7280;
    --color-primary: #1d4ed8;
    --color-border: #e5e7eb;
    --radius: 8px;
    --max-width: 960px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.5;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--color-text);
    text-decoration: none;
}

.brand span {
    color: var(--color-primary);
}

.hero {
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.lead {
    font-size: 1.125rem;
    color: var(--color-text);
}

.muted {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.site-footer {
    padding: 2rem 0;
    text-align: center;
    color: var(--color-muted);
    font-size: 0.85rem;
}

.error-page {
    text-align: center;
    padding: 5rem 1.5rem;
}

.auth-form {
    max-width: 420px;
    margin: 3rem auto;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
}

.auth-form h1 {
    font-size: 1.5rem;
    margin-top: 0;
}

.auth-form label {
    display: block;
    font-weight: 600;
    margin: 1rem 0 0.25rem;
}

.auth-form input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 1rem;
}

.auth-form .hint {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: var(--color-muted);
}

.auth-form button {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.65rem;
    border: none;
    border-radius: 6px;
    background: var(--color-primary);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.auth-form .muted {
    margin-top: 1.25rem;
    text-align: center;
}

.field-errors {
    margin: 0.25rem 0 0;
    padding-left: 1.1rem;
    color: #b91c1c;
    font-size: 0.85rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.flash-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-notice {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Dashboard layout */

.dashboard-body {
    background: var(--color-bg);
}

.dashboard-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.dashboard-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.inline-form {
    display: inline;
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.dashboard-shell {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    padding: 2rem 1.5rem;
    align-items: flex-start;
}

.dashboard-sidebar {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-link {
    display: block;
    padding: 0.6rem 0.85rem;
    border-radius: 6px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: var(--color-border);
}

.nav-link.active {
    background: var(--color-primary);
    color: #fff;
}

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

.dashboard-content h1 {
    margin-top: 0;
}

.stat-cards {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    min-width: 160px;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
}

.stat-label {
    display: block;
    color: var(--color-muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.button-link {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 0.9rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}

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

.data-table th,
.data-table td {
    text-align: left;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #f3f4f6;
    color: #374151;
}

.status-submitted {
    background: #eff6ff;
    color: #1e40af;
}

.status-assigned {
    background: #fefce8;
    color: #854d0e;
}

.status-in_review {
    background: #fff7ed;
    color: #9a3412;
}

.status-completed {
    background: #ecfdf5;
    color: #065f46;
}

.status-cancelled,
.status-revision_requested {
    background: #fef2f2;
    color: #991b1b;
}

.detail-list {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 0.5rem 1rem;
    margin: 0;
}

.detail-list dt {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.detail-list dd {
    margin: 0;
}

.status-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.status-timeline li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.status-timeline li:last-child {
    border-bottom: none;
}

.auth-form select,
.auth-form textarea,
.panel select,
.panel textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.panel label {
    display: block;
    font-weight: 600;
    margin: 1rem 0 0.25rem;
}

.panel input[type="text"] {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 1rem;
}

.panel button[type="submit"] {
    margin-top: 1.5rem;
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: 6px;
    background: var(--color-primary);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}
