:root {
    font-family: Inter, system-ui, sans-serif;
    color: #17201b;
    background: #f5f7f5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

.topbar {
    height: 72px;
    padding: 0 6%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-bottom: 1px solid #e4e8e5;
}

.brand {
    color: #17201b;
    text-decoration: none;
    font-size: 20px;
    font-weight: 750;
}

.brand-icon {
    color: #159447;
    margin-right: 8px;
}

.languages {
    display: flex;
    gap: 10px;
    align-items: center;
}

.languages a {
    color: #56615a;
    text-decoration: none;
    font-weight: 700;
}

.languages a[aria-current="page"] {
    color: #159447;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 24px;
}

.hero {
    padding: 64px;
    border-radius: 28px;
    background: white;
    box-shadow: 0 20px 60px rgba(20, 50, 30, 0.08);
}

.badge {
    display: inline-block;
    padding: 7px 13px;
    border-radius: 999px;
    background: #e8f7ed;
    color: #13783b;
    font-weight: 700;
}

h1 {
    max-width: 760px;
    margin: 22px 0 16px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.02;
}

.lead {
    max-width: 720px;
    color: #667069;
    font-size: 20px;
    line-height: 1.6;
}

.actions {
    margin-top: 32px;
    display: flex;
    gap: 14px;
}

button {
    border: 0;
    border-radius: 12px;
    padding: 14px 22px;
    background: #159447;
    color: white;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

button.secondary {
    background: #edf1ee;
    color: #17201b;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 22px;
}

.features article {
    padding: 26px;
    border-radius: 18px;
    background: white;
    border: 1px solid #e4e8e5;
}

.features h2 {
    margin-top: 0;
}

.features p {
    color: #667069;
    line-height: 1.55;
}

@media (max-width: 760px) {
    .hero {
        padding: 34px 24px;
    }

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

    .actions {
        flex-direction: column;
    }
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-email {
    color: #667069;
    font-size: 14px;
}

.button {
    display: inline-block;
    border-radius: 12px;
    padding: 14px 22px;
    background: #159447;
    color: white;
    text-decoration: none;
    font-weight: 750;
}

.button.secondary,
button.secondary {
    background: #edf1ee;
    color: #17201b;
}

.auth-card,
.dashboard-card {
    max-width: 580px;
    margin: 0 auto;
    padding: 44px;
    border-radius: 24px;
    background: white;
    box-shadow: 0 20px 60px rgba(20, 50, 30, 0.08);
}

.dashboard-card {
    max-width: 1000px;
}

.auth-title {
    margin: 20px 0 10px;
    font-size: 42px;
}

.auth-description,
.auth-footer {
    color: #667069;
    line-height: 1.55;
}

.auth-card form {
    display: grid;
    gap: 18px;
    margin-top: 28px;
}

.auth-card label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.auth-card input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #d8ded9;
    border-radius: 11px;
    font: inherit;
    outline: none;
}

.auth-card input:focus {
    border-color: #159447;
    box-shadow: 0 0 0 3px rgba(21, 148, 71, 0.12);
}

.alert {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 11px;
    background: #fff0f0;
    color: #a42626;
    border: 1px solid #f0cccc;
}

.auth-footer {
    margin-top: 24px;
}

.auth-footer a {
    color: #13783b;
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 32px;
}

.dashboard-grid article {
    padding: 24px;
    border: 1px solid #e4e8e5;
    border-radius: 16px;
}

.dashboard-grid h2 {
    margin-top: 0;
}

.dashboard-grid p {
    color: #667069;
    line-height: 1.5;
}

.logout-form {
    margin-top: 28px;
}

@media (max-width: 760px) {
    .topbar-right {
        gap: 12px;
    }

    .user-email {
        display: none;
    }

    .auth-card,
    .dashboard-card {
        padding: 30px 22px;
    }

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

.company-card {
    max-width: 1000px;
    margin: 0 auto;
    padding: 44px;
    border-radius: 24px;
    background: white;
    box-shadow: 0 20px 60px rgba(20, 50, 30, 0.08);
}

.page-header {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: flex-start;
}

.back-link {
    color: #13783b;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.company-form {
    display: grid;
    gap: 22px;
    margin-top: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 18px;
}

.company-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.company-form input,
.company-form select,
.company-form textarea {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #d8ded9;
    border-radius: 11px;
    background: white;
    color: #17201b;
    font: inherit;
    outline: none;
}

.company-form textarea {
    resize: vertical;
    line-height: 1.55;
}

.company-form input:focus,
.company-form select:focus,
.company-form textarea:focus {
    border-color: #159447;
    box-shadow: 0 0 0 3px rgba(21, 148, 71, 0.12);
}

.form-note {
    margin: 0;
    color: #667069;
}

.success-alert {
    margin: 20px 0;
    padding: 14px 16px;
    border: 1px solid #bfe2ca;
    border-radius: 11px;
    background: #eaf8ef;
    color: #13783b;
    font-weight: 700;
}

.dashboard-link,
.dashboard-disabled {
    display: block;
    padding: 24px;
    border: 1px solid #e4e8e5;
    border-radius: 16px;
    background: white;
}

.dashboard-link {
    color: inherit;
    text-decoration: none;
    transition:
        border-color 0.2s,
        transform 0.2s,
        box-shadow 0.2s;
}

.dashboard-link:hover {
    border-color: #159447;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(20, 50, 30, 0.08);
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.dashboard-card-header h2 {
    margin: 0;
}

.status-pill {
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff4d8;
    color: #8b6411;
    font-size: 12px;
    font-weight: 750;
}

.status-pill.ready {
    background: #e8f7ed;
    color: #13783b;
}

.status-pill.muted {
    background: #edf1ee;
    color: #667069;
}

.dashboard-disabled {
    opacity: 0.75;
}

@media (max-width: 850px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
    }
}

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

.services-section {
    margin-top: 46px;
    padding-top: 34px;
    border-top: 1px solid #e4e8e5;
}

.services-list {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.service-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 22px;
    border: 1px solid #e4e8e5;
    border-radius: 15px;
}

.service-item h3 {
    margin: 0 0 8px;
}

.service-item p {
    margin: 0 0 12px;
    color: #667069;
    line-height: 1.5;
}

.service-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.service-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #edf5ef;
    color: #376046;
    font-size: 13px;
    font-weight: 700;
}

.danger-button {
    padding: 9px 13px;
    background: #fff0f0;
    color: #a42626;
    border: 1px solid #f0cccc;
}

.empty-state {
    margin-top: 20px;
    padding: 30px;
    border: 1px dashed #ccd4ce;
    border-radius: 15px;
    color: #667069;
    text-align: center;
}

@media (max-width: 950px) {
    .services-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .services-form-grid {
        grid-template-columns: 1fr;
    }

    .service-item {
        flex-direction: column;
    }
}

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

@media (max-width: 1100px) {
    .services-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.hours-form {
    display: grid;
    gap: 28px;
    margin-top: 32px;
}

.hours-list {
    display: grid;
    gap: 12px;
}

.hours-row {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 18px;
    align-items: center;
    padding: 18px 20px;
    border: 1px solid #e4e8e5;
    border-radius: 14px;
}

.hours-day {
    font-size: 17px;
}

.hours-row label {
    display: grid;
    gap: 6px;
    color: #667069;
    font-size: 13px;
    font-weight: 700;
}

.hours-row input[type="time"] {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d8ded9;
    border-radius: 10px;
    background: white;
    font: inherit;
}

.hours-row input[type="time"]:disabled {
    background: #f0f2f0;
    color: #9aa19c;
}

.closed-control {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 9px !important;
}

.closed-control input {
    width: 18px;
    height: 18px;
    accent-color: #159447;
}

@media (max-width: 760px) {
    .hours-row {
        grid-template-columns: 1fr 1fr;
    }

    .hours-day {
        grid-column: 1 / -1;
    }
}

.conversation-table-wrapper {
    margin-top: 32px;
    overflow-x: auto;
}

.conversation-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
}

.conversation-table th,
.conversation-table td {
    padding: 16px 14px;
    border-bottom: 1px solid #e4e8e5;
    text-align: left;
    vertical-align: middle;
}

.conversation-table th {
    color: #667069;
    font-size: 13px;
    font-weight: 750;
}

.conversation-table td small {
    display: block;
    margin-top: 5px;
    color: #8b938e;
}

.channel-pill {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #edf1ee;
    color: #526058;
    font-size: 12px;
    font-weight: 750;
    text-transform: uppercase;
}

.status-pill.human {
    background: #e7eefc;
    color: #2e5d9f;
}

.table-link {
    color: #13783b;
    text-decoration: none;
    font-weight: 750;
    white-space: nowrap;
}

.conversation-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 14px;
    margin-top: 28px;
}

.conversation-info-grid > div {
    padding: 16px;
    border: 1px solid #e4e8e5;
    border-radius: 13px;
}

.conversation-info-grid span {
    display: block;
    margin-bottom: 6px;
    color: #667069;
    font-size: 12px;
}

.conversation-info-grid strong {
    overflow-wrap: anywhere;
}

.conversation-mode-form {
    display: flex;
    align-items: end;
    gap: 14px;
    margin-top: 22px;
    padding: 20px;
    border-radius: 14px;
    background: #f5f7f5;
}

.conversation-mode-form label {
    display: grid;
    flex: 1;
    gap: 7px;
    font-weight: 700;
}

.conversation-mode-form select {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #d8ded9;
    border-radius: 10px;
    background: white;
    font: inherit;
}

.conversation-history {
    margin-top: 42px;
    padding-top: 30px;
    border-top: 1px solid #e4e8e5;
}

.message-block {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.message-bubble {
    max-width: 80%;
    padding: 17px 19px;
    border-radius: 17px;
}

.customer-message {
    justify-self: start;
    background: #edf1ee;
}

.assistant-message {
    justify-self: end;
    background: #e8f7ed;
}

.message-label {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.message-text {
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.message-bubble time {
    display: block;
    margin-top: 10px;
    color: #7b847e;
    font-size: 11px;
}

@media (max-width: 760px) {
    .conversation-info-grid {
        grid-template-columns: 1fr;
    }

    .conversation-mode-form {
        align-items: stretch;
        flex-direction: column;
    }

    .message-bubble {
        max-width: 94%;
    }
}

.lead-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 28px;
}

.lead-filters a {
    padding: 8px 12px;
    border: 1px solid #dce2dd;
    border-radius: 999px;
    color: #56615a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
}

.lead-filters a.active {
    border-color: #159447;
    background: #e8f7ed;
    color: #13783b;
}

.lead-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 750;
}

.lead-status-new {
    background: #e7eefc;
    color: #2e5d9f;
}

.lead-status-contacted {
    background: #fff4d8;
    color: #8b6411;
}

.lead-status-booked {
    background: #e8f7ed;
    color: #13783b;
}

.lead-status-closed {
    background: #edf1ee;
    color: #56615a;
}

.lead-status-rejected {
    background: #fff0f0;
    color: #a42626;
}

.lead-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 30px;
}

.lead-detail-grid > div {
    padding: 17px;
    border: 1px solid #e4e8e5;
    border-radius: 13px;
}

.lead-detail-grid span {
    display: block;
    margin-bottom: 7px;
    color: #667069;
    font-size: 12px;
}

.lead-detail-grid strong {
    overflow-wrap: anywhere;
}

.lead-notes {
    margin-top: 25px;
    padding: 20px;
    border-radius: 14px;
    background: #f5f7f5;
}

.lead-notes h2 {
    margin-top: 0;
}

.lead-notes p {
    margin-bottom: 0;
    line-height: 1.6;
    white-space: pre-wrap;
}

@media (max-width: 760px) {
    .lead-detail-grid {
        grid-template-columns: 1fr;
    }
}
