/* Authenticated Build.Voto workspace.
   This file is intentionally scoped so guest and generator pages keep their design. */

.is-authenticated {
    --auth-ink: #101828;
    --auth-muted: #526079;
    --auth-line: #d8e0ec;
    --auth-soft: #f5f8fd;
    --auth-blue: #1f5eff;
    --auth-blue-deep: #173ea8;
    --auth-blue-soft: #edf3ff;
    background: #f5f7fb;
}

.is-authenticated .topbar {
    height: 68px;
    min-height: 68px;
    background: rgba(255, 255, 255, .96);
    border-bottom-color: var(--auth-line);
    box-shadow: none;
}

.is-authenticated .topbar-inner,
.is-authenticated .shell {
    width: 100%;
    max-width: 1320px;
}

.is-authenticated .topbar-inner {
    padding-inline: 28px;
}

.is-authenticated .shell {
    padding: 28px 28px 64px;
}

.is-authenticated .brand-mark {
    width: 36px;
    height: 36px;
    box-shadow: none;
}

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

.is-authenticated .nav {
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.is-authenticated .nav::-webkit-scrollbar {
    display: none;
}

.is-authenticated .nav a:not(.btn) {
    min-height: 38px;
    padding: 9px 10px;
    white-space: nowrap;
}

.is-authenticated .nav .btn {
    min-height: 38px;
    padding: 9px 13px;
    white-space: nowrap;
}

.is-authenticated .card {
    border-color: var(--auth-line);
    background: #fff;
    box-shadow: none;
}

.is-authenticated .auth-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin: 0 0 24px;
    padding: 18px 0 26px;
    border-bottom: 1px solid var(--auth-line);
}

.is-authenticated .auth-hero-copy {
    min-width: 0;
    max-width: 760px;
}

.is-authenticated .auth-hero .pill {
    margin-bottom: 12px;
    border: 0;
    background: var(--auth-blue-soft);
    color: var(--auth-blue-deep);
}

.is-authenticated .auth-hero .page-title {
    max-width: 760px;
    margin-bottom: 10px;
    color: var(--auth-ink);
    font-size: 40px;
    line-height: 1.08;
    letter-spacing: -.025em;
    overflow-wrap: anywhere;
}

.is-authenticated .auth-hero .muted {
    margin: 0;
    max-width: 70ch;
    color: var(--auth-muted);
    line-height: 1.55;
}

.is-authenticated .auth-hero .status {
    margin-left: 8px;
    vertical-align: middle;
}

.is-authenticated .auth-hero-actions {
    flex: 0 1 460px;
    justify-content: flex-end;
    margin: 0;
}

.is-authenticated .auth-hero-actions .btn {
    min-height: 42px;
    padding: 10px 14px;
}

.is-authenticated.auth-route-api-access .shell > .hero,
.is-authenticated.auth-route-admin-bridge .shell > .hero,
.is-authenticated.auth-route-admin-api-docs .shell > .hero {
    margin-bottom: 22px;
    padding: 24px 0 26px;
    border-bottom: 1px solid var(--auth-line);
}

.is-authenticated.auth-route-api-access .shell > .hero .page-title,
.is-authenticated.auth-route-admin-bridge .shell > .hero .page-title,
.is-authenticated.auth-route-admin-api-docs .shell > .hero .page-title {
    max-width: 820px;
    font-size: 40px;
    line-height: 1.08;
}

.is-authenticated .dashboard-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    margin: 0 0 20px;
    overflow: hidden;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: #fff;
}

.is-authenticated .summary-card {
    min-height: 96px;
    padding: 18px;
    border: 0;
    border-right: 1px solid var(--auth-line);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
}

.is-authenticated .summary-card:last-child {
    border-right: 0;
}

.is-authenticated .summary-card:hover {
    border-color: var(--auth-line);
    background: #fff;
    box-shadow: none;
    transform: none;
}

.is-authenticated .summary-card span {
    color: var(--auth-muted);
    font-size: 12px;
    letter-spacing: .015em;
    text-transform: none;
}

.is-authenticated .summary-card strong {
    margin-top: 7px;
    color: var(--auth-ink);
    font-size: 28px;
}

.is-authenticated .dashboard-create-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 32px;
}

.is-authenticated .dashboard-create-option {
    position: relative;
    min-height: 78px;
    padding: 12px 34px 12px 12px;
    border-color: #c9d7f5;
    border-radius: 10px;
    background: var(--auth-blue-soft);
    box-shadow: none;
}

.is-authenticated .dashboard-create-option:after {
    content: "›";
    position: absolute;
    right: 13px;
    top: 50%;
    color: var(--auth-blue-deep);
    font-size: 24px;
    line-height: 1;
    transform: translateY(-50%);
}

