:root {
    font-family: "Inter", "Helvetica", "Arial", sans-serif;
    color: #FFFFFF;
    background-color: #080A0F;
    --color-primary: #2DD5C4;
    --color-primary-dark: #26B3A8;
    --color-bg: #080A0F;
    --color-surface: #0D1118;
    --color-panel: #151B2B;
    --color-panel-alt: #1B2335;
    --color-border: #2E3547;
    --color-text: #FFFFFF;
    --color-text-muted: #B0B6C2;
    --color-card-shadow: rgba(1, 2, 4, 0.55);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    color: var(--color-text);
}

a {
    color: var(--color-primary);
}

a:hover {
    color: var(--color-primary-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Poppins", "Helvetica", "Arial", sans-serif;
    color: var(--color-text);
}

.top-bar {
    background: var(--color-surface);
    color: var(--color-text);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    }

.top-bar a {
    color: var(--color-text-muted);
    margin-left: 1rem;
    text-decoration: none;
    font-weight: 500;
}

.top-bar a:hover {
    color: var(--color-primary);
}

.top-bar a.secondary {
    color: var(--color-primary);
}

.profile-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.profile-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.page {
    flex: 1;
    padding: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    background: var(--color-bg);
}

.card {
    background: var(--color-panel);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px var(--color-card-shadow);
    margin-bottom: 2rem;
    border: 1px solid var(--color-border);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    gap: 0.75rem;
}

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

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    text-align: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-muted);
}

.weekday-cell {
    padding: 0.4rem 0;
}

.calendar-day {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1rem;
    background: var(--color-panel-alt);
    min-height: 120px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--color-text);
}

.calendar-day.full {
    background: rgba(249, 115, 22, 0.15);
    border-color: #f97316;
}

.calendar-day.available {
    background: rgba(45, 213, 196, 0.12);
    border-color: var(--color-primary);
}

.calendar-day.blocked {
    background: rgba(43, 50, 69, 0.35);
    border-color: var(--color-border);
}

.calendar-day.overbooked {
    background: rgba(220, 38, 38, 0.25);
    border-color: #ef4444;
}

.calendar-day.completed {
    background: rgba(196, 181, 253, 0.25);
    border-color: #c084fc;
}

.calendar-day.weekend {
    background: #101522;
    border-color: var(--color-border);
}

.calendar-day.muted {
    opacity: 0.6;
}

.calendar-day-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 0.9rem;
}

.calendar-day-jobs {
    list-style: none;
    padding: 0;
    margin: 0.35rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
}

.calendar-day-logistics {
    list-style: none;
    padding: 0;
    margin: 0.35rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8rem;
}

.calendar-logistics {
    border: 1px dashed var(--color-border);
    border-left-width: 4px;
    border-radius: 6px;
    padding: 0.35rem 0.45rem;
    background: rgba(255, 255, 255, 0.03);
}

.calendar-logistics-pickup {
    border-left-color: var(--color-primary);
    background: rgba(45, 213, 196, 0.15);
}

.calendar-logistics-dropoff {
    border-left-color: #f97316;
    background: rgba(249, 115, 22, 0.12);
}

.calendar-logistics .job-meta {
    color: var(--color-text-muted);
}

.calendar-day-job {
    background: rgba(45, 213, 196, 0.28);
    border-radius: 6px;
    padding: 0.35rem 0.45rem;
    border: 1px solid rgba(45, 213, 196, 0.65);
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(45, 213, 196, 0.18);
}

.calendar-day-job.status-completed {
    background: rgba(196, 181, 253, 0.35);
    border-color: rgba(192, 132, 252, 0.85);
    box-shadow: 0 4px 16px rgba(129, 90, 225, 0.25);
}

.calendar-day-job .job-line {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    color: #041f1c;
}

.calendar-day-job .job-items,
.calendar-day-job .job-meta {
    color: rgba(4, 31, 28, 0.85);
}

.calendar-day-job:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.job-tooltip {
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 0.5rem;
    background: var(--color-surface);
    color: var(--color-text);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    min-width: 220px;
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
    z-index: 20;
}

.job-tooltip::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 18px;
    width: 12px;
    height: 12px;
    background: inherit;
    transform: rotate(45deg);
}

.calendar-day-job:hover .job-tooltip,
.calendar-day-job:focus .job-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.job-tooltip-heading {
    margin: 0 0 0.4rem;
    font-weight: 600;
}

