:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #111827;
    --muted: #697386;
    --line: #e5e9ef;
    --primary: #185adb;
    --primary-dark: #1146ad;
    --success: #11875d;
    --warning: #b7791f;
    --danger: #c2414a;
    --radius: 20px;
    --shadow: 0 12px 36px rgba(17, 24, 39, .07);
    --nav-height: 76px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
a {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    border: 0;
}

.mobile-shell {
    width: 100%;
    min-height: 100vh;
    padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 18px);
}

.page {
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 20px 16px 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.brand-mini {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    background: var(--text);
    color: white;
    font-size: 15px;
    font-weight: 900;
}

.avatar {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    box-shadow: 0 5px 16px rgba(17, 24, 39, .06);
    color: var(--primary);
    font-weight: 900;
    text-transform: uppercase;
}

.hero {
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hero h1,
.page-title {
    margin: 0;
    font-size: clamp(27px, 7vw, 38px);
    line-height: 1.04;
    letter-spacing: -.035em;
}

.hero p,
.page-subtitle {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin: 28px 0 12px;
}

.section-head h2 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -.015em;
}

.section-head span {
    color: var(--muted);
    font-size: 12px;
}

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

.action-card {
    position: relative;
    display: flex;
    min-height: 145px;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.action-card:active {
    transform: scale(.985);
}

.action-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    background: #eef4ff;
    color: var(--primary);
}

.action-icon svg {
    width: 21px;
    height: 21px;
    stroke: currentColor;
}

.action-card.warning .action-icon {
    background: #fff7e6;
    color: var(--warning);
}

.action-card.success .action-icon {
    background: #eaf8f2;
    color: var(--success);
}

.action-card.danger .action-icon {
    background: #fff0f1;
    color: var(--danger);
}

.action-number {
    margin-top: 18px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.action-label {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.quick-panel,
.info-card {
    margin-top: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.quick-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.quick-copy strong {
    display: block;
    font-size: 14px;
}

.quick-copy span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.pill {
    flex: 0 0 auto;
    padding: 8px 11px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.bottom-nav-wrap {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    pointer-events: none;
}

.bottom-nav {
    display: grid;
    width: min(calc(100% - 8px), 700px);
    height: var(--nav-height);
    margin: 0 auto;
    grid-template-columns: repeat(5, 1fr);
    border: 1px solid rgba(229, 233, 239, .95);
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 15px 45px rgba(17, 24, 39, .14);
    backdrop-filter: blur(18px);
    pointer-events: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    color: #8791a2;
    font-size: 10px;
    font-weight: 750;
}

.nav-item svg {
    width: 21px;
    height: 21px;
    stroke: currentColor;
}

.nav-item.active {
    color: var(--primary);
}

.nav-dot {
    width: 4px;
    height: 4px;
    margin-top: -1px;
    border-radius: 50%;
    background: transparent;
}

.nav-item.active .nav-dot {
    background: var(--primary);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.back-link svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
}

.empty-state {
    display: grid;
    min-height: 280px;
    margin-top: 22px;
    place-items: center;
    padding: 28px;
    border: 1px dashed #ccd4df;
    border-radius: 24px;
    background: rgba(255, 255, 255, .58);
    text-align: center;
}

.empty-icon {
    display: grid;
    width: 66px;
    height: 66px;
    margin: 0 auto 16px;
    place-items: center;
    border-radius: 22px;
    background: #edf3ff;
    color: var(--primary);
}

.empty-icon svg {
    width: 29px;
    height: 29px;
    stroke: currentColor;
}

.empty-state h2 {
    margin: 0;
    font-size: 18px;
}

.empty-state p {
    max-width: 330px;
    margin: 8px auto 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.profile-card .avatar {
    width: 52px;
    height: 52px;
    box-shadow: none;
}

.profile-data {
    min-width: 0;
}

.profile-data strong,
.profile-data span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-data strong {
    font-size: 15px;
}

.profile-data span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.logout-button {
    width: 100%;
    margin-top: 14px;
    padding: 15px 18px;
    border: 1px solid #ffd8db;
    border-radius: 16px;
    background: #fff4f5;
    color: var(--danger);
    cursor: pointer;
    font-weight: 850;
}

/* LOGIN ------------------------------------------------------------- */

.auth-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 22px 16px;
    background:
        radial-gradient(circle at 20% 10%, rgba(24, 90, 219, .10), transparent 30%),
        radial-gradient(circle at 90% 90%, rgba(17, 135, 93, .08), transparent 34%),
        #f6f8fb;
}

.auth-wrap {
    width: min(100%, 430px);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.auth-brand .brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 15px;
}

.auth-brand strong {
    display: block;
    font-size: 15px;
}

.auth-brand span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
}

.auth-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 25px 70px rgba(17, 24, 39, .10);
}

.auth-card h1 {
    margin: 0;
    font-size: 28px;
    letter-spacing: -.035em;
}

.auth-card > p {
    margin: 8px 0 24px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.field {
    margin-top: 14px;
}

.field label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 850;
}

.field input {
    width: 100%;
    min-height: 50px;
    padding: 0 14px;
    outline: none;
    border: 1px solid #dce2ea;
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}

.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(24, 90, 219, .10);
}

.field input::placeholder {
    color: #a8b0bd;
}

.remember-row {
    display: flex;
    align-items: center;
    margin-top: 14px;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.remember-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.login-button {
    width: 100%;
    min-height: 52px;
    margin-top: 20px;
    border-radius: 15px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(24, 90, 219, .22);
}

.login-button:active {
    background: var(--primary-dark);
}

.errors {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #ffd1d5;
    border-radius: 13px;
    background: #fff3f4;
    color: #a72d38;
    font-size: 12px;
    line-height: 1.5;
}

.auth-footer {
    margin-top: 16px;
    color: #8b94a3;
    font-size: 11px;
    text-align: center;
}

@media (min-width: 640px) {
    .page {
        padding: 28px 24px 30px;
    }

    .action-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .action-card {
        min-height: 158px;
    }

    .auth-card {
        padding: 30px;
    }
}

/* ==================================================================
   SHIPPOW COMERCIAL 1A — CARTEIRA / CLIENTE 360
   ================================================================== */

.quick-panel-link {
    display: block;
    transition: transform .16s ease, border-color .16s ease;
}

.quick-panel-link:active {
    transform: scale(.992);
}

.page-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.round-add {
    display: grid;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 24px rgba(24, 90, 219, .22);
    font-size: 27px;
    font-weight: 400;
    line-height: 1;
}

.client-search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: 0 6px 20px rgba(17, 24, 39, .04);
}

.client-search svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    stroke: #8b95a6;
}

.client-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 14px;
}