.is-authenticated .dashboard-create-option:hover {
    border-color: var(--auth-blue);
    background: #fff;
    box-shadow: none;
    transform: translateY(-1px);
}

.is-authenticated .dashboard-create-icon {
    width: 40px;
    height: 40px;
    background: #fff;
    color: var(--auth-blue-deep);
}

.is-authenticated .dashboard-create-option strong {
    color: var(--auth-ink);
}

.is-authenticated .dashboard-create-option small {
    color: var(--auth-muted);
}

.is-authenticated .dashboard-projects-heading {
    align-items: end;
    margin-bottom: 18px;
    padding-top: 24px;
    border-top: 1px solid var(--auth-line);
}

.is-authenticated .dashboard-projects-heading .section-title {
    font-size: 24px;
}

.is-authenticated .project-filter input {
    min-height: 44px;
    background: #fff;
}

.is-authenticated .status-filter-row {
    gap: 6px;
}

.is-authenticated .project-status-button {
    min-height: 38px;
    border-radius: 7px;
    background: #fff;
}

.is-authenticated .project-status-button.active {
    border-color: var(--auth-blue-deep);
    background: var(--auth-blue-deep);
    box-shadow: none;
}

.is-authenticated .dashboard-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.is-authenticated .project-card {
    min-height: 100%;
    padding: 20px;
    border-radius: 12px;
}

.is-authenticated .project-card:hover {
    border-color: #9fb9ef;
    box-shadow: none;
    transform: translateY(-1px);
}

.is-authenticated .project-card h3 {
    font-size: 19px;
    line-height: 1.3;
}

.is-authenticated .project-card .muted {
    color: var(--auth-muted);
    overflow-wrap: anywhere;
}

.is-authenticated .project-meta {
    gap: 6px;
}

.is-authenticated .project-meta span {
    border-color: var(--auth-line);
    background: var(--auth-soft);
    color: var(--auth-muted);
}

.is-authenticated .project-card > p {
    margin: 0;
    color: var(--auth-muted);
}

.is-authenticated .project-card .quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: auto !important;
}

.is-authenticated .project-card .quick-links .btn {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 11px;
    font-size: 13px;
}

.is-authenticated .project-card .quick-links .btn:first-child {
    grid-column: 1 / -1;
}

.is-authenticated .project-workspace {
    grid-template-columns: minmax(280px, .58fr) minmax(0, 1.42fr);
    gap: 18px;
}

.is-authenticated .project-sidebar {
    position: sticky;
    top: 86px;
    align-self: start;
}

.is-authenticated .project-sidebar .card {
    padding: 18px;
    border-radius: 12px;
}

.is-authenticated .detail-list div {
    padding-bottom: 11px;
}

.is-authenticated .detail-list dt {
    color: var(--auth-muted);
    letter-spacing: .025em;
    text-transform: none;
}

.is-authenticated .detail-list dd {
    color: var(--auth-ink);
    line-height: 1.45;
}

.is-authenticated .activity-list {
    gap: 0;
}

.is-authenticated .activity-item {
    padding: 11px 0;
    border: 0;
    border-bottom: 1px solid var(--auth-line);
}

.is-authenticated .activity-item:last-child {
    border-bottom: 0;
}

.is-authenticated .project-editor {
    min-width: 0;
    padding: 20px;
    border-radius: 12px;
}

.is-authenticated .project-editor-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: -2px 0 18px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--auth-line);
}

.is-authenticated .project-editor-heading span {
    color: var(--auth-blue-deep);
    font-size: 12px;
    font-weight: 850;
}

.is-authenticated .project-editor-heading h2 {
    margin: 4px 0 3px;
    font-size: 23px;
    line-height: 1.25;
}

.is-authenticated .project-editor-heading p {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.5;
}

.is-authenticated .owner-tabs {
    position: sticky;
    top: 78px;
    z-index: 20;
    flex-wrap: nowrap;
    margin-bottom: 16px;
    overflow-x: auto;
    border-color: var(--auth-line);
    background: #f7f9fd;
    box-shadow: none;
    scrollbar-width: none;
}

.is-authenticated .owner-tabs::-webkit-scrollbar {
    display: none;
}

.is-authenticated .owner-tab {
    flex: 0 0 auto;
    color: var(--auth-muted);
}

.is-authenticated .owner-tab.active {
    background: var(--auth-blue-deep);
    box-shadow: none;
}

.is-authenticated .owner-option-map {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}

.is-authenticated .owner-option-card {
    position: relative;
    min-height: 78px;
    padding: 12px 34px 12px 12px;
    border-color: var(--auth-line);
    border-radius: 9px;
    background: #fff;
}

