@import url('https://fonts.googleapis.com/css2?family=Play:wght@400;700&display=swap');

:root {
    --bg: #f2f6ff;
    --bg-soft: #eaf0fb;
    --card: #ffffff;
    --card-border: #dbe6f8;
    --text: #1a2e49;
    --muted: #6c809f;
    --accent: #2f7df6;
    --accent-2: #5aa6ff;
    --ok: #2dbd75;
    --warn: #ff9d42;
}

* { box-sizing: border-box; }

html,
body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100%;
}

body {
    font-family: 'Play', sans-serif;
    color: var(--text);
    background:
        radial-gradient(1000px 420px at 0% -10%, #dfeaff 0%, transparent 60%),
        radial-gradient(800px 420px at 100% 0%, #e7f3ff 0%, transparent 58%),
        var(--bg);
}

.pulse-app {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0 !important;
    padding: 0 !important;
}

.pulse-sidebar {
    background: linear-gradient(180deg, #1f57b8 0%, #1a4da8 52%, #163f8c 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    padding: 0 18px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 100dvh;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pulse-brand {
    display: flex;
    gap: 10px;
    align-items: center;
    text-decoration: none;
    color: #f4f8ff;
    margin-top: 25px;
}

.pulse-logo {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
}

.pulse-brand strong { display: block; font-size: 14px; }
.pulse-brand small { color: rgba(233, 242, 255, 0.82); font-size: 12px; }

.pulse-nav { display: grid; gap: 6px; }

.pulse-nav-link {
    text-decoration: none;
    color: rgba(241, 247, 255, 0.95);
    font-weight: 700;
    border-radius: 12px;
    padding: 11px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pulse-nav-link:hover { background: rgba(255, 255, 255, 0.12); }
.pulse-nav-link.active {
    color: #fff;
    background: linear-gradient(145deg, #4b93ff, #66a7ff);
    box-shadow: 0 12px 24px rgba(9, 32, 77, 0.35);
}

.pulse-setup {
    margin-top: auto;
    text-decoration: none;
    background: rgba(10, 29, 66, 0.85);
    color: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    font-weight: 700;
    display: flex;
    gap: 8px;
    align-items: center;
}

.pulse-userbox {
    margin-top: 6px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
}

.pulse-userbox-name {
    font-weight: 800;
    font-size: 13px;
    color: #203a5d;
}

.pulse-userbox-role {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.pulse-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: #345072;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background:
        radial-gradient(960px 420px at 0% -10%, #e6efff 0%, transparent 62%),
        radial-gradient(760px 420px at 100% 0%, #edf4ff 0%, transparent 58%),
        #eef3fc;
}

.login-shell {
    width: min(1280px, 100%);
    min-height: min(760px, calc(100vh - 28px));
    display: grid;
    grid-template-columns: 1.25fr 0.95fr;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid #dce6f8;
    box-shadow: 0 26px 65px rgba(37, 63, 109, 0.14);
    background: #ffffff;
}

.login-visual {
    position: relative;
    background: linear-gradient(160deg, #f8fbff 0%, #edf4ff 100%);
    overflow: hidden;
}

.login-image-side {
    position: relative;
    background: linear-gradient(160deg, #f8fbff 0%, #edf4ff 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.login-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.login-visual-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(129, 156, 206, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(129, 156, 206, 0.08) 1px, transparent 1px);
    background-size: 44px 44px;
}

.login-visual-card {
    position: absolute;
    border: 1px solid #dbe7fa;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f4f8ff);
    box-shadow: 0 18px 36px rgba(40, 74, 133, 0.16);
}

.login-visual-main {
    width: min(60%, 520px);
    aspect-ratio: 1.45 / 1;
    left: 14%;
    top: 24%;
    transform: rotate(-6deg);
}

.login-visual-screen {
    position: absolute;
    left: 11%;
    right: 11%;
    top: 14%;
    bottom: 30%;
    border-radius: 14px;
    border: 1px solid #dbe8fb;
    background: linear-gradient(150deg, #ffffff 0%, #eef5ff 100%);
}

.login-visual-bar {
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 14%;
    height: 16%;
    border-radius: 12px;
    background: linear-gradient(90deg, #2f7df6, #67b3ff);
}

.login-visual-side {
    width: min(24%, 200px);
    aspect-ratio: 1 / 1.3;
    right: 15%;
    top: 31%;
}

.login-visual-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(145deg, #2f7df6, #6cb7ff);
    position: absolute;
    right: 12%;
    bottom: 24%;
}

.login-panel {
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 42px;
}

.login-panel-inner {
    width: min(440px, 100%);
}

.login-title {
    margin: 0 0 10px;
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 800;
    color: #1a2e49;
}

.login-subtitle {
    margin: 0 0 24px;
    color: #6f84a5;
    font-size: 15px;
}

.login-panel .form-label {
    color: #6680a3;
    font-weight: 700;
    margin-bottom: 8px;
}

.login-panel .form-control {
    border-color: #d8e6fb;
    border-radius: 12px;
}

.login-panel .form-control:focus {
    border-color: #7eaefb;
    box-shadow: 0 0 0 0.2rem rgba(47, 125, 246, 0.14);
}

.login-panel .btn {
    border-radius: 12px;
    font-weight: 700;
}

@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-visual {
        min-height: 220px;
    }

    .login-panel {
        padding: 30px 20px;
    }

    .login-title {
        font-size: 30px;
    }
}

.pulse-main { padding: 16px; }

.pulse-topbar {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(5px);
    border-radius: 18px;
    padding: 12px 14px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: center;
}

.menu-btn {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 10px;
    background: #edf4ff;
    color: #21436e;
    display: none;
}

.pulse-title h1 {
    margin: 0;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
}

.pulse-title p { margin: 0; color: var(--muted); font-size: 13px; }

.pulse-tools { display: flex; align-items: center; gap: 8px; }

.tool-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--card-border);
    background: #fff;
    border-radius: 10px;
    color: #416187;
}

.user-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffd0a9, #b86a4d);
    border: 2px solid #fff;
}

.pulse-content { margin-top: 12px; }

.card,
.kanban-col {
    border: 1px solid var(--card-border);
    border-radius: 16px;
    background: var(--card);
    box-shadow: 0 6px 20px rgba(29, 61, 108, 0.06);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #e6eefc;
    font-weight: 700;
    color: #1f3a5a;
}

.table thead th {
    color: #7590b5;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom-color: #e6eefc;
}

.table td { border-bottom-color: #edf3ff; }

/* Make lists/tables/cards feel more modern */
.table > :not(caption) > * > * { padding: 12px 14px; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: #f6faff; }

.card.h-100,
.card.mb-3,
.card {
    overflow: hidden;
}

.card-header {
    padding: 12px 14px;
}

.card .table thead th:first-child,
.card .table tbody td:first-child { padding-left: 16px; }
.card .table thead th:last-child,
.card .table tbody td:last-child { padding-right: 16px; }

.badge.text-bg-secondary {
    border-radius: 999px;
    font-weight: 800;
}

/* Responsive table cards only for tables explicitly marked as mobile cards */
@media (max-width: 700px) {
    .table-responsive {
        border-radius: 16px;
        overflow-x: auto;
    }

    .table.table-mobile-cards thead { display: none; }
    .table.table-mobile-cards tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 12px;
        padding: 12px;
        border-bottom: 1px solid #edf3ff;
    }
    .table.table-mobile-cards tbody td {
        border: 0;
        padding: 0;
    }
    .table.table-mobile-cards tbody td::before {
        content: attr(data-label);
        display: block;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .03em;
        color: #7b93b5;
        margin-bottom: 2px;
        font-weight: 800;
    }
}

.form-label, .text-muted, small { color: var(--muted) !important; }

.form-control,
.form-select,
textarea {
    border: 1px solid #cfddf4 !important;
    border-radius: 11px !important;
    background: #f9fbff !important;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: #8eb8ff !important;
    box-shadow: 0 0 0 .2rem rgba(47,125,246,.12) !important;
}

.btn-primary {
    background: linear-gradient(145deg, #2f7df6, #4f95ff);
    border: 0;
    border-radius: 11px;
    font-weight: 700;
}

.btn-primary.btn-sm {
    padding: 0.5rem 1.2rem !important;
    white-space: nowrap;
}

.badge.text-bg-secondary {
    background: #e8f1ff !important;
    color: #2f6fcb !important;
    border: 1px solid #c8dcff;
}

.kpi-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.pulse-highlight-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 12px;
}

.ph-card {
    position: relative;
    border-radius: 18px;
    border: 1px solid var(--card-border);
    background: #fff;
    padding: 16px;
    min-height: 162px;
    box-shadow: 0 8px 24px rgba(30, 65, 116, 0.07);
}

.ph-card-blue {
    background: linear-gradient(145deg, #2f6feb, #4c8bff);
    color: #fff;
    border-color: transparent;
}

.ph-card-red {
    background: linear-gradient(145deg, #db4d4d, #ef6a6a);
    color: #fff;
    border-color: transparent;
}

.ph-title {
    font-size: 15px;
    color: #6d819f;
    font-weight: 700;
}

.ph-card-blue .ph-title,
.ph-card-blue .ph-sub {
    color: rgba(255, 255, 255, 0.86);
}

.ph-card-red .ph-title,
.ph-card-red .ph-sub {
    color: rgba(255, 255, 255, 0.9);
}

.ph-value {
    margin-top: 8px;
    font-size: clamp(28px, 2.3vw, 42px);
    font-weight: 800;
    line-height: 1.05;
}

.ph-sub {
    margin-top: 12px;
    color: #7a8da8;
    font-size: 14px;
}

.ph-chip {
    margin-top: 10px;
    display: inline-block;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #2f7df6;
    background: #edf4ff;
}

.ph-chip-warn {
    color: #e46060;
    background: #ffecec;
}

.ph-arrow {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #edf3ff;
    color: #2f7df6;
    text-decoration: none;
    font-weight: 800;
}

.ph-card-blue .ph-arrow {
    background: rgba(255, 255, 255, 0.88);
}

.ph-card-red .ph-arrow {
    background: rgba(255, 255, 255, 0.9);
    color: #d64545;
}

.ph-card-line::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    height: 22px;
    background:
        linear-gradient(135deg, transparent 0 3%, #2f6feb 3% 6%, transparent 6% 100%),
        linear-gradient(90deg, #2f6feb, #2f6feb);
    background-size: 90px 22px, calc(100% - 90px) 4px;
    background-position: 0 0, 90px 18px;
    background-repeat: no-repeat;
}

.kpi-card {
    background: linear-gradient(160deg, #ffffff, #f4f8ff);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 14px;
}

.kpi-card span {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.kpi-card strong {
    margin-top: 6px;
    display: block;
    font-size: clamp(24px, 2.8vw, 34px);
}

.widget-card {
    min-height: 290px;
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: 0 6px 20px rgba(29, 61, 108, 0.06);
}

.widget-card .card-body {
    padding: 16px;
}

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

.widget-head h5 {
    margin: 0;
    font-weight: 800;
}

.widget-tabs {
    background: #edf2fa;
    border: 1px solid #d6e1f3;
    border-radius: 12px;
    padding: 3px;
    display: inline-flex;
    gap: 4px;
}

.widget-tabs button {
    border: 0;
    background: transparent;
    color: #4f6283;
    border-radius: 9px;
    padding: 6px 11px;
    font-size: 13px;
    font-weight: 700;
}

.widget-tabs a {
    border: 0;
    background: transparent;
    color: #4f6283;
    border-radius: 9px;
    padding: 6px 11px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
}

.widget-tabs button.active {
    background: #fff;
    color: #2f7df6;
    box-shadow: 0 3px 8px rgba(47, 125, 246, 0.16);
}

.widget-tabs a.active {
    background: #fff;
    color: #2f7df6;
    box-shadow: 0 3px 8px rgba(47, 125, 246, 0.16);
}

.order-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.order-metrics strong {
    font-size: 36px;
    line-height: 1;
    display: block;
}

.order-metrics span {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 14px;
}

.order-chart {
    height: 148px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 6px;
}

.order-bar-wrap {
    flex: 1 1 0;
    min-width: 8px;
    display: flex;
    justify-content: center;
    align-items: end;
    height: 140px;
}

.order-bar {
    width: min(16px, 100%);
    height: 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, #94b3ff 0%, #2f7df6 56%, #1f5cdc 100%);
}

.order-days {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    gap: 6px;
    color: #7d8faa;
    font-size: 11px;
}

.order-days span {
    flex: 1 1 0;
    text-align: center;
    white-space: nowrap;
}

.progress {
    height: 10px;
    background: #e9f1ff;
    border-radius: 999px;
}

.progress-bar {
    border-radius: 999px;
    background: linear-gradient(90deg, #2f7df6, #5ba9ff);
}

.latest-orders-scroll {
    max-height: 336px;
    overflow-y: auto;
}

.user-tasks-scroll {
    max-height: 248px;
    overflow-y: auto;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(220px, 1fr));
    gap: 10px;
}

.kanban-col { padding: 10px; min-height: 280px; }

.settings-tab {
    display: none;
}

.settings-tab.active {
    display: block;
}

.integration-pane {
    display: none;
}

.integration-pane.active {
    display: block;
}

.price-config-grid {
    background: linear-gradient(180deg, #f8fbff, #f4f8ff);
    border: 1px solid #e0e9f8;
    border-radius: 14px;
    padding: 10px;
}

.price-items-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-items-head h6 {
    font-weight: 800;
}

.price-add-card {
    border-color: #cfe0fb;
    box-shadow: 0 10px 20px rgba(33, 72, 130, 0.06);
}

.price-add-card .card-header {
    background: linear-gradient(180deg, #f9fcff, #f1f6ff);
}

.price-items-table-wrap {
    border: 1px solid #dce8fb;
    border-radius: 14px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.price-items-table {
    margin: 0;
}

.price-items-table thead th {
    position: sticky;
    top: 0;
    background: #f6f9ff;
    z-index: 1;
}

.price-item-row {
    padding: 8px;
    border-radius: 12px;
}

.price-item-row .form-control {
    background: #fff !important;
}

.drag-handle {
    cursor: grab;
    color: #6d819f;
    margin-right: 6px;
    font-size: 14px;
}

.client-field-row.dragging {
    opacity: .55;
}

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

.client-item-card {
    display: block;
    border: 1px solid #dce6f7;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
    text-decoration: none;
    color: #1a2e49;
}

.client-item-card:hover {
    background: #f8fbff;
}

.client-item-name {
    font-weight: 800;
    margin-bottom: 6px;
}

.client-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.client-tag-chip {
    --tag-color: #2f7df6;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--tag-color);
    background: color-mix(in srgb, var(--tag-color) 14%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--tag-color) 35%, #dbe6f8);
}

.client-tag-chip-new {
    --tag-color: #ff6a3d;
}

.client-item-meta {
    color: #5f7494;
    font-size: 13px;
}

.client-page-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.client-info-col {
    position: sticky;
    top: 16px;
}

.client-info-card .card-body {
    padding: 14px;
}

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

.client-info-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 14px;
}

.client-info-row span {
    color: #6d819f;
}

.client-info-row strong {
    text-align: right;
    font-weight: 700;
}

.client-tabs-col {
    min-width: 0;
}

.client-edit-form .form-label {
    font-size: 12px;
    font-weight: 700;
    color: #6d819f !important;
}

.client-order-form .form-label {
    font-size: 12px;
    font-weight: 700;
    color: #6d819f !important;
    margin-bottom: 6px;
}

.client-order-form .form-control[readonly] {
    background: #f3f7ff;
    color: #2c4f7c;
    font-weight: 700;
}

.icon-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    line-height: 1;
}

.client-head-actions {
    background: #edf2fa;
    border: 1px solid #d6e1f3;
    border-radius: 12px;
    padding: 3px;
    gap: 4px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.client-head-actions form {
    margin: 0;
    display: flex;
    align-items: center;
}

.client-action-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 9px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    line-height: 1;
    border: 1px solid transparent !important;
    transition: all .16s ease;
    flex-shrink: 0;
}

.client-action-btn i {
    display: block;
    font-size: 15px;
    line-height: 1;
    margin: 0;
    pointer-events: none;
}

.client-action-btn-edit {
    background: #fff !important;
    border-color: #cfdcf2 !important;
    color: #2f7df6 !important;
    box-shadow: 0 3px 8px rgba(47, 125, 246, 0.16);
}

.client-action-btn-back {
    background: transparent !important;
    border-color: #ccd9ef !important;
    color: #4e678a !important;
}

.client-action-btn-delete {
    background: #fff !important;
    border-color: #f2c0c0 !important;
    color: #df4d4d !important;
}

.client-action-btn:hover {
    transform: translateY(-1px);
}

.client-action-btn-back:hover {
    background: #fff !important;
    color: #2f7df6 !important;
    border-color: #cfdcf2 !important;
}

.client-action-btn-delete:hover {
    background: #fff3f3 !important;
    border-color: #e98f8f !important;
    color: #ca3030 !important;
}

/* Client detail page — enhanced layout & tabs */
.client-page-layout {
    gap: 20px;
}

.client-info-card {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 32px rgba(29, 61, 108, 0.1);
}

.client-info-card::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.client-info-card .card-body {
    padding: 18px;
}

.client-profile-head {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.client-card-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.client-card-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.client-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(145deg, var(--accent), var(--accent-2));
    box-shadow: 0 6px 16px rgba(47, 125, 246, 0.28);
}

.client-info-card h4,
.client-card-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.35;
    word-break: break-word;
}

.client-info-list {
    gap: 0;
    border-radius: 12px;
    border: 1px solid #e8f0fc;
    overflow: hidden;
    background: #f8fbff;
    margin-top: 4px;
}

.client-info-row {
    padding: 10px 14px;
    border-bottom: 1px solid #e8f0fc;
    align-items: center;
}

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

.client-info-row span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.client-info-row strong {
    font-size: 14px;
    color: var(--text);
    max-width: 58%;
    word-break: break-word;
}

.client-tabs-nav {
    background: #edf2fa;
    border: 1px solid #d6e1f3;
    border-radius: 14px;
    padding: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 0 !important;
    margin-bottom: 16px !important;
}

.client-tabs-nav .nav-item {
    margin: 0;
}

.client-tabs-nav .nav-link {
    border: 0 !important;
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    color: #4f6283;
    transition: all .16s ease;
}

.client-tabs-nav .nav-link:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.6);
    isolation: isolate;
}

.client-tabs-nav .nav-link.active {
    background: #fff;
    color: var(--accent);
    box-shadow: 0 3px 10px rgba(47, 125, 246, 0.18);
}

.client-tabs-col > .card {
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(29, 61, 108, 0.07);
}

.client-tabs-col .card-header {
    padding: 14px 18px;
    font-size: 14px;
    background: linear-gradient(180deg, #fafcff 0%, #fff 100%);
}

.client-tabs-col .card-body {
    padding: 16px 18px;
}

.client-comment-form textarea {
    border-radius: 12px;
    border-color: #d6e4f8;
    resize: vertical;
    min-height: 100px;
    transition: border-color .15s, box-shadow .15s;
}

.client-comment-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 125, 246, 0.12);
}

.client-comment-item {
    padding: 14px 16px;
    border-radius: 12px;
    background: #f8fbff;
    border: 1px solid #e8f0fc;
    margin-bottom: 10px;
}

.client-comment-item:last-child {
    margin-bottom: 0;
}

.client-comment-item p,
.client-comment-item .client-comment-text {
    margin: 0;
    line-height: 1.55;
    color: var(--text);
}

.client-comment-item small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
}

.client-empty-state {
    text-align: center;
    padding: 36px 20px;
    color: var(--muted);
    font-size: 14px;
}

.client-empty-state i {
    font-size: 34px;
    opacity: 0.4;
    display: block;
    margin-bottom: 10px;
    color: var(--accent);
}

.client-feed-item {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e8f0fc;
    background: #fff;
    margin-bottom: 8px;
    transition: background .15s ease;
}

.client-feed-item:last-child {
    margin-bottom: 0;
}

.client-feed-item:hover {
    background: #f8fbff;
}

.client-feed-item .badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
}

.client-task-item {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #e8f0fc;
    background: #fff;
    margin-bottom: 8px;
    transition: background .15s ease;
}

.client-task-item:last-child {
    margin-bottom: 0;
}

.client-task-item:hover {
    background: #f8fbff;
}

.client-activity-form .form-control {
    border-radius: 12px;
    border-color: #d6e4f8;
}

.client-activity-form .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 125, 246, 0.12);
}

.pulse-overlay { display: none; }

@media (max-width: 1200px) {
    .pulse-highlight-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
    .kpi-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
    .kanban-board { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
    .order-metrics { grid-template-columns: 1fr; }
    .client-page-layout { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); }
}

@media (max-width: 980px) {
    .client-card-grid { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
}

@media (max-width: 980px) {
    .pulse-app { grid-template-columns: 1fr; }
    .menu-btn { display: inline-grid; place-items: center; }

    .pulse-sidebar {
        position: fixed;
        left: 0;
        top: 0 !important;
        bottom: 0;
        z-index: 1050;
        width: min(84vw, 300px);
        transform: translateX(-112%);
        transition: transform .22s ease;
        height: 100dvh;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
        margin: 0 !important;
        padding-top: 0 !important;
    }

    body.pulse-open .pulse-sidebar { transform: translateX(0); }

    .pulse-overlay {
        position: fixed;
        inset: 0;
        background: rgba(16, 28, 46, 0.32);
        z-index: 1040;
    }

    body.pulse-open .pulse-overlay { display: block; }
}

@media (max-width: 700px) {
    .pulse-main { padding: 10px; }
    .pulse-content { margin-top: 8px; }
    .card { border-radius: 14px; }
    .card-header { padding: 10px 12px; }
    .card .card-body { padding: 12px; }
    .pulse-topbar { grid-template-columns: auto 1fr; }
    .pulse-tools { grid-column: 1 / -1; justify-content: flex-end; }
    .pulse-highlight-grid,
    .kpi-grid, .kanban-board { grid-template-columns: 1fr; }
    .widget-tabs { flex-wrap: wrap; }
    .widget-tabs a,
    .widget-tabs button { padding: 6px 9px; font-size: 12px; }
    .widget-head { flex-direction: column; align-items: flex-start; }
    .order-days { grid-template-columns: repeat(7, 1fr); }
    .order-chart { height: 128px; }
    .order-bar-wrap { height: 118px; }
    .client-card-grid { grid-template-columns: 1fr; }
    .client-page-layout { grid-template-columns: 1fr; }
    .client-info-col { position: static; }
    .client-info-row { flex-direction: column; gap: 2px; align-items: flex-start; }
    .client-info-row strong { text-align: left; max-width: 100%; }
    .client-tabs-nav { border-radius: 12px; }
    .client-tabs-nav .nav-link { padding: 7px 11px; font-size: 12px; }
    .client-card-header { gap: 10px; }
    .client-avatar { width: 40px; height: 40px; font-size: 16px; border-radius: 12px; }
    .modal-dialog {
        margin: 0;
        max-width: none;
        width: 100vw;
        min-height: 100dvh;
    }
    .modal-content {
        min-height: 100dvh;
        border-radius: 0;
        border: 0;
    }
    .btn {
        min-height: 40px;
    }
    .row.g-2 > [class*="col-"],
    .row.g-3 > [class*="col-"] {
        width: 100%;
    }
}

.client-link-name {
    display: block;
    color: #172f4d;
    text-decoration: none;
    font-weight: 800;
    margin-bottom: 2px;
}

/* Settings compact mode */
.settings-card .card-header {
    padding: 10px 14px;
}

.settings-card .card-body {
    padding: 12px 14px;
}

.settings-form-compact .form-label {
    font-size: 12px;
    margin-bottom: 4px;
}

.settings-form-compact .form-control,
.settings-form-compact .form-select {
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.settings-form-compact textarea.form-control {
    min-height: 92px;
}

.settings-subcard {
    border-radius: 12px;
}

.settings-subcard .card-header {
    padding: 9px 12px;
    font-size: 14px;
}

.settings-subcard .card-body {
    padding: 10px 12px;
}

.settings-client-field-form {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 8px !important;
    column-gap: 10px;
    width: 100%;
}

.settings-client-field-form > [class*="col-"] {
    margin-bottom: 0;
    width: 100%;
    max-width: 100%;
    padding-right: 0;
    padding-left: 0;
}

.settings-client-field-form .settings-inline-checks {
    flex-wrap: nowrap;
    gap: 10px !important;
}

.settings-client-field-form .form-control,
.settings-client-field-form .form-select {
    width: 100%;
}

.settings-client-field-form .sf-submit {
    grid-column: 1 / -1;
}

.settings-client-field-submit .btn {
    padding: 7px 14px;
}

.settings-inline-edit-row .form-control,
.settings-inline-edit-row .form-select {
    min-height: 34px;
}

.settings-form-compact .table th,
.settings-form-compact .table td {
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 13px;
}

@media (min-width: 768px) {
    .settings-client-field-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
    }
}

@media (min-width: 1200px) {
    .settings-client-field-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .settings-client-field-form .sf-name {
        grid-column: span 2;
    }

    .settings-client-field-form .sf-flags {
        justify-content: flex-start;
    }

    .settings-client-field-form .settings-client-field-submit {
        align-self: end;
    }

    .settings-client-field-form .settings-client-field-submit .btn {
        width: auto;
        min-width: 180px;
    }
}
