/* Accounts, dashboard and provider self-service UI */

.nav-cta {
    padding: 8px 14px;
    border-radius: 999px;
    background: #17201d;
    color: #fff;
}

.nav-cta:hover {
    opacity: 1 !important;
    background: #0d1210;
}

.nav-logout-form {
    margin: 0;
}

.nav-logout-form button {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.nav-logout-form button:hover {
    opacity: 0.6;
}

.messages-stack {
    position: relative;
    z-index: 20;
    margin-top: 14px;
}

.flash-message {
    padding: 12px 16px;
    border: 1px solid #dfe9e5;
    border-radius: 12px;
    background: #f1f7f5;
    color: #315d54;
    font-size: 0.9rem;
}

.flash-message.error {
    border-color: #edd6d6;
    background: #fff4f4;
    color: #8a3f3f;
}

.flash-message.warning {
    border-color: #eadfbd;
    background: #fff9e8;
    color: #7b6323;
}

.account-page {
    min-height: 66vh;
    padding: 54px 0 80px;
    background:
        radial-gradient(circle at 85% 5%, rgba(89, 125, 120, 0.07), transparent 27%),
        #fafafa;
}

.account-shell {
    display: flex;
    justify-content: center;
}

.account-card {
    background: #fff;
    border: 1px solid #e9e7e1;
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(26, 34, 30, 0.07);
}

.auth-card,
.claim-request-card {
    width: min(560px, 100%);
    padding: 34px;
}

.account-card h1 {
    margin: 7px 0 8px;
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    line-height: 1.25;
}

.account-lead,
.editor-head p,
.dashboard-head p {
    margin: 0;
    color: #737772;
    line-height: 1.8;
}

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

.account-field {
    margin-bottom: 18px;
}

.account-field label {
    display: block;
    margin-bottom: 7px;
    color: #343936;
    font-size: 0.85rem;
    font-weight: 700;
}

.account-form input:not([type="checkbox"]):not([type="radio"]),
.account-form select,
.account-form textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid #deded9;
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: #1e211f;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.account-form textarea {
    min-height: 112px;
    resize: vertical;
}

.account-form input:focus,
.account-form select:focus,
.account-form textarea:focus {
    border-color: #78958f;
    box-shadow: 0 0 0 3px rgba(89, 125, 120, 0.1);
}

.account-form input[type="file"] {
    padding: 9px;
    background: #f8f8f5;
}

.account-form ul.errorlist {
    margin: 7px 0 0;
    padding: 0;
    list-style: none;
    color: #a14e4e;
    font-size: 0.8rem;
}

.field-help {
    margin-top: 6px;
    color: #8a8c88;
    font-size: 0.77rem;
    line-height: 1.55;
}

.field-help ul {
    margin: 5px 0 0;
    padding-inline-start: 18px;
}

.form-errors {
    margin-bottom: 16px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #fff3f3;
    color: #934747;
}

.account-primary-btn,
.account-primary-link,
.claim-profile-btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    border: 0;
    border-radius: 11px;
    background: #17201d;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.account-primary-btn {
    width: 100%;
}

.account-primary-btn:hover,
.account-primary-link:hover,
.claim-profile-btn:hover {
    background: #090d0c;
    transform: translateY(-1px);
}

.account-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #506e68;
    font-size: 0.88rem;
    font-weight: 700;
}

.account-secondary-link:hover {
    color: #1f4e45;
}

.account-switch {
    margin: 22px 0 0;
    text-align: center;
    color: #777a76;
    font-size: 0.88rem;
}

.account-switch a {
    color: #456d65;
    font-weight: 700;
}

/* Dashboard */
.dashboard-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.dashboard-head h1 {
    margin: 5px 0 7px;
    font-size: 2rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.65fr);
    gap: 20px;
    align-items: start;
}

.dashboard-panel {
    padding: 22px;
    background: #fff;
    border: 1px solid #e8e6e0;
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(27, 35, 31, 0.04);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.panel-head h2 {
    margin: 0;
    font-size: 1.15rem;
}

.panel-head > span {
    min-width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #edf3f1;
    color: #547a72;
    font-size: 0.78rem;
    font-weight: 800;
}

.dashboard-provider-list,
.claims-list {
    display: grid;
    gap: 12px;
}

.dashboard-provider-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #eceae5;
    border-radius: 14px;
}