.is-authenticated .owner-option-card:after {
    content: "›";
    position: absolute;
    right: 13px;
    top: 50%;
    color: var(--auth-blue-deep);
    font-size: 22px;
    transform: translateY(-50%);
}

.is-authenticated .owner-option-card:hover {
    border-color: #9fb9ef;
    background: var(--auth-blue-soft);
    transform: none;
}

.is-authenticated .owner-option-card span {
    color: var(--auth-blue-deep);
    letter-spacing: .01em;
    text-transform: none;
}

.is-authenticated .owner-option-card strong {
    color: var(--auth-ink);
    font-size: 14px;
}

.is-authenticated .owner-section-heading {
    margin-top: 28px;
    padding: 18px 0 12px;
    border-top: 1px solid var(--auth-line);
}

.is-authenticated .owner-panel > .owner-section-heading:first-child,
.is-authenticated .owner-panel > form > .owner-section-heading:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.is-authenticated .label {
    color: #526079;
    letter-spacing: .035em;
}

.is-authenticated input,
.is-authenticated textarea,
.is-authenticated select {
    min-height: 46px;
    border-color: #c7d2df;
    background: #fff;
}

.is-authenticated textarea {
    min-height: 112px;
}

.is-authenticated input::placeholder,
.is-authenticated textarea::placeholder {
    color: #667085;
    opacity: 1;
}

.is-authenticated .settings-panel,
.is-authenticated .email-box,
.is-authenticated .service-row,
.is-authenticated .staff-form,
.is-authenticated .staff-account-card,
.is-authenticated .custom-service-panel {
    border-color: var(--auth-line);
    background: var(--auth-soft);
    box-shadow: none;
}

.is-authenticated .mobile-footer-icon {
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 15px;
    font-weight: 800;
}

@media (max-width: 1080px) {
    .is-authenticated .topbar-inner {
        padding-inline: 20px;
    }

    .is-authenticated .nav {
        gap: 4px;
    }

    .is-authenticated .nav a:not(.btn) {
        padding-inline: 8px;
        font-size: 13px;
    }

    .is-authenticated .dashboard-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .is-authenticated .summary-card:nth-child(3) {
        border-right: 0;
    }

    .is-authenticated .summary-card:nth-child(-n + 3) {
        border-bottom: 1px solid var(--auth-line);
    }

    .is-authenticated .dashboard-create-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .is-authenticated .auth-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .is-authenticated .auth-hero-actions {
        flex-basis: auto;
        justify-content: flex-start;
    }

    .is-authenticated .project-workspace {
        grid-template-columns: 1fr;
    }

    .is-authenticated .project-sidebar {
        position: static;
    }
}

