/* ─── Odd Dog Proposals Dashboard ─────────────────────────────────── */

:root {
    --orange: #F26522;
    --orange-hover: #d9571b;
    --navy: #1B2A4A;
    --navy-light: #243660;
    --cream: #FDF8F3;
    --text: #2C2C2C;
    --gray: #6B6B6B;
    --light-border: #E8E0D8;
    --white: #FFFFFF;
    --green: #2E7D32;
    --green-bg: #E8F5E9;
    --yellow: #F9A825;
    --yellow-bg: #FFF8E1;
    --red: #C62828;
    --red-bg: #FFEBEE;
    --gray-bg: #F0EDEA;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--cream);
    line-height: 1.5;
    min-height: 100vh;
}

/* ─── Login page ──────────────────────────────────────────────────── */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    margin-bottom: 1rem;
}

.login-logo img {
    max-height: 48px;
    width: auto;
}

.login-card h1 {
    font-size: 1.25rem;
    color: var(--navy);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.form-group input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text);
    background: var(--white);
    transition: border-color 0.15s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.15);
}

/* ─── Buttons ─────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, opacity 0.15s;
    line-height: 1.4;
}

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

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

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

.btn-secondary:hover {
    background: var(--navy-light);
}

.btn-full {
    width: 100%;
    margin-top: 0.5rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

/* ─── Alerts ──────────────────────────────────────────────────────── */

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
}

.alert-error {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid #FFCDD2;
}

.alert-success {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid #C8E6C9;
}

/* ─── Dashboard header ────────────────────────────────────────────── */

.dashboard-header {
    background: var(--navy);
    border-bottom: 3px solid var(--orange);
}

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

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

.header-logo {
    max-height: 40px;
    width: auto;
}

.header-inner h1 {
    color: var(--white);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

/* ─── Dashboard main ──────────────────────────────────────────────── */

.dashboard-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ─── Upload section ──────────────────────────────────────────────── */

.upload-section {
    margin-bottom: 1.5rem;
}

.upload-section h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.upload-area {
    border: 2px dashed var(--light-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    background: var(--white);
    transition: border-color 0.15s;
    margin-bottom: 0.75rem;
}

.upload-area:hover {
    border-color: var(--orange);
}

.upload-label {
    cursor: pointer;
    display: block;
}

.upload-text {
    display: block;
    color: var(--gray);
    font-size: 0.9375rem;
    margin-bottom: 0.5rem;
}

.upload-area input[type="file"] {
    display: block;
    margin: 0 auto;
    font-size: 0.875rem;
}

.upload-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--gray);
    cursor: pointer;
}

/* ─── Filters ─────────────────────────────────────────────────────── */

.filters-section {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.filter-input,
.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    background: var(--white);
    color: var(--text);
}

.filter-input {
    flex: 1;
    min-width: 0;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.15);
}

.filter-select {
    min-width: 160px;
}

/* ─── Table ───────────────────────────────────────────────────────── */

.table-section {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.proposals-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.proposals-table th {
    background: var(--cream);
    color: var(--navy);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid var(--light-border);
    white-space: nowrap;
}

.proposals-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--light-border);
    vertical-align: middle;
}

.proposals-table tbody tr:hover {
    background: rgba(242, 101, 34, 0.03);
}

.proposals-table a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 500;
}

.proposals-table a:hover {
    color: var(--orange);
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    color: var(--gray);
    padding: 3rem 1rem !important;
    font-style: italic;
}

.col-amount {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.col-created {
    white-space: nowrap;
}

/* ─── Status badges ───────────────────────────────────────────────── */

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.badge-signed {
    background: var(--green-bg);
    color: var(--green);
}

.badge-pending {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.badge-expired {
    background: var(--gray-bg);
    color: var(--gray);
}

/* ─── Integration dots ────────────────────────────────────────────── */

.col-integrations {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.integration-dot {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.dot-success {
    background: var(--green-bg);
    color: var(--green);
}

.dot-pending {
    background: var(--yellow-bg);
    color: var(--yellow);
}

.dot-failed {
    background: var(--red-bg);
    color: var(--red);
}

/* ─── Inline forms ────────────────────────────────────────────────── */

.inline-form {
    display: inline;
}

/* ─── Responsive ──────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .dashboard-main {
        padding: 1rem;
    }

    .filters-section {
        flex-direction: column;
    }

    .filter-select {
        min-width: 0;
    }

    .upload-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-inner h1 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 0.5rem 1rem;
    }

    .header-left {
        gap: 0.5rem;
    }

    .header-logo {
        max-height: 32px;
    }
}
