:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f5f5f7;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --radius: 10px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
}

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

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 32px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-weight: 700;
    font-size: 20px;
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 20;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    margin-left: 16px;
    font-size: 14px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

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

.btn-secondary {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 500;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    padding: 60px 40px;
    align-items: center;
}

.hero-content h1 {
    font-size: 36px;
    margin-bottom: 16px;
}

.hero-content p {
    color: var(--muted);
    max-width: 480px;
}

.hero-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.hero-benefits {
    margin-top: 20px;
    padding-left: 18px;
    color: var(--muted);
}

.hero-image img {
    width: 100%;
    border-radius: var(--radius);
    object-fit: cover;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 40px;
}

.feature-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 0;
    border: 1px solid var(--border);
    overflow: hidden;
}

.feature-card h3,
.feature-card p {
    padding: 0 20px;
}

.feature-card h3 {
    margin-top: 16px;
}

.feature-card p {
    padding-bottom: 20px;
}

.feature-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-strip {
    padding: 40px;
    text-align: center;
    background: #111827;
    color: #fff;
}

.cta-strip p {
    color: #e5e7eb;
}

.auth-container {
    max-width: 400px;
    margin: 60px auto;
    background: #fff;
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.auth-subtitle {
    color: var(--muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.auth-form input {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 16px;
}

.auth-footer {
    margin-top: 16px;
    font-size: 14px;
    color: var(--muted);
}

.alert {
    background: #fee2e2;
    color: #b91c1c;
    padding: 8px 10px;
    border-radius: 6px;
    margin-top: 10px;
}

.dashboard {
    padding: 40px;
}

.dashboard-subtitle {
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.1fr 1.2fr;
    gap: 24px;
    margin-top: 24px;
}

.card {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
}

.job-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 16px;
    font-family: inherit;
}

.job-form input[type="number"],
.job-form input[type="file"] {
    width: 100%;
    margin-bottom: 10px;
    font-size: 16px;
}

.job-form input[type="number"] {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.job-form label {
    font-weight: 500;
    margin-top: 8px;
    display: block;
}

.job-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.job-item {
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.job-item h3 {
    word-break: break-word;
}

.job-item p {
    word-break: break-word;
}

.job-meta {
    font-size: 14px;
    color: var(--muted);
}

.job-photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.job-photos img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.form-section {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.form-section legend {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
    padding: 0 6px;
}

.form-section input[type="text"],
.form-section input[type="email"],
.form-section input[type="tel"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 16px;
    margin-bottom: 8px;
}

.job-owner-info {
    background: #f0f4ff;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.job-owner-info a {
    color: var(--primary);
}

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

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

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

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-progress {
    background: #dbeafe;
    color: #1e40af;
}

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

.status-declined {
    background: #fee2e2;
    color: #991b1b;
}

.proposal-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px;
}

.proposal-header {
    text-align: center;
    margin-bottom: 24px;
}

.proposal-header h1 {
    margin: 12px 0 8px;
}

.proposal-from,
.proposal-date {
    color: var(--muted);
    font-size: 14px;
    margin: 4px 0;
}

.proposal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.proposal-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin: 8px 0;
}

.proposal-actions {
    text-align: center;
    padding: 24px 0;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-approve {
    background: #22c55e;
    color: white;
    padding: 12px 32px;
    border-radius: 999px;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

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

.btn-decline {
    background: transparent;
    color: #991b1b;
    padding: 12px 32px;
    border-radius: 999px;
    border: 1px solid #fecaca;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.btn-decline:hover {
    background: #fee2e2;
}

.update-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.update-item {
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid var(--border);
}

.update-item p {
    margin: 6px 0;
}

.update-type {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
}

.type-system {
    background: #e5e7eb;
    color: #374151;
}

.type-progress {
    background: #dbeafe;
    color: #1e40af;
}

.update-date {
    font-size: 12px;
    color: var(--muted);
}

.form-section input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 16px;
    margin-bottom: 8px;
}

.breakdown-table-wrap {
    overflow-x: auto;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 8px;
}

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

.breakdown-table th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}

.breakdown-table tfoot td {
    border-top: 2px solid var(--border);
    border-bottom: none;
    font-size: 15px;
}

.line-item-row {
    display: grid;
    grid-template-columns: 1fr 70px 100px 36px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.line-item-row input {
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 14px;
}

.btn-remove-line {
    background: #fee2e2;
    color: #991b1b;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    line-height: 1;
}

.btn-remove-line:hover {
    background: #fecaca;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-block;
}

.btn-secondary:hover {
    background: #eff6ff;
}

.edit-photos {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.edit-photo-item {
    text-align: center;
}

.edit-photo-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.btn-remove-photo {
    background: none;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.btn-remove-photo:hover {
    background: #fee2e2;
}

.team-card {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.team-card:last-child {
    border-bottom: none;
}

.team-card h3 {
    margin: 0 0 4px;
}

.team-member-list {
    list-style: none;
    padding: 0;
    margin: 8px 0;
}

.team-member-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 24px;
        z-index: 15;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        margin-left: 0;
        font-size: 18px;
    }

    .top-nav {
        padding: 14px 16px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 32px 16px;
        gap: 24px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-image img {
        max-height: 240px;
    }

    .features {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }

    .cta-strip {
        padding: 32px 16px;
    }

    .cta-strip h2 {
        font-size: 22px;
    }

    .auth-container {
        margin: 24px 16px;
        padding: 24px 20px;
        max-width: none;
    }

    .dashboard {
        padding: 24px 16px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 16px;
    }

    .job-photos img {
        width: 60px;
        height: 60px;
    }

    .proposal-grid {
        grid-template-columns: 1fr;
    }

    .line-item-row {
        grid-template-columns: 1fr 50px 80px 32px;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 16px;
    }

    .job-form button.btn-primary {
        width: 100%;
        padding: 12px;
        margin-top: 8px;
    }

    .summary-cards {
        grid-template-columns: 1fr 1fr;
    }

    .summary-value {
        font-size: 22px;
    }

    .payment-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }
}

.auth-form select {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 16px;
    background: #fff;
    color: var(--text);
    appearance: auto;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.summary-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.summary-label {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}

.summary-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
}

.summary-paid {
    color: #065f46;
}

.summary-outstanding {
    color: #b91c1c;
}

.payment-form {
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.payment-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.payment-form label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 4px;
}

.payment-form input,
.payment-form select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 14px;
}

.report-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 16px;
}

.back-link {
    display: inline-block;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--primary);
}

.report-header {
    margin-bottom: 24px;
}

.report-header h1 {
    margin-bottom: 4px;
}

.report-summary p {
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
}

.report-section {
    margin-top: 32px;
}

.report-section h2 {
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.report-photo-card {
    padding: 0;
    overflow: hidden;
}

.report-photo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.report-caption {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--muted);
    margin: 0;
}

@media print {
    .top-nav,
    .back-link {
        display: none;
    }

    .report-page {
        max-width: 100%;
        padding: 0;
    }

    .report-photo-card {
        break-inside: avoid;
    }

    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

.pricing-section {
    padding: 60px 40px;
    text-align: center;
    background: #ffffff;
}

.pricing-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.pricing-header p {
    color: var(--muted);
    font-size: 16px;
    margin-bottom: 40px;
}

.pricing-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px 28px;
    text-align: left;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pricing-card-highlight {
    border: 2px solid var(--primary);
    background: #f0f4ff;
}

.pricing-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
    width: fit-content;
}

.pricing-badge-upcoming {
    background: #374151;
}

.pricing-card h3 {
    font-size: 22px;
    margin: 0 0 8px;
}

.pricing-amount {
    font-size: 48px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
}

.pricing-amount span {
    font-size: 18px;
    font-weight: 500;
    color: var(--muted);
}

.pricing-desc {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
    flex-grow: 1;
}

.pricing-features li {
    padding: 6px 0;
    font-size: 14px;
    color: var(--text);
    position: relative;
    padding-left: 24px;
}

.pricing-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #22c55e;
    font-weight: 700;
}

.pricing-cta {
    display: block;
    text-align: center;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 999px;
    font-weight: 600;
}

.pricing-note {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-top: 10px;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .pricing-section {
        padding: 40px 16px;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .pricing-header h2 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 24px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions a {
        text-align: center;
    }

    .feature-img {
        height: 160px;
    }
}

.help-section {
    padding: 60px 40px;
    background: #ffffff;
}

.help-header {
    text-align: center;
    margin-bottom: 40px;
}

.help-header h2 {
    font-size: 32px;
    margin-bottom: 8px;
}

.help-header p {
    color: var(--muted);
    font-size: 16px;
}

.help-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.help-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.help-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}

.help-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.help-card h3 {
    font-size: 18px;
    margin: 0 0 8px;
}

.help-card p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 16px;
}

.help-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.help-link:hover {
    text-decoration: underline;
}

.site-footer {
    background: #111827;
    color: #e5e7eb;
    padding: 48px 40px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 32px;
    border-bottom: 1px solid #374151;
}

.footer-logo {
    font-weight: 700;
    font-size: 22px;
    color: #ffffff;
    margin-bottom: 8px;
}

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

.footer-brand p {
    font-size: 14px;
    color: #9ca3af;
    margin: 0;
    max-width: 280px;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links h4 {
    color: #ffffff;
    font-size: 14px;
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links a {
    color: #9ca3af;
    font-size: 14px;
    text-decoration: none;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
}

.footer-bottom p {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
}

@media (max-width: 768px) {
    .help-section {
        padding: 40px 16px;
    }

    .help-grid {
        grid-template-columns: 1fr;
    }

    .help-header h2 {
        font-size: 26px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .site-footer {
        padding: 32px 16px 0;
    }
}