@media (max-width: 760px) {
    .is-authenticated {
        background: #fff;
    }

    .is-authenticated .topbar {
        height: 64px;
        min-height: 64px;
    }

    .is-authenticated .topbar-inner {
        padding-inline: 14px;
    }

    .is-authenticated .brand {
        gap: 9px;
    }

    .is-authenticated .brand-mark {
        width: 34px;
        height: 34px;
    }

    .is-authenticated .brand-subtitle {
        display: none;
    }

    .is-authenticated .shell {
        padding: 0 14px 126px;
    }

    .is-authenticated .auth-hero {
        gap: 16px;
        margin: 0 -14px 18px;
        padding: 24px 14px 20px;
        background: var(--auth-soft);
    }

    .is-authenticated.auth-route-api-access .shell > .hero,
    .is-authenticated.auth-route-admin-bridge .shell > .hero,
    .is-authenticated.auth-route-admin-api-docs .shell > .hero {
        margin: 0 -14px 18px;
        padding: 24px 14px 20px;
        background: var(--auth-soft);
    }

    .is-authenticated.auth-route-api-access .shell > .hero .page-title,
    .is-authenticated.auth-route-admin-bridge .shell > .hero .page-title,
    .is-authenticated.auth-route-admin-api-docs .shell > .hero .page-title {
        font-size: 30px;
    }

    .is-authenticated .auth-hero .pill {
        margin-bottom: 10px;
    }

    .is-authenticated .auth-hero .page-title {
        max-width: 100%;
        font-size: 30px;
        line-height: 1.12;
    }

    .is-authenticated .auth-hero .muted {
        font-size: 14px;
    }

    .is-authenticated .auth-hero .status {
        margin: 8px 0 0;
    }

    .is-authenticated .auth-hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
    }

    .is-authenticated .auth-hero-actions .btn,
    .is-authenticated .auth-hero-actions button {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 9px;
        font-size: 13px;
    }

    .is-authenticated .auth-hero-actions .btn:first-child {
        grid-column: 1 / -1;
    }

    .is-authenticated .dashboard-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 18px;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .is-authenticated .summary-card,
    .is-authenticated .summary-card:nth-child(-n + 3) {
        min-height: 82px;
        padding: 13px;
        border: 1px solid var(--auth-line);
        border-radius: 9px;
        background: #fff;
    }

    .is-authenticated .summary-card:last-child {
        grid-column: 1 / -1;
    }

    .is-authenticated .summary-card strong {
        font-size: 24px;
    }

    .is-authenticated .dashboard-create-grid,
    .is-authenticated .dashboard-create-grid:last-child {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 26px;
    }

    .is-authenticated .dashboard-create-option {
        grid-template-columns: 34px minmax(0, 1fr);
        min-height: 70px;
        padding: 10px 27px 10px 9px;
    }

    .is-authenticated .dashboard-create-icon {
        width: 34px;
        height: 34px;
    }

    .is-authenticated .dashboard-create-option strong {
        font-size: 14px;
    }

    .is-authenticated .dashboard-create-option small {
        font-size: 11px;
    }

    .is-authenticated .dashboard-projects-heading {
        gap: 14px;
        padding-top: 20px;
    }

    .is-authenticated .project-filter {
        gap: 8px;
        width: 100%;
    }

    .is-authenticated .status-filter-row {
        margin-inline: -14px;
        padding: 0 14px 3px;
    }

    .is-authenticated .dashboard-project-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .is-authenticated .project-card {
        padding: 16px;
    }

    .is-authenticated .project-card .quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .is-authenticated .project-workspace {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .is-authenticated .project-editor {
        order: 1;
        margin-inline: -14px;
        padding: 18px 14px 22px;
        border-inline: 0;
        border-radius: 0;
    }

    .is-authenticated .project-sidebar {
        order: 2;
    }

    .is-authenticated .project-sidebar .card {
        padding: 16px;
    }

    .is-authenticated .project-editor-heading {
        margin-bottom: 14px;
        padding-bottom: 14px;
    }

    .is-authenticated .project-editor-heading h2 {
        font-size: 21px;
    }

    .is-authenticated .owner-tabs {
        display: none;
    }

    .is-authenticated .owner-mobile-tab-select {
        position: sticky;
        top: 72px;
        z-index: 22;
        display: block;
        min-height: 48px;
        margin: 0 0 12px;
        border-color: #9fb9ef;
        background: #fff;
        color: var(--auth-blue-deep);
        font-weight: 800;
    }

    .is-authenticated .owner-option-map {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(205px, 74vw);
        grid-template-columns: none;
        gap: 8px;
        margin-inline: -14px;
        padding: 0 14px 5px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }

    .is-authenticated .owner-option-map::-webkit-scrollbar {
        display: none;
    }

    .is-authenticated .owner-option-card {
        min-height: 74px;
        scroll-snap-align: start;
    }

    .is-authenticated .owner-section-heading {
        margin-top: 24px;
        padding-top: 16px;
    }

    .is-authenticated .form-row,
    .is-authenticated .toggle-grid,
    .is-authenticated .option-grid,
    .is-authenticated .media-row-grid,
    .is-authenticated .email-dashboard,
    .is-authenticated .staff-permission-grid {
        grid-template-columns: 1fr;
    }

    .is-authenticated input,
    .is-authenticated textarea,
    .is-authenticated select,
    .is-authenticated button {
        font-size: 16px;
    }

    .is-authenticated .mobile-footer-nav {
        grid-template-columns: none !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(66px, 1fr);
        gap: 2px;
        max-width: calc(100vw - 16px);
        padding: 6px;
        overflow-x: auto;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(16, 32, 61, .14);
        scrollbar-width: none;
    }

    .is-authenticated .mobile-footer-nav::-webkit-scrollbar {
        display: none;
    }

    .is-authenticated .mobile-footer-link {
        min-height: 58px;
        padding: 5px 3px;
        font-size: 10px;
    }

    .is-authenticated .mobile-footer-icon {
        width: 28px;
        height: 28px;
        font-size: 15px;
    }

    .is-authenticated .whatsapp-support {
        right: 12px;
        bottom: calc(max(8px, env(safe-area-inset-bottom)) + 82px);
    }
}

@media (max-width: 390px) {
    .is-authenticated .dashboard-create-grid,
    .is-authenticated .dashboard-create-grid:last-child {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .is-authenticated .project-card .quick-links {
        grid-template-columns: 1fr;
    }

    .is-authenticated .project-card .quick-links .btn:first-child {
        grid-column: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .is-authenticated *,
    .is-authenticated *:before,
    .is-authenticated *:after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