.search-clear {
    display: grid;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: #eef1f5;
    color: #6b7482;
    font-size: 18px;
}

.filter-scroll {
    display: flex;
    gap: 8px;
    margin: 12px -16px 18px;
    padding: 0 16px 3px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: #667085;
    font-size: 11px;
    font-weight: 800;
}

.filter-chip strong {
    display: grid;
    min-width: 20px;
    height: 20px;
    place-items: center;
    padding: 0 5px;
    border-radius: 999px;
    background: #f0f2f5;
    color: #667085;
    font-size: 10px;
}

.filter-chip.active {
    border-color: #c9d7fb;
    background: #eef4ff;
    color: var(--primary);
}

.filter-chip.active strong {
    background: #dce7ff;
    color: var(--primary);
}

.filter-chip.warning.active {
    border-color: #f3ddb6;
    background: #fff8e9;
    color: #9a681a;
}

.filter-chip.warning.active strong {
    background: #f9eacb;
    color: #9a681a;
}

.filter-chip.danger.active {
    border-color: #f7cdd1;
    background: #fff1f2;
    color: var(--danger);
}

.filter-chip.danger.active strong {
    background: #ffe0e3;
    color: var(--danger);
}

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

.client-card {
    display: block;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(17, 24, 39, .045);
    transition: transform .14s ease, border-color .14s ease;
}