.job-tooltip-row {
    display: flex;
    gap: 0.5rem;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.job-tooltip-row:last-child {
    margin-bottom: 0;
}

.job-tooltip-label {
    flex: 0 0 70px;
    color: var(--color-primary);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
}

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

.stat-card {
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem;
    background: var(--color-panel);
    box-shadow: 0 6px 18px var(--color-card-shadow);
}

.stat-card span {
    display: block;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 0.35rem;
}

.stat-card strong {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.nav-link-with-bubble {
    position: relative;
    padding-right: 1.5rem;
}

.bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    margin-left: 0.3rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.service-option {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    background: var(--color-panel);
    color: var(--color-text);
}

.service-option input {
    width: auto;
    margin: 0;
}

.service-name {
    font-weight: 600;
}

.service-heading {
    margin: 0.5rem 0 0.5rem;
}

.service-details,
.service-hours,
.help-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin: 0.2rem 0;
}

.service-hours {
    font-size: 0.8rem;
}

.service-price {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
}

.schedule-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.schedule-form label {
    margin-bottom: 0;
}

.schedule-form button {
    align-self: flex-start;
    margin-top: 0.5rem;
}

.schedule-form.hidden {
    display: none;
}

.segment-block {
    border: 1px dashed var(--color-border);
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
}

.manual-split-fields.hidden {
    display: none;
}

.segment-block h3,
.segment-block h4 {
    margin: 0 0 0.35rem;
}

.segment-block p {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.segment-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.logistics-fieldset {
    margin-bottom: 1rem;
}

.logistics-fieldset[hidden] {
    display: none;
}

.logistics-grid label {
    margin-bottom: 0.35rem;
}

.required {
    color: var(--color-primary);
    font-size: 0.85em;
}

.inline-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--color-text);
}

form input::placeholder,
form textarea::placeholder {
    color: var(--color-text-muted);
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 0.65rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
    background: var(--color-surface);
    color: var(--color-text);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin-bottom: 0;
}

button,
.btn {
    background: var(--color-primary);
    color: #0F1324;
    border: none;
    padding: 0.8rem 1.4rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    text-decoration: none;
    white-space: nowrap;
}

button.secondary,
.btn.secondary {
    background: rgba(255, 255, 255, 0.12);
    color: var(--color-text);
}

.btn.danger {
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
}

.btn.danger:hover {
    background: rgba(239, 68, 68, 1);
}

button:hover,
.btn:hover {
    background: var(--color-primary-dark);
    color: #0F1324;
}

button.secondary:hover,
.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.status-approved {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.status-store_review {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
}

.status-partner_pending {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.status-partner_confirmed {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
}

.status-completed {
    background: rgba(96, 165, 250, 0.2);
    color: #bfdbfe;
}

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

.text-danger {
    color: #f87171;
}

.field-error {
    font-size: 0.85rem;
    margin: 0.2rem 0 0.5rem;
}

.field-invalid-input {
    border-color: #f87171;
    box-shadow: 0 0 0 0.15rem rgba(248, 113, 113, 0.45);
}

.concern-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.65rem;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.75rem;
    margin-left: 0.4rem;
}

details.collapsible {
    border: none;
    padding: 0;
}

.card.collapsible {
    padding: 0;
}

.collapsible > summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
}

.collapsible > summary::-webkit-details-marker {
    display: none;
}

.collapsible-body {
    padding: 0 1.5rem 1.5rem;
}

.toggle-indicator {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #475467;
}

details[open] > summary .toggle-indicator::after {
    content: '−';
}

details:not([open]) > summary .toggle-indicator::after {
    content: '+';
}

.status-declined {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.job-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.job-status {
    text-align: right;
}

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

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

.job-list li {
    margin-bottom: 0.3rem;
}

.photo-upload-form textarea {
    margin-top: 0.4rem;
}

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

.photo-card {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.5rem;
    background: var(--color-panel);
}

.photo-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.photo-card figcaption {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.photo-card-concern {
    border-color: #f97316;
}

.concern-flag {
    color: #f97316;
    font-weight: 600;
}

.concern-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.concern-list li {
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    background: var(--color-panel);
}

.concern-photo {
    flex: 0 0 160px;
}

.concern-photo img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--color-border);
}

.concern-open {
    border-color: #f97316;
}

.resolve-form textarea {
    min-width: 220px;
    margin-bottom: 0.5rem;
}

.job-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.inline-form {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.inline-form select {
    min-width: 200px;
}

.installer-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    max-width: 520px;
}

.installer-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    cursor: pointer;
    }

.installer-checkbox input {
    margin: 0;
}

.installer-checkbox input:checked + span {
    font-weight: 600;
    color: var(--color-primary);
}

.job-installers .concern-pill {
    margin-right: 0.3rem;
    margin-top: 0.3rem;
}

.file-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.4rem;
    border-radius: 12px;
    border: 2px dashed var(--color-border);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    font-weight: 600;
    color: var(--color-primary);
    text-align: center;
    width: 100%;
}

.file-trigger input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.audit-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.audit-list li {
    border-left: 3px solid var(--color-primary);
    padding-left: 1rem;
}

.audit-list p {
    margin: 0.1rem 0;
    color: var(--color-text-muted);
}

.request-list {
    width: 100%;
    border-collapse: collapse;
}

.request-list th,
.request-list td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    color: var(--color-text);
}

.request-list th {
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
}

.actions-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.actions-cell .inline-delete {
    margin: 0;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.flash.info {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.flash.success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.flash.error {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.notification-settings {
    margin-top: 1.5rem;
}

.notification-settings table {
    margin-top: 0.75rem;
}

.notification-table th,
.notification-table td {
    vertical-align: top;
}

.notification-role-block + .notification-role-block {
    margin-top: 1.5rem;
}

.site-footer {
    text-align: center;
    padding: 1.5rem;
    background: var(--color-surface);
    color: var(--color-text-muted);
}

.site-footer .footer-link {
    color: var(--color-primary);
    text-decoration: underline;
    margin-left: 0.35rem;
}
.delete-job-wrapper {
    margin: 2rem 0;
    text-align: center;
}