.dashboard-provider-card img {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    background: #f1f1ee;
}

.dashboard-provider-topline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #777b77;
    font-size: 0.75rem;
}

.dashboard-provider-card h3 {
    margin: 4px 0 2px;
    font-size: 1rem;
}

.dashboard-provider-card p {
    margin: 0;
    color: #81837f;
    font-size: 0.82rem;
}

.dashboard-actions {
    display: grid;
    gap: 6px;
    text-align: left;
}

.dashboard-actions a {
    color: #58746e;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.status-pill.published {
    background: #eaf6ef;
    color: #397156;
}

.status-pill.draft,
.status-pill.pending {
    background: #fff6df;
    color: #8a6d22;
}

.status-pill.rejected {
    background: #fff0f0;
    color: #984b4b;
}

.claim-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #efede8;
}

.claim-row:last-child {
    border-bottom: 0;
}

.claim-row strong,
.claim-row small {
    display: block;
}

.claim-row small {
    margin-top: 2px;
    color: #989995;
}

.dashboard-empty {
    padding: 30px 18px;
    text-align: center;
    border: 1px dashed #d8d8d2;
    border-radius: 14px;
}

.dashboard-empty h3 {
    margin: 0 0 6px;
}

.dashboard-empty p {
    margin: 0 0 18px;
    color: #7b7d79;
}

.dashboard-empty .account-primary-link,
.dashboard-empty .account-secondary-link {
    margin: 4px;
}

/* Provider editors */
.account-editor-layout {
    max-width: 980px;
}

.provider-editor-card {
    padding: 28px;
}

.editor-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid #efede8;
}

.editor-head h1 {
    margin: 5px 0 6px;
}

.provider-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 18px;
}

.form-span-2 {
    grid-column: 1 / -1;
}

.account-form ul[id$="_categories"],
.account-form ul[id$="_services"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 12px;
    list-style: none;
    border: 1px solid #e5e4df;
    border-radius: 11px;
    background: #fbfbf9;
}

.account-form ul[id$="_categories"] label,
.account-form ul[id$="_services"] label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    font-weight: 500;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
}

.form-actions .account-primary-btn {
    width: auto;
    min-width: 160px;
}

.opening-hours-editor {
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid #efede8;
}

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

.opening-hour-row {
    display: grid;
    grid-template-columns: 130px 115px 115px minmax(180px, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid #eceae5;
    border-radius: 12px;
    background: #fbfbf9;
}

.compact-field,
.note-field {
    margin: 0;
}

.delete-slot {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 46px;
    color: #9a5050;
    font-size: 0.78rem;
}

/* Claims */
.claim-provider-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    padding: 13px;
    border: 1px solid #e7e8e2;
    border-radius: 13px;
    background: #fafbf8;
}

.claim-provider-summary img {
    width: 62px;
    height: 62px;
    border-radius: 11px;
    object-fit: cover;
}

.claim-provider-summary strong,
.claim-provider-summary span,
.claim-provider-summary small {
    display: block;
}

.claim-provider-summary span,
.claim-provider-summary small {
    color: #7f817d;
    font-size: 0.8rem;
}

.claim-card {
    background: linear-gradient(145deg, #f3f7f5, #fff);
    border-color: #dbe7e3 !important;
}

.claim-card h3 {
    margin: 5px 0 7px;
}

.claim-profile-btn {
    width: 100%;
    margin-top: 12px;
}

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

    .opening-hour-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .note-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .account-page {
        padding: 30px 0 56px;
    }

    .auth-card,
    .claim-request-card,
    .provider-editor-card {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .dashboard-head,
    .editor-head {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-provider-card {
        grid-template-columns: 58px 1fr;
    }

    .dashboard-provider-card img {
        width: 58px;
        height: 58px;
    }

    .dashboard-actions {
        grid-column: 1 / -1;
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        text-align: right;
    }

    .provider-form-grid,
    .account-form ul[id$="_categories"],
    .account-form ul[id$="_services"] {
        grid-template-columns: 1fr;
    }

    .form-span-2 {
        grid-column: auto;
    }

    .opening-hour-row {
        grid-template-columns: 1fr 1fr;
    }

    .opening-hour-row .compact-field:first-of-type,
    .note-field,
    .delete-slot {
        grid-column: 1 / -1;
    }

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

    .form-actions .account-primary-btn {
        width: 100%;
    }
}