.client-card:active {
    transform: scale(.992);
}

.client-card-top {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.client-avatar,
.client-hero-avatar {
    display: grid;
    flex: 0 0 auto;
    width: 45px;
    height: 45px;
    place-items: center;
    border-radius: 14px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 15px;
    font-weight: 900;
}

.client-main {
    min-width: 0;
    flex: 1;
}

.client-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.client-title-row > strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.client-sub {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    color: #7b8594;
    font-size: 11px;
}

.client-meta svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
}

.client-arrow {
    flex: 0 0 auto;
    padding-top: 5px;
    color: #a0a8b5;
    font-size: 24px;
    line-height: 1;
}

.status-badge {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eff2f5;
    color: #697386;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .025em;
}

.status-badge.success {
    background: #eaf8f2;
    color: var(--success);
}

.status-badge.warning {
    background: #fff6e5;
    color: #9a681a;
}

.status-badge.danger {
    background: #fff0f1;
    color: var(--danger);
}

.status-badge.info {
    background: #edf3ff;
    color: var(--primary);
}

.client-card-bottom {
    display: grid;
    margin-top: 14px;
    padding-top: 12px;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    border-top: 1px solid #eef1f4;
}

.client-card-bottom span {
    min-width: 0;
}

.client-card-bottom small,
.client-card-bottom strong {
    display: block;
}

.client-card-bottom small {
    margin-bottom: 4px;
    color: #929baa;
    font-size: 9px;
}

.client-card-bottom strong {
    overflow: hidden;
    color: #344054;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-empty {
    margin-top: 16px;
}

.primary-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-top: 16px;
    padding: 0 16px;
    border-radius: 13px;
    background: var(--primary);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.simple-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 0 4px;
}

.simple-pager a {
    color: var(--primary);
    font-size: 12px;
    font-weight: 850;
}

/* FORM ------------------------------------------------------------- */

.client-form {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.form-card {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 8px 26px rgba(17, 24, 39, .045);
}

.form-section-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 16px;
}

.step-badge {
    display: grid;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: #edf3ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 900;
}

.form-section-title strong,
.form-section-title small {
    display: block;
}

.form-section-title strong {
    font-size: 14px;
}

.form-section-title small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.client-form .field {
    margin-top: 12px;
}

.client-form .field:first-of-type {
    margin-top: 0;
}

.client-form .field label {
    margin-bottom: 6px;
    color: #475467;
    font-size: 10px;
}

.client-form input,
.client-form select,
.note-form textarea {
    width: 100%;
    min-height: 48px;
    padding: 0 13px;
    outline: none;
    border: 1px solid #dde3ea;
    border-radius: 13px;
    background: #fbfcfd;
    color: var(--text);
    font: inherit;
    font-size: 13px;
}

.client-form input:focus,
.client-form select:focus,
.note-form textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(24, 90, 219, .08);
}

.client-form select {
    appearance: auto;
}

.form-grid-2,
.form-grid-city,
.form-grid-address {
    display: grid;
    gap: 10px;
}

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

.form-grid-city {
    grid-template-columns: minmax(0, 1fr) 76px;
}

.form-grid-address {
    grid-template-columns: minmax(0, 1fr) 82px;
}

.radar-help {
    margin-top: 14px;
    padding: 12px 13px;
    border-radius: 14px;
    background: #f6f8fb;
}

.radar-help strong,
.radar-help span {
    display: block;
}

.radar-help strong {
    color: #344054;
    font-size: 10px;
}

.radar-help span {
    margin-top: 4px;
    color: #7a8493;
    font-size: 10px;
    line-height: 1.5;
}

.form-errors {
    margin-top: 16px;
    padding: 13px 15px;
    border: 1px solid #ffd0d4;
    border-radius: 14px;
    background: #fff4f5;
    color: #a53640;
    font-size: 11px;
    line-height: 1.5;
}

.form-errors ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.form-errors.compact {
    margin-top: 10px;
}

.sticky-form-action {
    position: sticky;
    z-index: 10;
    bottom: calc(var(--nav-height) + 14px);
    padding: 8px 0 4px;
    background: linear-gradient(to top, var(--bg) 65%, transparent);
}

.save-client-button {
    width: 100%;
    min-height: 52px;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(24, 90, 219, .22);
    font-size: 13px;
    font-weight: 900;
}

/* CLIENT 360 ------------------------------------------------------- */

.client-hero {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 21px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.client-hero-head {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.client-hero-avatar {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    font-size: 18px;
}

.client-hero-copy {
    min-width: 0;
    flex: 1;
}

.client-status-line {
    margin-bottom: 5px;
}

.client-hero-copy h1 {
    margin: 0;
    font-size: 21px;
    line-height: 1.1;
    letter-spacing: -.025em;
}

.client-hero-copy p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.client-hero-location {
    display: block;
    margin-top: 7px;
    color: #7f8998;
    font-size: 10px;
}

.edit-client-link {
    flex: 0 0 auto;
    padding: 8px 10px;
    border-radius: 11px;
    background: #f2f5f8;
    color: #5d6776;
    font-size: 10px;
    font-weight: 850;
}

.success-toast {
    margin-top: 10px;
    padding: 11px 13px;
    border: 1px solid #c9eadf;
    border-radius: 13px;
    background: #edf9f4;
    color: #197454;
    font-size: 11px;
    font-weight: 750;
}

.client-kpis {
    display: grid;
    margin-top: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.client-kpis > div {
    min-height: 83px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--surface);
}

.client-kpis small,
.client-kpis strong {
    display: block;
}

.client-kpis small {
    color: #8a94a3;
    font-size: 9px;
}

.client-kpis strong {
    margin-top: 9px;
    font-size: 14px;
    letter-spacing: -.015em;
}

.client-section-head {
    margin-top: 22px;
}

.contact-card,
.location-card,
.client-action-list,
.note-form,
.timeline {
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(17, 24, 39, .04);
}

.contact-card {
    padding: 15px;
}

.contact-person span,
.contact-person strong {
    display: block;
}

.contact-person span {
    color: #8c95a3;
    font-size: 9px;
}

.contact-person strong {
    margin-top: 3px;
    font-size: 13px;
}

.contact-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.contact-action {
    display: inline-flex;
    min-height: 39px;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border-radius: 12px;
    background: #f2f5f8;
    color: #485466;
    font-size: 10px;
    font-weight: 900;
}

.contact-action.whatsapp {
    background: #eaf8f2;
    color: #167957;
}

.location-card {
    display: flex;
    gap: 12px;
    padding: 15px;
}

.location-pin {
    display: grid;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 13px;
    background: #edf3ff;
    color: var(--primary);
}

.location-pin svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
}

.location-card strong,
.location-card span {
    display: block;
}

.location-card strong {
    font-size: 12px;
}

.location-card span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.client-action-list {
    overflow: hidden;
}

.future-action {
    display: flex;
    min-height: 67px;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border-bottom: 1px solid #edf0f3;
}

.future-action:last-child {
    border-bottom: 0;
}

.future-action-icon {
    display: grid;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: #f0f4fb;
    color: var(--primary);
    font-size: 14px;
    font-weight: 900;
}

.future-action-icon.money-icon {
    font-size: 11px;
}

.future-action > div {
    min-width: 0;
    flex: 1;
}

.future-action strong,
.future-action small {
    display: block;
}

.future-action strong {
    font-size: 11px;
}

.future-action small {
    margin-top: 3px;
    color: #8a93a1;
    font-size: 9px;
}

.coming-pill {
    flex: 0 0 auto;
    padding: 6px 8px;
    border-radius: 999px;
    background: #f3f5f8;
    color: #929aa7;
    font-size: 8px;
    font-weight: 850;
}

.note-form {
    padding: 13px;
}

.note-form textarea {
    min-height: 86px;
    padding: 11px 12px;
    resize: vertical;
    line-height: 1.45;
}

.note-form button {
    width: 100%;
    min-height: 42px;
    margin-top: 8px;
    border-radius: 12px;
    background: var(--text);
    color: #fff;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
}

.timeline {
    margin-top: 10px;
    padding: 4px 14px;
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #edf0f3;
}

.timeline-item:last-child {
    border-bottom: 0;
}

.timeline-dot {
    width: 9px;
    height: 9px;
    margin-top: 4px;
    flex: 0 0 auto;
    border: 2px solid #c9d8fb;
    border-radius: 50%;
    background: #edf3ff;
}

.timeline-content {
    min-width: 0;
    flex: 1;
}

.timeline-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.timeline-head strong {
    color: #667085;
    font-size: 9px;
}

.note-delete {
    padding: 0;
    background: transparent;
    color: #aa5860;
    cursor: pointer;
    font-size: 8px;
    font-weight: 800;
}

.timeline-content p {
    margin: 6px 0 0;
    color: #344054;
    font-size: 11px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.timeline-content > small {
    display: block;
    margin-top: 6px;
    color: #a0a8b4;
    font-size: 8px;
}

.timeline-empty {
    padding: 18px 4px;
    color: #929baa;
    font-size: 10px;
    text-align: center;
}

@media (min-width: 540px) {
    .form-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .client-kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 640px) {
    .filter-scroll {
        margin-right: 0;
        margin-left: 0;
        padding-right: 0;
        padding-left: 0;
    }
}

/* SHIPPOW-COMMERCIAL-1B-START */

.money-number { font-size: 18px; line-height: 1.1; }

.sales-summary {
    display: grid;
    grid-template-columns: 1fr .72fr;
    gap: 10px;
    margin: 18px 0 12px;
}

.sales-summary > div {
    min-height: 84px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(17,24,39,.045);
}

.sales-summary small, .sales-summary strong { display: block; }
.sales-summary small { color: #8d96a4; font-size: 9px; }
.sales-summary strong { margin-top: 10px; font-size: 18px; letter-spacing: -.025em; }

.sales-search { margin-top: 8px; }
.sales-periods { margin-bottom: 17px; }
.sale-list { display: grid; gap: 9px; }

.sale-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(17,24,39,.045);
}

.sale-card-icon {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: #eaf8f2;
    color: var(--success);
    font-size: 10px;
    font-weight: 900;
}

.sale-card-main { min-width: 0; flex: 1; }
.sale-card-main strong, .sale-card-main span, .sale-card-value strong, .sale-card-value span { display: block; }
.sale-card-main strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sale-card-main span { margin-top: 4px; color: #8993a2; font-size: 9px; }
.sale-card-value { flex: 0 0 auto; text-align: right; }
.sale-card-value strong { font-size: 12px; }
.sale-card-value span { margin-top: 4px; color: var(--primary); font-size: 8px; font-weight: 850; }

.sales-empty { margin-top: 12px; }

.sale-form textarea {
    width: 100%;
    min-height: 86px;
    padding: 11px 12px;
    resize: vertical;
    outline: none;
    border: 1px solid #dde3ea;
    border-radius: 13px;
    background: #fbfcfd;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    line-height: 1.45;
}

.money-field {
    display: flex;
    align-items: center;
    min-height: 48px;
    overflow: hidden;
    border: 1px solid #dde3ea;
    border-radius: 13px;
    background: #fbfcfd;
}

.money-field > span {
    display: grid;
    align-self: stretch;
    place-items: center;
    padding: 0 11px;
    border-right: 1px solid #e3e7ec;
    background: #f1f4f7;
    color: #687385;
    font-size: 10px;
    font-weight: 900;
}

.client-form .money-field input {
    min-height: 46px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.active-action { color: inherit; }

.active-action-pill {
    flex: 0 0 auto;
    padding: 7px 9px;
    border-radius: 999px;
    background: #edf3ff;
    color: var(--primary);
    font-size: 8px;
    font-weight: 900;
}

.timeline-type {
    display: inline-flex;
    min-height: 21px;
    align-items: center;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
}

.sale-type { background: #eaf8f2; color: var(--success); }
.sale-dot { border-color: #b9e1d2; background: #eaf8f2; }

.timeline-sale-link {
    display: block;
    margin-top: 7px;
    padding: 10px 11px;
    border-radius: 12px;
    background: #f7faf9;
}

.timeline-sale-link strong, .timeline-sale-link span { display: block; }
.timeline-sale-link strong { color: #1c6d52; font-size: 13px; }
.timeline-sale-link span { margin-top: 4px; color: #7e8b86; font-size: 9px; }

.sale-success { margin: 0 0 10px; }

.sale-detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 21px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.sale-detail-hero h1 { margin: 2px 0 0; font-size: 28px; letter-spacing: -.04em; }
.sale-detail-hero p:last-child { margin: 7px 0 0; color: var(--muted); font-size: 10px; }

.sale-ok-badge {
    padding: 7px 9px;
    border-radius: 999px;
    background: #eaf8f2;
    color: var(--success);
    font-size: 8px;
    font-weight: 900;
}

.sale-client-card {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.sale-client-copy { min-width: 0; flex: 1; }
.sale-client-copy small, .sale-client-copy strong, .sale-client-copy span { display: block; }
.sale-client-copy small { color: #9099a7; font-size: 8px; }
.sale-client-copy strong { margin-top: 3px; font-size: 12px; }
.sale-client-copy span { margin-top: 3px; color: var(--muted); font-size: 9px; }

.sale-detail-items {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.sale-detail-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 13px 14px;
    border-bottom: 1px solid #edf0f3;
}

.sale-detail-item:last-child { border-bottom: 0; }
.sale-detail-item > div strong, .sale-detail-item > div span { display: block; }
.sale-detail-item > div strong { font-size: 11px; }
.sale-detail-item > div span { margin-top: 4px; color: #8993a2; font-size: 9px; }
.sale-detail-item > strong { font-size: 10px; }

.sale-no-items { margin-top: 0; color: #7b8594; font-size: 10px; }

.sale-note-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    color: #485466;
    font-size: 11px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.sale-total-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 12px;
    padding: 16px;
    border-radius: 18px;
    background: #111827;
    color: #fff;
}

.sale-total-footer span { color: #c9d0da; font-size: 9px; }
.sale-total-footer strong { font-size: 18px; }

/* SHIPPOW-COMMERCIAL-1B-END */

/* SHIPPOW-COMMERCIAL-1B-R1-START */

.field-help {
    display: block;
    margin-top: 6px;
    color: #8a94a3;
    font-size: 9px;
    line-height: 1.4;
}

.sale-items {
    display: grid;
    gap: 10px;
}

.sale-item-row {
    padding: 13px;
    border: 1px solid #e4e9ef;
    border-radius: 16px;
    background: #fafbfd;
}

.sale-item-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.sale-item-topline > strong {
    color: #667085;
    font-size: 9px;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.sale-item-row .field {
    margin-top: 0;
}

.sale-item-mini-grid {
    display: grid;
    grid-template-columns: .72fr 1fr;
    gap: 9px;
    margin-top: 9px;
}

.remove-sale-item {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    background: #fff0f1;
    color: var(--danger);
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
}

.sale-item-subtotal {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid #e9edf2;
}

.sale-item-subtotal span {
    color: #8a94a3;
    font-size: 9px;
}

.sale-item-subtotal strong {
    color: #344054;
    font-size: 11px;
}

.add-sale-item {
    width: 100%;
    min-height: 42px;
    margin-top: 10px;
    border: 1px dashed #c6d0dd;
    border-radius: 13px;
    background: #f7f9fb;
    color: #526071;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
}

.add-sale-item:active {
    background: #eef2f6;
}

.sale-live-total {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 11px;
    padding: 13px 14px;
    border: 1px solid #c9eadf;
    border-radius: 14px;
    background: #edf9f4;
}

.sale-live-total.active {
    display: flex;
}

.sale-live-total span {
    color: #4f7567;
    font-size: 9px;
    font-weight: 800;
}

.sale-live-total strong {
    color: #12704f;
    font-size: 16px;
    letter-spacing: -.025em;
}

.calculated-money-field {
    border-color: #bfe2d5;
    background: #f1faf6;
}

.client-form .money-field input.calculated-input {
    color: #146f51;
    cursor: default;
    font-weight: 900;
}

@media (max-width: 390px) {
    .sale-item-mini-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* SHIPPOW-COMMERCIAL-1B-R1-END */

/* SHIPPOW-COMMERCIAL-1B-R2-START */

.payment-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
}

.payment-option {
    position: relative;
    cursor: pointer;
}

.payment-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-option > span {
    display: block;
    min-height: 82px;
    padding: 13px;
    border: 1px solid #e0e5ec;
    border-radius: 15px;
    background: #fafbfd;
}

.payment-option strong,
.payment-option small {
    display: block;
}

.payment-option strong {
    font-size: 12px;
}

.payment-option small {
    margin-top: 5px;
    color: #8a94a3;
    font-size: 9px;
    line-height: 1.4;
}

.payment-option input:checked + span {
    border-color: #b9cdfd;
    background: #eef4ff;
    box-shadow: inset 0 0 0 1px #c9d8fb;
}

.payment-option input:checked + span strong {
    color: var(--primary);
}

.due-date-field[hidden] {
    display: none !important;
}

.receivable-section-head a,
.client-section-head > a {
    color: var(--primary);
    font-size: 10px;
    font-weight: 850;
}

.receivable-home-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.receivable-home-card {
    min-height: 92px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.receivable-home-card span,
.receivable-home-card strong,
.receivable-home-card small {
    display: block;
}

.receivable-home-card span {
    color: #7c8796;
    font-size: 8px;
    font-weight: 850;
}

.receivable-home-card strong {
    margin-top: 8px;
    font-size: 20px;
    letter-spacing: -.035em;
}

.receivable-home-card small {
    margin-top: 3px;
    color: #8f98a6;
    font-size: 8px;
}

.receivable-home-card.danger {
    border-color: #f5d0d4;
    background: #fff7f8;
}

.receivable-home-card.danger strong {
    color: var(--danger);
}

.receivable-home-card.warning {
    border-color: #f1dfbb;
    background: #fffaf0;
}

.receivable-home-card.warning strong {
    color: #a66d14;
}

.receivable-home-card.info {
    border-color: #d2defd;
    background: #f7f9ff;
}

.receivable-home-card.info strong {
    color: var(--primary);
}

.quick-panel-danger {
    border-color: #f3c9ce;
    background: #fff7f8;
}

.quick-panel-warning {
    border-color: #eedbb2;
    background: #fffaf1;
}

.payment-status-badge {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 24px;
    align-items: center;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef2f6;
    color: #677282;
    font-size: 8px;
    font-weight: 900;
}

.payment-status-badge.success {
    background: #eaf8f2;
    color: var(--success);
}

.payment-status-badge.warning {
    background: #fff6e5;
    color: #996515;
}

.payment-status-badge.danger {
    background: #fff0f1;
    color: var(--danger);
}

.payment-status-badge.info {
    background: #edf3ff;
    color: var(--primary);
}

.mini-payment-status {
    display: inline-flex !important;
    width: fit-content;
    margin-top: 4px;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 7px !important;
    font-weight: 900;
}

.mini-payment-status.success {
    background: #eaf8f2;
    color: var(--success);
}

.mini-payment-status.warning {
    background: #fff6e5;
    color: #996515;
}

.mini-payment-status.danger {
    background: #fff0f1;
    color: var(--danger);
}

.mini-payment-status.info {
    background: #edf3ff;
    color: var(--primary);
}

.sale-payment-card {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.sale-payment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sale-payment-head small,
.sale-payment-head strong {
    display: block;
}

.sale-payment-head small,
.sale-payment-grid small {
    color: #8c95a3;
    font-size: 8px;
}

.sale-payment-head strong {
    margin-top: 3px;
    font-size: 12px;
}

.sale-payment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #edf0f3;
}

.sale-payment-grid strong {
    display: block;
    margin-top: 4px;
    font-size: 10px;
}

.mark-paid-button,
.reopen-payment-button {
    width: 100%;
    min-height: 42px;
    margin-top: 13px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
}

.mark-paid-button {
    background: #eaf8f2;
    color: #176f53;
}

.reopen-payment-button {
    background: #f2f4f7;
    color: #667085;
}

.legacy-payment {
    color: #8892a1;
    font-size: 10px;
}

.client-payment-summary {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.client-payment-total {
    padding: 14px;
    background: #fafbfd;
    border-bottom: 1px solid #edf0f3;
}

.client-payment-total small,
.client-payment-total strong,
.client-payment-total span {
    display: block;
}

.client-payment-total small {
    color: #8b95a3;
    font-size: 8px;
}

.client-payment-total strong {
    margin-top: 5px;
    font-size: 18px;
}

.client-payment-total span {
    margin-top: 2px;
    color: #8b95a3;
    font-size: 8px;
}

.client-payment-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #edf0f3;
}

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

.client-payment-row > div {
    min-width: 0;
    flex: 1;
}

.client-payment-row > div > strong,
.client-payment-row > div > small {
    display: block;
}

.client-payment-row > div > strong {
    margin-top: 6px;
    font-size: 12px;
}

.client-payment-row > div > small {
    margin-top: 3px;
    color: #8c95a3;
    font-size: 8px;
}

.mini-paid-button {
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    background: #eaf8f2;
    color: #167356;
    cursor: pointer;
    font-size: 9px;
    font-weight: 900;
}

.client-payment-empty {
    padding: 16px 14px;
    color: #8d96a4;
    font-size: 9px;
    text-align: center;
}

.receivable-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin: 18px 0 12px;
}

.receivable-summary > div {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: var(--surface);
}

.receivable-summary > div.danger {
    border-color: #f3d0d4;
    background: #fff7f8;
}

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

.receivable-summary small {
    color: #8a94a3;
    font-size: 8px;
}

.receivable-summary strong {
    margin-top: 6px;
    font-size: 17px;
    letter-spacing: -.025em;
}

.receivable-summary span {
    margin-top: 3px;
    color: #8a94a3;
    font-size: 8px;
}

.receivable-summary .danger strong {
    color: var(--danger);
}

.receivable-list {
    display: grid;
    gap: 9px;
}

.receivable-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 22px rgba(17,24,39,.04);
}

.receivable-card-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.receivable-client {
    min-width: 0;
    flex: 1;
}

.receivable-client strong,
.receivable-client span {
    display: block;
}

.receivable-client strong {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.receivable-client span {
    margin-top: 4px;
    color: #8b95a3;
    font-size: 8px;
}

.receivable-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid #edf0f3;
}

.receivable-card-body small,
.receivable-card-body strong {
    display: block;
}

.receivable-card-body small {
    color: #8b95a3;
    font-size: 8px;
}

.receivable-card-body strong {
    margin-top: 4px;
    font-size: 11px;
}

.receivable-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    margin-top: 12px;
}

.receivable-card-actions > a,
.receivable-card-actions button {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 900;
}

.receivable-card-actions > a {
    background: #f2f5f8;
    color: #566171;
}

.receivable-card-actions button {
    border: 0;
    background: #eaf8f2;
    color: #176f53;
    cursor: pointer;
}

.receivable-card-actions button.secondary {
    background: #f2f4f7;
    color: #667085;
}

@media (max-width: 420px) {
    .receivable-home-grid {
        grid-template-columns: 1fr 1fr;
    }

    .receivable-home-card.info {
        grid-column: 1 / -1;
    }

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

/* SHIPPOW-COMMERCIAL-1B-R2-END */
