:root {
    --ink: #171826;
    --muted: #75788c;
    --line: #e8e9f0;
    --surface: #ffffff;
    --canvas: #f5f6fa;
    --primary: #6758e9;
    --primary-dark: #5547d7;
    --success: #26a878;
    --danger: #ef6a75;
    --navy: #11131f;
    --shadow: 0 8px 32px rgba(29, 27, 61, 0.055);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

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

svg {
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: #1c1d2c;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .12em;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 29px;
    height: 29px;
    place-items: center;
    transform: rotate(45deg);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
    position: absolute;
    display: block;
    width: 15px;
    height: 15px;
    border: 3px solid var(--primary);
    border-radius: 4px;
    content: "";
}

.brand-mark::before {
    left: 0;
    top: 0;
}

.brand-mark::after {
    bottom: 0;
    right: 0;
}

.brand-mark span {
    border-width: 2px;
    opacity: .35;
}

/* Login */
.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 14% 12%, rgba(103, 88, 233, .13), transparent 27%),
        radial-gradient(circle at 88% 86%, rgba(54, 178, 202, .1), transparent 25%),
        #f5f6fa;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

.auth-showcase {
    position: relative;
    display: flex;
    overflow: hidden;
    padding: 52px 64px;
    flex-direction: column;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(12, 14, 28, .96), rgba(18, 19, 35, .98)),
        #11131f;
}

.auth-showcase::before {
    position: absolute;
    inset: 0;
    opacity: .13;
    background-image:
        linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 46px 46px;
    content: "";
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

.showcase-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(4px);
    pointer-events: none;
}

.showcase-orb-one {
    width: 420px;
    height: 420px;
    right: -160px;
    top: 13%;
    background: radial-gradient(circle, rgba(103, 88, 233, .43), transparent 66%);
}

.showcase-orb-two {
    width: 360px;
    height: 360px;
    left: -170px;
    bottom: -120px;
    background: radial-gradient(circle, rgba(52, 197, 223, .17), transparent 68%);
}

.brand-light {
    position: relative;
    z-index: 1;
    color: white;
}

.showcase-copy {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: auto 0;
    padding: 90px 0 40px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    color: #c8c8d5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .04);
}

.eyebrow-dot {
    width: 7px;
    height: 7px;
    margin-right: 8px;
    border-radius: 50%;
    background: #7668f2;
    box-shadow: 0 0 0 5px rgba(118, 104, 242, .13);
}

.showcase-copy h1 {
    margin: 24px 0 22px;
    font-size: clamp(40px, 4.25vw, 66px);
    font-weight: 700;
    letter-spacing: -.055em;
    line-height: 1.08;
}

.showcase-copy h1 span {
    color: #8a7df2;
}

.showcase-copy p {
    max-width: 515px;
    margin: 0;
    color: #a9aaba;
    font-size: 16px;
    line-height: 1.75;
}

.showcase-proof {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    gap: 18px;
}

.proof-avatars {
    display: flex;
}

.proof-avatars span {
    display: grid;
    width: 38px;
    height: 38px;
    margin-left: -9px;
    border: 2px solid #171925;
    border-radius: 50%;
    place-items: center;
    color: white;
    font-size: 9px;
    font-weight: 800;
    background: #6356da;
}

.proof-avatars span:first-child {
    margin-left: 0;
    background: #3b9bb4;
}

.proof-avatars span:nth-child(2) {
    background: #c58455;
}

.proof-avatars span:nth-child(3) {
    background: #6055b1;
}

.proof-avatars span:last-child {
    color: #b9b9c8;
    background: #292b3a;
}

.showcase-proof div:last-child {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.showcase-proof strong {
    font-size: 12px;
}

.showcase-proof small {
    color: #828495;
    font-size: 10px;
}

.auth-panel {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    padding: 44px 24px 24px;
    flex-direction: column;
    justify-content: center;
    background-image:
        linear-gradient(rgba(103, 88, 233, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(103, 88, 233, .035) 1px, transparent 1px);
    background-size: 42px 42px;
}

.mobile-brand {
    display: none;
}

.auth-card {
    width: 100%;
    max-width: 470px;
    margin: auto;
    padding: 42px 44px 40px;
    border: 1px solid #dfe0e9;
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    box-shadow:
        0 24px 70px rgba(31, 28, 72, .11),
        0 3px 10px rgba(31, 28, 72, .04),
        inset 0 1px 0 rgba(255, 255, 255, .9);
    backdrop-filter: blur(14px);
}

.auth-brand {
    display: flex;
    width: max-content;
    margin: 0 auto 34px;
    align-items: center;
    color: #202130;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .13em;
    gap: 11px;
}

.auth-brand .brand-mark {
    width: 28px;
    height: 28px;
}

.auth-kicker {
    display: block;
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    text-align: center;
    text-transform: uppercase;
}

.auth-heading h2 {
    margin: 0;
    color: #171825;
    font-size: 35px;
    letter-spacing: -.035em;
    text-align: center;
}

.auth-heading p {
    margin: 0;
    color: #858797;
    line-height: 1.6;
}

.form-alert {
    display: flex;
    align-items: center;
    margin-top: 23px;
    padding: 12px 14px;
    border: 1px solid #ffd3d7;
    border-radius: 12px;
    color: #a83b47;
    background: #fff4f5;
    gap: 10px;
}

.form-alert > span {
    display: grid;
    width: 23px;
    height: 23px;
    flex: 0 0 auto;
    border-radius: 50%;
    place-items: center;
    color: white;
    font-size: 11px;
    font-weight: 800;
    background: #e86572;
}

.form-alert p {
    margin: 0;
    font-size: 12px;
}

.login-form {
    margin-top: 32px;
}

.field + .field {
    margin-top: 21px;
}

.field label,
.field-label {
    font-size: 13px;
    font-weight: 700;
}

.field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-label a {
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    height: 52px;
    margin-top: 9px;
}

.input-wrap > svg {
    position: absolute;
    z-index: 1;
    left: 16px;
    width: 19px;
    height: 19px;
    color: #a0a2b0;
}

.input-wrap input {
    width: 100%;
    height: 100%;
    padding: 0 47px;
    border: 1px solid #dedfe7;
    outline: 0;
    border-radius: 12px;
    color: #242534;
    font-size: 14px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.input-wrap input::placeholder {
    color: #b3b5c0;
}

.input-wrap input:focus {
    border-color: #8c80ef;
    box-shadow: 0 0 0 4px rgba(103, 88, 233, .1);
}

.password-toggle {
    position: absolute;
    z-index: 2;
    right: 10px;
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    cursor: pointer;
    place-items: center;
    color: #999ba8;
    background: transparent;
}

.password-toggle svg {
    width: 19px;
    height: 19px;
}

.password-toggle.visible {
    color: var(--primary);
}

.check-row {
    display: inline-flex;
    align-items: center;
    margin: 20px 0 23px;
    color: #6c6e7d;
    cursor: pointer;
    font-size: 13px;
    gap: 9px;
}

.check-row input {
    position: absolute;
    opacity: 0;
}

.check-ui {
    display: grid;
    width: 18px;
    height: 18px;
    border: 1px solid #d6d7e0;
    border-radius: 5px;
    place-items: center;
    background: white;
}

.check-row input:checked + .check-ui {
    border-color: var(--primary);
    background: var(--primary);
}

.check-row input:checked + .check-ui::after {
    width: 7px;
    height: 4px;
    border-bottom: 2px solid white;
    border-left: 2px solid white;
    content: "";
    transform: translateY(-1px) rotate(-45deg);
}

.primary-button {
    display: flex;
    width: 100%;
    height: 52px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    color: white;
    font-size: 14px;
    font-weight: 700;
    background: var(--primary);
    box-shadow: 0 10px 28px rgba(103, 88, 233, .24);
    transition: background .2s, transform .2s, box-shadow .2s;
    gap: 10px;
}

.primary-button svg {
    width: 18px;
    height: 18px;
    transition: transform .2s;
}

.primary-button:hover {
    background: var(--primary-dark);
    box-shadow: 0 13px 32px rgba(103, 88, 233, .31);
    transform: translateY(-1px);
}

.primary-button:hover svg {
    transform: translateX(3px);
}

.demo-hint {
    display: flex;
    align-items: center;
    margin-top: 28px;
    padding: 12px 14px;
    border: 1px dashed #dad9eb;
    border-radius: 11px;
    color: #77798b;
    background: #f7f6ff;
    gap: 10px;
}

.demo-hint p {
    margin: 0;
    font-size: 11px;
}

.demo-icon {
    display: grid;
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
    border: 1px solid #aaa2ed;
    border-radius: 50%;
    place-items: center;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
}

.auth-footer {
    margin: 28px 0 0;
    color: #adafba;
    font-size: 10px;
    text-align: center;
}

/* Dashboard shell */
.dashboard-body {
    min-height: 100vh;
    background: var(--canvas);
}

.sidebar {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    display: flex;
    width: 238px;
    padding: 27px 19px 21px;
    border-right: 1px solid #ebeaf0;
    flex-direction: column;
    background: #fff;
}

.sidebar-head {
    display: flex;
    min-height: 41px;
    padding: 0 9px;
    align-items: center;
    justify-content: space-between;
}

.sidebar-close {
    display: none;
}

.side-nav {
    margin-top: 37px;
}

.nav-secondary {
    margin-top: 28px;
    padding-top: 19px;
    border-top: 1px solid #eceef3;
}

.nav-section-title {
    display: block;
    margin: 0 12px 10px;
    color: #a3a7b5;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .13em;
}

.nav-label {
    display: block;
    margin: 0 12px 10px;
    color: #aaaab7;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .13em;
}

.nav-label-spaced {
    margin-top: 30px;
}

.nav-link {
    display: flex;
    height: 45px;
    margin-bottom: 4px;
    padding: 0 12px;
    align-items: center;
    border-radius: 10px;
    color: #6f7180;
    font-size: 14px;
    font-weight: 600;
    transition: .18s ease;
    gap: 12px;
}

.nav-link svg {
    width: 19px;
    height: 19px;
}

.nav-link:hover {
    color: #343548;
    background: #f6f5fb;
}

.nav-link.active {
    color: var(--primary);
    font-weight: 700;
    background: #f0eefe;
}

.nav-badge {
    display: grid;
    min-width: 21px;
    height: 21px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 7px;
    place-items: center;
    color: var(--primary);
    font-size: 9px;
    background: #e1ddfc;
}

.upgrade-card {
    margin-top: auto;
    padding: 17px;
    border: 1px solid #e6e2ff;
    border-radius: 13px;
    background: linear-gradient(145deg, #f7f5ff, #efedff);
}

.upgrade-icon {
    display: grid;
    width: 32px;
    height: 32px;
    margin-bottom: 13px;
    border-radius: 9px;
    place-items: center;
    color: white;
    background: var(--primary);
    box-shadow: 0 6px 14px rgba(103, 88, 233, .23);
}

.upgrade-icon svg {
    width: 17px;
    height: 17px;
}

.upgrade-card strong {
    display: block;
    font-size: 11px;
}

.upgrade-card p {
    margin: 5px 0 11px;
    color: #838395;
    font-size: 9px;
    line-height: 1.5;
}

.upgrade-card a {
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
}

.upgrade-card a span {
    margin-left: 3px;
}

.sidebar-user {
    display: flex;
    margin-top: 18px;
    padding: 16px 4px 0;
    border-top: 1px solid #ececf1;
    align-items: center;
    gap: 9px;
}

.avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 10px;
    place-items: center;
    color: white;
    font-size: 9px;
    font-weight: 800;
    background: #7063df;
}

.avatar-dark {
    background: #2a2d43;
}

.sidebar-user > div,
.top-profile > div {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.sidebar-user strong,
.top-profile strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user small,
.top-profile small {
    margin-top: 3px;
    color: #a0a1ae;
    font-size: 9px;
}

.sidebar-user button,
.stat-top button,
.row-menu {
    border: 0;
    cursor: pointer;
    color: #a2a3af;
    background: transparent;
}

.main-content {
    min-width: 0;
    margin-left: 238px;
}

.topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    height: 76px;
    padding: 0 35px;
    border-bottom: 1px solid #e9e9ef;
    align-items: center;
    justify-content: flex-end;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(15px);
}

.dashboard-empty {
    min-height: calc(100vh - 76px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
}

.search-box {
    position: relative;
    display: flex;
    width: 310px;
    height: 39px;
    align-items: center;
}

.search-box > svg {
    position: absolute;
    left: 13px;
    width: 16px;
    height: 16px;
    color: #a1a3af;
}

.search-box input {
    width: 100%;
    height: 100%;
    padding: 0 54px 0 39px;
    border: 1px solid #e3e4ea;
    outline: 0;
    border-radius: 9px;
    color: var(--ink);
    font-size: 11px;
    background: #fafafd;
}

.search-box input:focus {
    border-color: #a69def;
    box-shadow: 0 0 0 3px rgba(103, 88, 233, .09);
}

.search-box kbd {
    position: absolute;
    right: 9px;
    padding: 3px 6px;
    border: 1px solid #e1e2e8;
    border-radius: 5px;
    color: #a1a2ad;
    font-family: inherit;
    font-size: 8px;
    background: white;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .03);
}

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

.icon-button,
.menu-toggle,
.sidebar-close {
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #e5e5eb;
    border-radius: 10px;
    cursor: pointer;
    place-items: center;
    color: #6f7180;
    background: white;
}

.icon-button {
    position: relative;
}

.icon-button svg,
.menu-toggle svg,
.sidebar-close svg {
    width: 18px;
    height: 18px;
}

.menu-toggle,
.sidebar-close {
    display: none;
}

.notification-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    right: 8px;
    top: 7px;
    border: 1.5px solid white;
    border-radius: 50%;
    background: #f06f78;
}

.top-divider {
    width: 1px;
    height: 27px;
    background: #e6e6eb;
}

.top-profile {
    display: flex;
    min-width: 170px;
    align-items: center;
    gap: 10px;
}

.top-profile > svg {
    width: 14px;
    height: 14px;
    color: #9a9ca9;
}

.logout-form {
    display: flex;
}

.logout-button {
    width: 34px;
    height: 34px;
    border-color: transparent;
}

.logout-button:hover {
    color: #dd5967;
    background: #fff0f2;
}

.dashboard-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 29px 35px 45px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
}

.breadcrumb {
    margin: 0 0 10px !important;
    color: #b0b1bc !important;
    font-size: 8px !important;
    font-weight: 800;
    letter-spacing: .13em;
}

.breadcrumb span {
    color: var(--primary);
}

.page-heading h1 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -.035em;
}

.page-heading h1 span {
    font-size: 21px;
}

.page-heading > div > p:last-child {
    margin: 7px 0 0;
    color: #858796;
    font-size: 11px;
}

.date-button {
    display: flex;
    height: 40px;
    padding: 0 13px;
    border: 1px solid #e2e3e9;
    border-radius: 9px;
    align-items: center;
    cursor: pointer;
    color: #676978;
    font-size: 10px;
    font-weight: 600;
    background: white;
    box-shadow: 0 2px 5px rgba(20, 20, 40, .02);
    gap: 9px;
}

.date-button svg {
    width: 15px;
    height: 15px;
}

.date-button svg:last-child {
    width: 12px;
    margin-left: 4px;
}

.stats-grid {
    display: grid;
    margin-top: 25px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
}

.stat-card,
.panel {
    border: 1px solid #e8e8ee;
    border-radius: 13px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 18px 19px 17px;
}

.stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-icon {
    display: grid;
    width: 37px;
    height: 37px;
    border-radius: 10px;
    place-items: center;
}

.stat-icon svg {
    width: 19px;
    height: 19px;
}

.stat-icon.violet {
    color: #6758e9;
    background: #eeebff;
}

.stat-icon.blue {
    color: #4f81e8;
    background: #eaf2ff;
}

.stat-icon.cyan {
    color: #35a8bd;
    background: #e7f7f9;
}

.stat-icon.orange {
    color: #dd8c45;
    background: #fff2e6;
}

.stat-top button {
    padding: 0;
    letter-spacing: 1px;
}

.stat-card > p {
    margin: 16px 0 6px;
    color: #898a98;
    font-size: 10px;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.stat-value small {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0;
}

.stat-meta {
    display: flex;
    margin-top: 10px;
    align-items: center;
    color: #a0a1ae;
    font-size: 8px;
    gap: 6px;
}

.trend {
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    font-size: 9px;
    font-weight: 800;
}

.trend.up {
    color: #279d73;
}

.trend.down {
    color: #e25d69;
}

.stat-meta .trend {
    padding: 3px 6px;
    background: #eaf8f2;
}

.stat-meta .trend.down {
    background: #fff0f1;
}

.content-grid {
    display: grid;
    margin-top: 16px;
    grid-template-columns: minmax(0, 1.75fr) minmax(300px, .85fr);
    gap: 16px;
}

.panel {
    min-width: 0;
    padding: 21px;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.panel-head h2 {
    margin: 0;
    font-size: 13px;
    letter-spacing: -.01em;
}

.panel-head p {
    margin: 5px 0 0;
    color: #9a9ba8;
    font-size: 9px;
}

.panel-head select {
    height: 31px;
    padding: 0 28px 0 10px;
    border: 1px solid #e3e4e9;
    border-radius: 7px;
    outline: 0;
    color: #676978;
    font-size: 9px;
    background: #fff;
}

.panel-head > a {
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
}

.chart-summary {
    display: flex;
    margin: 19px 0 12px;
    align-items: flex-end;
    gap: 11px;
}

.chart-summary > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chart-summary span {
    color: #a0a2ae;
    font-size: 8px;
}

.chart-summary strong {
    font-size: 16px;
}

.chart-summary > .trend {
    margin-bottom: 2px;
    color: #279d73;
    font-size: 8px;
}

.chart-wrap {
    display: flex;
    height: 205px;
    gap: 12px;
}

.y-axis {
    display: flex;
    width: 32px;
    padding: 2px 0 25px;
    flex-direction: column;
    justify-content: space-between;
    color: #b1b2bc;
    font-size: 7px;
    text-align: right;
}

.chart {
    position: relative;
    min-width: 0;
    flex: 1;
}

.chart-grid {
    position: absolute;
    inset: 0 0 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.chart-grid i {
    display: block;
    height: 1px;
    border-top: 1px dashed #ededf1;
}

.chart-svg {
    position: absolute;
    inset: 0 0 25px;
    width: 100%;
    height: calc(100% - 25px);
    overflow: visible;
}

.chart-svg .area {
    fill: url(#chartFill);
    stroke: none;
}

.chart-svg .line {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.chart-point circle:first-child {
    fill: white;
    stroke: var(--primary);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.chart-point circle:last-child {
    fill: var(--primary);
    stroke: none;
}

.chart-labels {
    position: absolute;
    inset: auto 0 0;
    display: flex;
    justify-content: space-between;
    color: #a9aab5;
    font-size: 7px;
}

.activity-list {
    margin-top: 14px;
}

.activity-item {
    display: flex;
    padding: 14px 0;
    border-bottom: 1px solid #efeff3;
    gap: 11px;
}

.activity-item .avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.activity-item .avatar.blue {
    background: #478bb2;
}

.activity-item .avatar.cyan {
    background: #3b9a8c;
}

.activity-item > div {
    min-width: 0;
}

.activity-item p {
    margin: 0;
    color: #797a88;
    font-size: 9px;
    line-height: 1.55;
}

.activity-item p strong {
    color: #313240;
}

.activity-item small {
    display: block;
    margin-top: 5px;
    color: #b0b1bb;
    font-size: 8px;
}

.secondary-button {
    width: 100%;
    height: 34px;
    margin-top: 15px;
    border: 1px solid #e4e2f5;
    border-radius: 8px;
    cursor: pointer;
    color: var(--primary);
    font-size: 9px;
    font-weight: 700;
    background: #f8f7ff;
}

.projects-panel {
    margin-top: 16px;
}

.table-wrap {
    overflow-x: auto;
    margin: 17px -21px -21px;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th {
    padding: 10px 15px;
    border-top: 1px solid #ededf1;
    border-bottom: 1px solid #ededf1;
    color: #aaaab5;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .08em;
    text-align: left;
    background: #fafafd;
}

th:first-child,
td:first-child {
    padding-left: 21px;
}

th:last-child,
td:last-child {
    padding-right: 21px;
}

td {
    height: 60px;
    padding: 8px 15px;
    border-bottom: 1px solid #efeff3;
    color: #686a78;
    font-size: 9px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

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

.project-icon {
    display: grid;
    width: 31px;
    height: 31px;
    flex: 0 0 auto;
    border: 1px solid #e2e0f8;
    border-radius: 8px;
    place-items: center;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    background: #f0eefe;
}

.project-name > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-name strong {
    color: #343542;
    font-size: 9px;
}

.project-name small {
    color: #a5a6b0;
    font-size: 7px;
}

.status {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 6px;
    color: #288e6c;
    font-size: 7px;
    font-weight: 700;
    background: #e9f7f2;
}

.status-tekshiruvda {
    color: #c67e35;
    background: #fff4e8;
}

.status-rejalashtirilgan {
    color: #6e6f7b;
    background: #f0f0f3;
}

.team-stack {
    display: flex;
    padding-left: 7px;
}

.team-stack span {
    display: grid;
    width: 25px;
    height: 25px;
    margin-left: -7px;
    border: 2px solid white;
    border-radius: 50%;
    place-items: center;
    color: white;
    font-size: 6px;
    font-weight: 800;
    background: #5e70b9;
}

.team-stack span:nth-child(2) {
    background: #b27557;
}

.team-stack span:nth-child(3) {
    background: #468f85;
}

.progress-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-track {
    width: 76px;
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #ececf1;
}

.progress-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
}

.progress-cell > span {
    color: #5f6170;
    font-size: 8px;
    font-weight: 700;
}

.deadline {
    font-size: 8px;
}

.row-menu {
    padding: 6px;
    font-size: 10px;
}

.mobile-project-list,
.mobile-overlay {
    display: none;
}

@media (max-width: 1180px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .content-grid {
        grid-template-columns: minmax(0, 1.45fr) minmax(280px, .8fr);
    }

    .auth-panel {
        padding-right: 24px;
        padding-left: 24px;
    }
}

@media (max-width: 960px) {
    .sidebar {
        width: 224px;
        transform: translateX(-101%);
        transition: transform .24s ease;
    }

    .sidebar-open .sidebar {
        box-shadow: 20px 0 50px rgba(17, 19, 31, .18);
        transform: translateX(0);
    }

    .sidebar-close {
        display: grid;
        border: 0;
    }

    .mobile-overlay {
        position: fixed;
        z-index: 35;
        inset: 0;
        background: rgba(14, 15, 26, .45);
        opacity: 0;
        transition: opacity .24s;
        pointer-events: none;
        backdrop-filter: blur(2px);
    }

    .sidebar-open .mobile-overlay {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .main-content {
        margin-left: 0;
    }

    .topbar {
        justify-content: space-between;
    }

    .menu-toggle {
        display: grid;
    }
}

@media (max-width: 760px) {
    .auth-body {
        background:
            radial-gradient(circle at 90% 5%, rgba(103, 88, 233, .11), transparent 28%),
            #f6f7fb;
    }

    .auth-shell {
        display: flex;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 24px 18px 18px;
        justify-content: center;
    }

    .auth-card {
        margin: auto;
        padding: 34px 28px 32px;
        border-radius: 17px;
        box-shadow:
            0 18px 45px rgba(31, 28, 72, .1),
            0 2px 8px rgba(31, 28, 72, .04);
    }

    .auth-brand {
        margin-bottom: 29px;
    }

    .auth-heading h2 {
        font-size: 29px;
    }

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

    .topbar {
        height: 66px;
        padding: 0 18px;
    }

    .dashboard-empty {
        min-height: calc(100vh - 66px);
    }

    .search-box {
        width: min(43vw, 260px);
    }

    .search-box kbd {
        display: none;
    }

    .search-box input {
        padding-right: 12px;
    }

    .top-profile {
        min-width: auto;
    }

    .top-profile > div,
    .top-profile > svg,
    .top-divider,
    .logout-form {
        display: none;
    }

    .dashboard-page {
        padding: 23px 18px 35px;
    }

    .page-heading {
        display: block;
    }

    .date-button {
        margin-top: 17px;
    }

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

    .activity-panel {
        order: 2;
    }

    .table-wrap {
        display: none;
    }

    .mobile-project-list {
        display: grid;
        margin-top: 17px;
        gap: 10px;
    }

    .mobile-project-card {
        padding: 15px;
        border: 1px solid #ededf2;
        border-radius: 11px;
        background: #fcfcfe;
    }

    .mobile-project-head,
    .mobile-project-foot,
    .mobile-progress-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .mobile-project-head .status {
        flex: 0 0 auto;
    }

    .mobile-progress-label {
        margin: 16px 0 7px;
        color: #91929f;
        font-size: 8px;
    }

    .mobile-progress-label strong {
        color: #595b69;
    }

    .mobile-project-card .progress-track {
        width: 100%;
    }

    .mobile-project-foot {
        margin-top: 13px;
        color: #898b98;
        font-size: 8px;
    }
}

@media (max-width: 520px) {
    .topbar {
        padding: 0 14px;
    }

    .search-box {
        width: 38px;
    }

    .search-box input {
        padding: 0;
        border-color: #e5e5eb;
        cursor: pointer;
        color: transparent;
        background: white;
    }

    .search-box input::placeholder {
        color: transparent;
    }

    .search-box > svg {
        left: 11px;
        pointer-events: none;
    }

    .search-box:focus-within {
        position: absolute;
        z-index: 5;
        right: 14px;
        left: 62px;
        width: auto;
    }

    .search-box:focus-within input {
        padding: 0 12px 0 38px;
        color: var(--ink);
        cursor: text;
    }

    .search-box:focus-within input::placeholder {
        color: #b3b5c0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stat-card {
        display: grid;
        padding: 15px;
        grid-template-columns: 47px minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        column-gap: 5px;
    }

    .stat-top {
        grid-row: 1 / 4;
    }

    .stat-top button {
        display: none;
    }

    .stat-card > p {
        margin: 0 0 5px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-meta {
        margin-top: 6px;
    }

    .page-heading h1 {
        font-size: 21px;
    }

    .page-heading > div > p:last-child {
        line-height: 1.55;
    }

    .panel {
        padding: 17px;
    }

    .chart-wrap {
        height: 185px;
    }

    .projects-panel .panel-head > a {
        display: none;
    }

    .mobile-project-head {
        align-items: flex-start;
    }

    .mobile-project-card {
        padding: 13px;
    }

    .auth-panel {
        padding-right: 19px;
        padding-left: 19px;
    }

    .input-wrap {
        height: 50px;
    }
}

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

/* Branch management */
.workspace-page {
    width: 100%;
    max-width: 1460px;
    margin: 0 auto;
    padding: 35px 40px 55px;
}

.workspace-heading {
    display: flex;
    min-height: 76px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.section-kicker {
    display: block;
    margin-bottom: 9px;
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .14em;
}

.workspace-heading h1 {
    margin: 0;
    color: #171826;
    font-size: 28px;
    letter-spacing: -.04em;
}

.workspace-heading p {
    margin: 7px 0 0;
    color: #858796;
    font-size: 11px;
}

.action-button,
.outline-action,
.cancel-button {
    display: inline-flex;
    min-height: 43px;
    padding: 0 17px;
    border: 0;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    transition: transform .2s, box-shadow .2s, background .2s;
    gap: 9px;
}

.action-button {
    color: white;
    background: var(--primary);
    box-shadow: 0 9px 22px rgba(103, 88, 233, .22);
}

.action-button:hover {
    background: var(--primary-dark);
    box-shadow: 0 12px 28px rgba(103, 88, 233, .28);
    transform: translateY(-1px);
}

.action-button svg,
.outline-action svg {
    width: 17px;
    height: 17px;
}

.branch-summary {
    display: flex;
    margin-top: 24px;
    gap: 12px;
}

.branch-summary > div {
    display: flex;
    min-width: 155px;
    padding: 12px 15px;
    border: 1px solid #e5e6ed;
    border-radius: 11px;
    align-items: center;
    background: rgba(255, 255, 255, .8);
    gap: 10px;
}

.summary-icon {
    display: grid;
    width: 35px;
    height: 35px;
    border-radius: 9px;
    place-items: center;
    color: var(--primary);
    background: #eeebff;
}

.summary-icon svg {
    width: 17px;
    height: 17px;
}

.summary-icon.green {
    background: #eaf8f2;
}

.pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #28a879;
    box-shadow: 0 0 0 5px rgba(40, 168, 121, .13);
}

.branch-summary > div > div {
    display: flex;
    flex-direction: column;
}

.branch-summary strong {
    font-size: 14px;
}

.branch-summary small {
    margin-top: 2px;
    color: #9495a2;
    font-size: 8px;
}

.branch-grid {
    display: grid;
    margin-top: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.branch-card {
    overflow: hidden;
    border: 1px solid #e3e4eb;
    border-radius: 15px;
    background: white;
    box-shadow: 0 7px 26px rgba(29, 27, 61, .055);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.branch-card:hover {
    border-color: #cbc6f3;
    box-shadow: 0 15px 38px rgba(29, 27, 61, .1);
    transform: translateY(-3px);
}

.branch-card-visual {
    position: relative;
    display: grid;
    height: 125px;
    overflow: hidden;
    place-items: center;
    background:
        radial-gradient(circle at 72% 32%, rgba(103, 88, 233, .22), transparent 22%),
        linear-gradient(rgba(103, 88, 233, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(103, 88, 233, .08) 1px, transparent 1px),
        linear-gradient(145deg, #f0effb, #f7f8fc);
    background-size: auto, 25px 25px, 25px 25px, auto;
}

.branch-card-visual::before,
.branch-card-visual::after {
    position: absolute;
    width: 180px;
    height: 1px;
    background: rgba(103, 88, 233, .12);
    content: "";
    transform: rotate(24deg);
}

.branch-card-visual::after {
    transform: translate(50px, 25px) rotate(-18deg);
}

.branch-pin {
    position: relative;
    z-index: 2;
    display: grid;
    width: 46px;
    height: 46px;
    border: 5px solid rgba(255, 255, 255, .75);
    border-radius: 50% 50% 50% 10px;
    place-items: center;
    color: white;
    background: var(--primary);
    box-shadow: 0 9px 22px rgba(103, 88, 233, .3);
    transform: rotate(-45deg);
}

.branch-pin svg {
    width: 23px;
    height: 23px;
    transform: rotate(45deg);
}

.branch-status {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 7px;
    align-items: center;
    color: #238663;
    font-size: 8px;
    font-weight: 800;
    background: #e9f7f2;
    gap: 6px;
}

.branch-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #29aa7b;
}

.branch-status.inactive {
    color: #777987;
    background: #eeeef2;
}

.branch-status.inactive i {
    background: #999ba7;
}

.branch-card-visual .branch-status {
    position: absolute;
    z-index: 3;
    top: 12px;
    right: 12px;
    box-shadow: 0 3px 10px rgba(30, 31, 50, .05);
}

.map-coordinates {
    position: absolute;
    z-index: 2;
    bottom: 10px;
    left: 12px;
    padding: 4px 7px;
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 5px;
    color: #767789;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 7px;
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(6px);
}

.branch-card-body {
    padding: 17px;
}

.branch-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.branch-title-row h2 {
    margin: 0;
    color: #282937;
    font-size: 13px;
    letter-spacing: -.015em;
}

.branch-title-row p {
    overflow: hidden;
    margin: 5px 0 0;
    color: #9697a3;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.arrow-box {
    display: grid;
    width: 29px;
    height: 29px;
    flex: 0 0 auto;
    border: 1px solid #e5e5ec;
    border-radius: 8px;
    place-items: center;
    color: #8b8d9b;
}

.arrow-box svg {
    width: 14px;
    height: 14px;
}

.branch-card:hover .arrow-box {
    border-color: #d9d4fb;
    color: var(--primary);
    background: #f4f2ff;
}

.branch-uuid {
    display: flex;
    margin-top: 16px;
    padding-top: 13px;
    border-top: 1px solid #efeff3;
    align-items: center;
    gap: 9px;
}

.branch-uuid > svg {
    width: 17px;
    height: 17px;
    color: var(--primary);
}

.branch-uuid > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.branch-uuid span {
    color: #a1a2ae;
    font-size: 6px;
    font-weight: 800;
    letter-spacing: .1em;
}

.branch-uuid code {
    overflow: hidden;
    color: #696b78;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 8px;
    text-overflow: ellipsis;
}

.empty-state {
    display: flex;
    min-height: 410px;
    margin-top: 22px;
    padding: 45px 25px;
    border: 1px dashed #d8d9e5;
    border-radius: 16px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background: rgba(255, 255, 255, .58);
}

.empty-state-icon {
    display: grid;
    width: 62px;
    height: 62px;
    margin-bottom: 18px;
    border-radius: 17px;
    place-items: center;
    color: var(--primary);
    background: #ece9ff;
    box-shadow: 0 10px 24px rgba(103, 88, 233, .14);
}

.empty-state-icon svg {
    width: 28px;
    height: 28px;
}

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

.empty-state p {
    max-width: 390px;
    margin: 8px 0 22px;
    color: #878996;
    font-size: 11px;
    line-height: 1.65;
}

.back-link {
    display: inline-flex;
    margin-bottom: 12px;
    align-items: center;
    color: #858795;
    font-size: 9px;
    font-weight: 700;
    gap: 5px;
}

.back-link:hover {
    color: var(--primary);
}

.back-link svg {
    width: 14px;
    height: 14px;
}

.branch-form-page .workspace-heading {
    align-items: flex-start;
}

.branch-form {
    display: grid;
    margin-top: 24px;
    grid-template-columns: minmax(280px, .66fr) minmax(480px, 1.34fr);
    gap: 18px;
}

.form-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid #e3e4eb;
    border-radius: 15px;
    background: white;
    box-shadow: var(--shadow);
}

.form-card-heading {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 11px;
}

.form-step {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    border-radius: 9px;
    place-items: center;
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    background: #eeebff;
}

.form-card-heading h2,
.detail-panel-head h2 {
    margin: 0;
    font-size: 13px;
}

.form-card-heading p,
.detail-panel-head p {
    margin: 4px 0 0;
    color: #999aa7;
    font-size: 8px;
}

.branch-fields {
    margin-top: 24px;
}

.branch-input input {
    padding-left: 45px;
}

.field label em {
    color: #e85f6d;
    font-style: normal;
}

.field label span {
    color: #a4a5b0;
    font-size: 9px;
    font-weight: 500;
}

.field-error {
    display: block;
    margin-top: 6px;
    color: #dc5361;
    font-size: 9px;
}

.status-switch {
    display: flex;
    margin-top: 25px;
    padding: 14px;
    border: 1px solid #e7e7ed;
    border-radius: 10px;
    align-items: center;
    cursor: pointer;
    background: #fafafd;
    gap: 11px;
}

.status-switch input {
    position: absolute;
    opacity: 0;
}

.switch-ui {
    position: relative;
    width: 37px;
    height: 21px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #cacbd4;
    transition: background .2s;
}

.switch-ui i {
    position: absolute;
    width: 15px;
    height: 15px;
    left: 3px;
    top: 3px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 5px rgba(25, 25, 45, .18);
    transition: transform .2s;
}

.status-switch input:checked + .switch-ui {
    background: var(--primary);
}

.status-switch input:checked + .switch-ui i {
    transform: translateX(16px);
}

.status-switch > span:last-child {
    display: flex;
    flex-direction: column;
}

.status-switch strong {
    font-size: 10px;
}

.status-switch small {
    margin-top: 3px;
    color: #999ba7;
    font-size: 8px;
}

.branch-map-card {
    position: relative;
}

.locate-button {
    display: inline-flex;
    height: 33px;
    margin-left: auto;
    padding: 0 10px;
    border: 1px solid #dedfe7;
    border-radius: 8px;
    align-items: center;
    cursor: pointer;
    color: #686a78;
    font-size: 8px;
    font-weight: 700;
    background: white;
    gap: 6px;
}

.locate-button:hover {
    border-color: #bcb6ef;
    color: var(--primary);
}

.locate-button svg {
    width: 14px;
    height: 14px;
}

.locate-button.location-error {
    border-color: #f0b9bf;
    color: #dd5967;
}

.branch-map {
    position: relative;
    z-index: 1;
    height: 390px;
    margin-top: 19px;
    overflow: hidden;
    border: 1px solid #dedfe7;
    border-radius: 12px;
    background: #ececf2;
}

.branch-map .leaflet-control-zoom {
    overflow: hidden;
    border: 0 !important;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(30, 31, 50, .14) !important;
}

.branch-map .leaflet-control-zoom a {
    border: 0 !important;
    color: #555766;
    font-family: inherit;
}

.branch-map .leaflet-control-attribution {
    font-size: 7px;
}

.branch-map-marker-shell {
    border: 0;
    background: transparent;
}

.branch-map-marker {
    position: relative;
    display: grid;
    width: 46px;
    height: 46px;
    border: 5px solid rgba(255, 255, 255, .9);
    border-radius: 50% 50% 50% 10px;
    place-items: center;
    color: white;
    background: var(--primary);
    box-shadow: 0 8px 21px rgba(103, 88, 233, .38);
    transform: rotate(-45deg);
}

.branch-map-marker svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transform: rotate(45deg);
}

.map-selection {
    display: flex;
    min-height: 58px;
    padding: 12px 2px 0;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.selection-state {
    display: flex;
    align-items: center;
    gap: 9px;
}

.selection-icon {
    display: grid;
    width: 31px;
    height: 31px;
    border-radius: 8px;
    place-items: center;
    color: #8d8f9b;
    background: #f0f0f3;
}

.selection-icon svg {
    width: 16px;
    height: 16px;
}

.selection-state.selected .selection-icon {
    color: #228d68;
    background: #e8f7f1;
}

.selection-state > div {
    display: flex;
    flex-direction: column;
}

.selection-state strong {
    font-size: 9px;
}

.selection-state small {
    margin-top: 3px;
    color: #9c9da8;
    font-size: 7px;
}

.coordinate-values {
    display: flex;
    gap: 7px;
}

.coordinate-values span {
    display: flex;
    padding: 7px 8px;
    border-radius: 6px;
    align-items: center;
    color: #aaaab5;
    font-size: 6px;
    font-weight: 800;
    background: #f5f5f8;
    gap: 5px;
}

.coordinate-values code {
    color: #656775;
    font-size: 7px;
}

.map-error {
    margin-top: 3px;
}

.form-actions {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 10px;
}

.cancel-button,
.outline-action {
    border: 1px solid #dedfe7;
    color: #6d6f7d;
    background: white;
}

.cancel-button:hover,
.outline-action:hover {
    border-color: #c8c4ee;
    color: var(--primary);
    background: #f8f7ff;
}

.save-branch-button {
    min-width: 170px;
}

.branch-detail-heading {
    align-items: flex-end;
}

.detail-title-line {
    display: flex;
    align-items: center;
    gap: 12px;
}

.branch-detail-grid {
    display: grid;
    margin-top: 24px;
    grid-template-columns: minmax(0, 1.5fr) minmax(310px, .65fr);
    gap: 18px;
}

.detail-map-panel,
.qr-panel,
.branch-meta-card {
    border: 1px solid #e3e4eb;
    border-radius: 15px;
    background: white;
    box-shadow: var(--shadow);
}

.detail-map-panel {
    padding: 21px;
}

.detail-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
}

.detail-panel-head > a {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    font-size: 8px;
    font-weight: 800;
    gap: 5px;
}

.detail-panel-head > a svg {
    width: 13px;
    height: 13px;
}

.detail-map {
    height: 430px;
}

.detail-coordinates {
    display: flex;
    min-height: 58px;
    padding-top: 15px;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

.detail-coordinates > span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-coordinates small {
    color: #a0a1ad;
    font-size: 6px;
    font-weight: 800;
    letter-spacing: .1em;
}

.detail-coordinates code {
    color: #505260;
    font-size: 9px;
}

.detail-coordinates > i {
    width: 1px;
    height: 25px;
    background: #e6e7ec;
}

.qr-panel {
    position: relative;
    overflow: hidden;
    padding: 29px;
    text-align: center;
}

.qr-panel-accent {
    position: absolute;
    width: 190px;
    height: 190px;
    right: -95px;
    top: -95px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(103, 88, 233, .15), transparent 68%);
}

.qr-kicker {
    position: relative;
    color: var(--primary);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .13em;
}

.qr-panel h2 {
    position: relative;
    margin: 8px 0 0;
    font-size: 17px;
}

.qr-panel > p {
    position: relative;
    margin: 7px auto 19px;
    color: #8b8d9a;
    font-size: 9px;
    line-height: 1.65;
}

.qr-frame {
    position: relative;
    width: 205px;
    height: 205px;
    margin: 0 auto;
    padding: 16px;
    border: 1px solid #e2e0f5;
    border-radius: 13px;
    background: white;
    box-shadow: 0 10px 30px rgba(29, 27, 61, .08);
}

.qr-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qr-corner {
    position: absolute;
    width: 19px;
    height: 19px;
    border-color: var(--primary);
}

.corner-one {
    top: -1px;
    left: -1px;
    border-top: 2px solid;
    border-left: 2px solid;
    border-radius: 7px 0 0;
}

.corner-two {
    top: -1px;
    right: -1px;
    border-top: 2px solid;
    border-right: 2px solid;
    border-radius: 0 7px 0 0;
}

.corner-three {
    bottom: -1px;
    left: -1px;
    border-bottom: 2px solid;
    border-left: 2px solid;
    border-radius: 0 0 0 7px;
}

.corner-four {
    right: -1px;
    bottom: -1px;
    border-right: 2px solid;
    border-bottom: 2px solid;
    border-radius: 0 0 7px;
}

.uuid-display {
    margin-top: 19px;
    padding: 12px;
    border: 1px solid #e8e8ee;
    border-radius: 9px;
    text-align: left;
    background: #fafafd;
}

.uuid-display > span {
    color: #a0a1ad;
    font-size: 6px;
    font-weight: 800;
    letter-spacing: .1em;
}

.uuid-display > div {
    display: flex;
    margin-top: 5px;
    align-items: center;
    gap: 7px;
}

.uuid-display code {
    min-width: 0;
    overflow: hidden;
    flex: 1;
    color: #5d5f6d;
    font-size: 8px;
    text-overflow: ellipsis;
}

.uuid-display button {
    display: grid;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    place-items: center;
    color: #777987;
    background: #efeff4;
}

.uuid-display button.copied {
    color: #218b67;
    background: #e6f6ef;
}

.uuid-display button svg {
    width: 13px;
    height: 13px;
}

.qr-download {
    width: 100%;
    margin-top: 12px;
}

.branch-meta-card {
    display: grid;
    margin-top: 18px;
    padding: 18px 22px;
    grid-template-columns: repeat(3, 1fr);
}

.branch-meta-card > div {
    display: flex;
    padding: 0 21px;
    border-right: 1px solid #e8e8ed;
    flex-direction: column;
    gap: 5px;
}

.branch-meta-card > div:first-child {
    padding-left: 0;
}

.branch-meta-card > div:last-child {
    padding-right: 0;
    border-right: 0;
}

.branch-meta-card span {
    color: #a1a2ad;
    font-size: 6px;
    font-weight: 800;
    letter-spacing: .1em;
}

.branch-meta-card strong {
    color: #5c5e6c;
    font-size: 9px;
}

@media (max-width: 1120px) {
    .branch-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .branch-form {
        grid-template-columns: minmax(260px, .7fr) minmax(420px, 1.3fr);
    }

    .branch-detail-grid {
        grid-template-columns: minmax(0, 1.25fr) minmax(295px, .75fr);
    }
}

@media (max-width: 850px) {
    .workspace-page {
        padding: 28px 22px 45px;
    }

    .branch-form,
    .branch-detail-grid {
        grid-template-columns: 1fr;
    }

    .branch-info-card {
        order: 1;
    }

    .branch-map-card {
        order: 2;
    }

    .form-actions {
        order: 3;
    }

    .qr-panel {
        display: grid;
        grid-template-columns: minmax(180px, .8fr) minmax(220px, 1.2fr);
        text-align: left;
        column-gap: 25px;
    }

    .qr-panel .qr-kicker,
    .qr-panel h2,
    .qr-panel > p {
        grid-column: 2;
    }

    .qr-frame {
        grid-column: 1;
        grid-row: 1 / 6;
        align-self: center;
    }

    .uuid-display,
    .qr-download {
        grid-column: 2;
    }
}

@media (max-width: 620px) {
    .workspace-page {
        padding: 23px 16px 35px;
    }

    .workspace-heading {
        display: block;
    }

    .workspace-heading h1 {
        font-size: 24px;
    }

    .workspace-heading .action-button,
    .branch-detail-heading .outline-action {
        width: 100%;
        margin-top: 17px;
    }

    .branch-summary {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .branch-summary > div {
        min-width: 0;
        padding: 10px;
    }

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

    .branch-card-visual {
        height: 118px;
    }

    .form-card {
        padding: 17px;
    }

    .form-card-heading {
        flex-wrap: wrap;
    }

    .locate-button {
        width: 100%;
        margin: 10px 0 0;
        justify-content: center;
    }

    .branch-map {
        height: 325px;
    }

    .map-selection {
        align-items: flex-start;
        flex-direction: column;
    }

    .coordinate-values {
        width: 100%;
    }

    .coordinate-values span {
        min-width: 0;
        flex: 1;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions > * {
        width: 100%;
    }

    .detail-title-line {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-map {
        height: 340px;
    }

    .qr-panel {
        display: block;
        padding: 24px 19px;
        text-align: center;
    }

    .qr-frame {
        width: 195px;
        height: 195px;
    }

    .qr-panel .uuid-display {
        text-align: left;
    }

    .branch-meta-card {
        grid-template-columns: 1fr;
    }

    .branch-meta-card > div,
    .branch-meta-card > div:first-child,
    .branch-meta-card > div:last-child {
        padding: 12px 0;
        border-right: 0;
        border-bottom: 1px solid #e8e8ed;
    }

    .branch-meta-card > div:first-child {
        padding-top: 0;
    }

    .branch-meta-card > div:last-child {
        padding-bottom: 0;
        border-bottom: 0;
    }
}

/* Shifts */
.shifts-section {
    margin-top: 18px;
    padding: 22px;
    border: 1px solid #e3e4eb;
    border-radius: 15px;
    background: white;
    box-shadow: var(--shadow);
}

.shifts-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.shifts-heading .section-kicker {
    margin-bottom: 7px;
}

.shifts-heading h2 {
    margin: 0;
    font-size: 16px;
    letter-spacing: -.025em;
}

.shifts-heading p {
    margin: 5px 0 0;
    color: #9294a0;
    font-size: 9px;
}

.add-shift-button {
    min-height: 38px;
}

.shift-grid {
    display: grid;
    margin-top: 19px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px;
}

.shift-card {
    position: relative;
    overflow: hidden;
    padding: 17px;
    border: 1px solid #e7e7ed;
    border-radius: 12px;
    background:
        radial-gradient(circle at 96% 2%, rgba(103, 88, 233, .08), transparent 34%),
        #fcfcfe;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.shift-card:hover {
    border-color: #d1cdf2;
    box-shadow: 0 9px 25px rgba(37, 34, 75, .08);
    transform: translateY(-2px);
}

.shift-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.shift-symbol {
    display: grid;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    place-items: center;
    color: #da8c38;
    background: #fff3e5;
}

.shift-symbol.night {
    color: #6557d7;
    background: #ece9ff;
}

.shift-symbol svg {
    width: 17px;
    height: 17px;
}

.shift-edit {
    display: grid;
    width: 29px;
    height: 29px;
    border: 1px solid #e4e5ea;
    border-radius: 7px;
    place-items: center;
    color: #8c8e9b;
    background: white;
}

.shift-edit:hover {
    border-color: #cbc6f3;
    color: var(--primary);
    background: #f6f4ff;
}

.shift-edit svg {
    width: 13px;
    height: 13px;
}

.shift-card h3 {
    margin: 13px 0 15px;
    color: #2c2d3a;
    font-size: 12px;
}

.shift-time {
    display: flex;
    padding: 12px;
    border: 1px solid #ececf1;
    border-radius: 9px;
    align-items: center;
    justify-content: space-between;
    background: white;
    gap: 8px;
}

.shift-time > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shift-time > div:last-child {
    text-align: right;
}

.shift-time span {
    color: #a2a3ae;
    font-size: 6px;
    font-weight: 800;
    letter-spacing: .08em;
}

.shift-time strong {
    color: #292a38;
    font-size: 17px;
    letter-spacing: -.025em;
}

.time-connector {
    display: flex;
    min-width: 42px;
    align-items: center;
    color: var(--primary) !important;
}

.time-connector i {
    height: 1px;
    flex: 1;
    background: #dcd9f7;
}

.time-connector svg {
    width: 11px;
    height: 11px;
}

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

.shift-foot > span {
    display: inline-flex;
    align-items: center;
    color: #898b98;
    font-size: 8px;
    font-weight: 600;
    gap: 5px;
}

.shift-foot svg {
    width: 12px;
    height: 12px;
}

.shift-foot em {
    padding: 4px 7px;
    border-radius: 5px;
    color: #6658d8;
    font-size: 7px;
    font-style: normal;
    font-weight: 800;
    background: #eeebff;
}

.shift-empty {
    display: flex;
    min-height: 94px;
    margin-top: 18px;
    padding: 16px;
    border: 1px dashed #d9dae3;
    border-radius: 11px;
    align-items: center;
    background: #fafafd;
    gap: 12px;
}

.shift-empty > span {
    display: grid;
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    border-radius: 10px;
    place-items: center;
    color: var(--primary);
    background: #eeebff;
}

.shift-empty > span svg {
    width: 19px;
    height: 19px;
}

.shift-empty h3 {
    margin: 0;
    font-size: 11px;
}

.shift-empty p {
    margin: 4px 0 0;
    color: #999aa6;
    font-size: 8px;
}

.shift-empty > a {
    margin-left: auto;
    color: var(--primary);
    font-size: 8px;
    font-weight: 800;
}

.shift-form-page {
    max-width: 1120px;
}

.shift-form-page .workspace-heading {
    align-items: flex-start;
}

.shift-form {
    display: grid;
    margin-top: 24px;
    grid-template-columns: minmax(0, 1.45fr) minmax(270px, .55fr);
    gap: 18px;
}

.shift-form-card,
.shift-preview-card {
    border: 1px solid #e3e4eb;
    border-radius: 15px;
    background: white;
    box-shadow: var(--shadow);
}

.shift-form-card {
    padding: 25px;
}

.shift-form-intro {
    display: flex;
    padding-bottom: 19px;
    border-bottom: 1px solid #eeeeF2;
    align-items: center;
    gap: 11px;
}

.shift-form-icon {
    display: grid;
    width: 39px;
    height: 39px;
    flex: 0 0 auto;
    border-radius: 10px;
    place-items: center;
    color: var(--primary);
    background: #eeebff;
}

.shift-form-icon svg {
    width: 19px;
    height: 19px;
}

.shift-form-intro h2 {
    margin: 0;
    font-size: 13px;
}

.shift-form-intro p {
    margin: 4px 0 0;
    color: #999aa7;
    font-size: 8px;
}

.shift-name-field {
    margin-top: 22px;
}

.time-fields {
    display: grid;
    margin-top: 21px;
    grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
    align-items: end;
    gap: 10px;
}

.time-input-wrap {
    position: relative;
    display: flex;
    height: 58px;
    margin-top: 9px;
    align-items: center;
}

.time-input-wrap > span {
    position: absolute;
    z-index: 1;
    left: 11px;
    display: grid;
    width: 33px;
    height: 33px;
    border-radius: 8px;
    place-items: center;
    color: #279d73;
    background: #e9f7f2;
    pointer-events: none;
}

.time-input-wrap.end > span {
    color: #e07934;
    background: #fff1e6;
}

.time-input-wrap svg {
    width: 16px;
    height: 16px;
}

.time-input-wrap input {
    width: 100%;
    height: 100%;
    padding: 0 13px 0 55px;
    border: 1px solid #dedfe7;
    outline: 0;
    border-radius: 11px;
    color: #292a38;
    font-size: 19px;
    font-weight: 700;
    background: white;
    transition: border-color .2s, box-shadow .2s;
}

.time-input-wrap input:focus {
    border-color: #9186ed;
    box-shadow: 0 0 0 4px rgba(103, 88, 233, .09);
}

.time-field-arrow {
    display: grid;
    width: 28px;
    height: 58px;
    place-items: center;
    color: #aaaab5;
}

.time-field-arrow svg {
    width: 16px;
    height: 16px;
}

.overnight-note {
    display: flex;
    margin-top: 22px;
    padding: 13px;
    border: 1px solid #e2dff7;
    border-radius: 9px;
    align-items: flex-start;
    color: #6d659e;
    background: #f7f5ff;
    gap: 9px;
}

.overnight-note svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: var(--primary);
}

.overnight-note p {
    margin: 0;
    font-size: 8px;
    line-height: 1.6;
}

.overnight-note strong {
    color: #51488a;
}

.shift-preview-card {
    position: relative;
    display: flex;
    overflow: hidden;
    padding: 27px 22px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background:
        radial-gradient(circle at 50% 33%, rgba(103, 88, 233, .13), transparent 34%),
        white;
}

.preview-label {
    position: absolute;
    top: 20px;
    color: var(--primary);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: .12em;
}

.preview-clock {
    position: relative;
    width: 92px;
    height: 92px;
    margin-top: 15px;
    border: 8px solid #eeebff;
    border-radius: 50%;
    background: white;
    box-shadow: 0 13px 28px rgba(103, 88, 233, .14);
}

.clock-ring {
    position: absolute;
    inset: 3px;
    border: 1px dashed #d6d1f7;
    border-radius: 50%;
}

.clock-hand {
    position: absolute;
    width: 2px;
    left: calc(50% - 1px);
    bottom: 50%;
    border-radius: 999px;
    background: #343544;
    transform-origin: bottom;
}

.clock-hand.hour {
    height: 21px;
    transform: rotate(35deg);
}

.clock-hand.minute {
    height: 29px;
    background: var(--primary);
    transform: rotate(135deg);
}

.preview-clock > i {
    position: absolute;
    width: 7px;
    height: 7px;
    left: calc(50% - 3.5px);
    top: calc(50% - 3.5px);
    border: 2px solid white;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.shift-preview-card h2 {
    margin: 20px 0 9px;
    font-size: 14px;
}

.preview-time-range {
    display: flex;
    align-items: center;
    color: var(--primary);
    gap: 8px;
}

.preview-time-range strong {
    color: #272835;
    font-size: 18px;
}

.preview-time-range span {
    color: #aaaab5;
}

.shift-preview-card > small {
    margin-top: 10px;
    color: #999aa6;
    font-size: 8px;
}

.shift-actions {
    grid-column: 1 / -1;
}

.save-shift-button {
    min-width: 175px;
}

@media (max-width: 1050px) {
    .shift-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .shifts-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .add-shift-button {
        width: 100%;
    }

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

    .shift-preview-card {
        min-height: 280px;
        order: 1;
    }

    .shift-form-card {
        order: 2;
    }

    .shift-actions {
        order: 3;
    }
}

@media (max-width: 560px) {
    .shifts-section {
        padding: 17px;
    }

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

    .shift-empty {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .shift-empty > a {
        width: 100%;
        margin: 5px 0 0 51px;
    }

    .shift-form-card {
        padding: 18px;
    }

    .time-fields {
        grid-template-columns: 1fr;
    }

    .time-field-arrow {
        width: 100%;
        height: 24px;
    }

    .time-field-arrow svg {
        transform: rotate(90deg);
    }

    .shift-actions {
        flex-direction: column-reverse;
    }

    .shift-actions > * {
        width: 100%;
    }
}

/* Larger table and card typography */
.worker-table th,
table th {
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 10px;
    letter-spacing: .09em;
}

.worker-table td,
table td {
    height: 84px;
    font-size: 12px;
}

.worker-avatar {
    width: 42px;
    height: 42px;
    font-size: 10px;
}

.worker-identity strong {
    font-size: 14px;
}

.worker-identity small {
    font-size: 11px;
}

.hik-code {
    padding: 8px 10px;
    font-size: 11px;
}

.worker-branch,
.worker-shift strong,
.not-assigned {
    font-size: 12px;
}

.worker-branch svg {
    width: 17px;
    height: 17px;
}

.worker-shift small {
    font-size: 10px;
}

.worker-status {
    padding: 8px 11px;
    font-size: 10px;
}

.worker-actions > a,
.worker-actions button {
    width: 34px;
    height: 34px;
}

.worker-actions svg {
    width: 16px;
    height: 16px;
}

.branch-summary > div {
    min-width: 178px;
    padding: 15px 17px;
}

.branch-summary strong,
.worker-stats strong {
    font-size: 20px;
}

.branch-summary small,
.worker-stats small {
    font-size: 11px;
}

.branch-card-body {
    padding: 21px;
}

.branch-title-row h2 {
    font-size: 18px;
}

.branch-title-row p {
    margin-top: 7px;
    font-size: 12px;
}

.branch-status {
    padding: 7px 10px;
    font-size: 10px;
}

.map-coordinates {
    padding: 6px 9px;
    font-size: 10px;
}

.branch-uuid {
    margin-top: 19px;
    padding-top: 16px;
}

.branch-uuid > svg {
    width: 20px;
    height: 20px;
}

.branch-uuid span {
    font-size: 8px;
}

.branch-uuid code {
    font-size: 11px;
}

.shift-card {
    padding: 21px;
}

.shift-symbol {
    width: 39px;
    height: 39px;
}

.shift-symbol svg {
    width: 20px;
    height: 20px;
}

.shift-card h3 {
    margin-top: 16px;
    font-size: 17px;
}

.shift-time {
    padding: 15px;
}

.shift-time span {
    font-size: 9px;
}

.shift-time strong {
    font-size: 23px;
}

.shift-foot > span,
.shift-foot em {
    font-size: 11px;
}

.shift-foot svg {
    width: 15px;
    height: 15px;
}

.qr-kicker,
.preview-label {
    font-size: 9px;
}

.qr-panel h2 {
    font-size: 20px;
}

.uuid-display > span,
.branch-meta-card span,
.detail-coordinates small {
    font-size: 8px;
}

.uuid-display code,
.branch-meta-card strong,
.detail-coordinates code {
    font-size: 11px;
}

.worker-mobile-card {
    padding: 18px;
}

.worker-mobile-data {
    padding: 15px;
}

.worker-mobile-data span {
    font-size: 9px;
}

.worker-mobile-data strong,
.worker-mobile-data code {
    font-size: 12px;
}

.worker-mobile-data small {
    font-size: 10px;
}

.worker-mobile-actions a,
.worker-mobile-actions button {
    height: 40px;
    font-size: 10px;
}

/* Daily wage */
.worker-assignment-card .assignment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.worker-wage-field {
    grid-column: 1 / -1;
    max-width: calc(50% - 13px);
}

.money-input input {
    padding-right: 76px !important;
}

.money-suffix {
    position: absolute;
    right: 20px;
    color: #6857ec;
    font-size: 14px;
    font-weight: 800;
    pointer-events: none;
}

.field-hint {
    display: block;
    margin-top: 9px;
    color: #9197aa;
    font-size: 11px;
    line-height: 1.5;
}

.preview-wage {
    border-color: rgba(104, 87, 236, .22) !important;
    background: linear-gradient(135deg, #f7f5ff, #fff) !important;
}

.preview-wage strong {
    color: #5f4ee8 !important;
}

.daily-wage {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 98px;
}

.daily-wage strong {
    color: #17192b;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.daily-wage small {
    color: #969bad;
    font-size: 9px;
    font-weight: 600;
}

.worker-mobile-data .mobile-wage {
    border-color: rgba(104, 87, 236, .18);
    background: #f8f7ff;
}

.worker-mobile-data .mobile-wage strong {
    color: #5f4ee8;
}

@media (max-width: 780px) {
    .worker-wage-field {
        max-width: none;
    }
}

@media (max-width: 560px) {
    .worker-assignment-card .assignment-grid {
        grid-template-columns: 1fr;
    }

    .worker-wage-field {
        grid-column: auto;
    }
}

.branch-card-body {
    padding: 21px;
}

.branch-title-row h2 {
    font-size: 18px;
}

.branch-title-row p {
    margin-top: 7px;
    font-size: 12px;
}

.branch-status {
    padding: 7px 10px;
    font-size: 10px;
}

.branch-uuid span {
    font-size: 8px;
}

.branch-uuid code,
.map-coordinates {
    font-size: 11px;
}

.shift-card {
    padding: 21px;
}

.shift-card h3 {
    font-size: 17px;
}

.shift-time {
    padding: 15px;
}

.shift-time span {
    font-size: 9px;
}

.shift-time strong {
    font-size: 23px;
}

.shift-foot > span,
.shift-foot em {
    font-size: 11px;
}

@media (max-width: 620px) {
    .branch-card-body {
        padding: 18px;
    }

    .branch-title-row h2 {
        font-size: 17px;
    }

    .shift-card {
        padding: 18px;
    }

    .shift-time strong {
        font-size: 21px;
    }
}

/* Larger, cleaner type and form controls */
.brand {
    font-size: 24px;
}

.nav-link {
    height: 50px;
    font-size: 15px;
}

.top-profile strong {
    font-size: 13px;
}

.top-profile small {
    font-size: 10px;
}

.workspace-page {
    padding-top: 39px;
}

.workspace-heading {
    min-height: 68px;
}

.section-kicker {
    margin-bottom: 10px;
    font-size: 11px;
}

.workspace-heading h1 {
    font-size: 32px;
}

.back-link {
    margin-bottom: 14px;
    font-size: 11px;
}

.action-button,
.outline-action,
.cancel-button {
    min-height: 48px;
    padding-right: 20px;
    padding-left: 20px;
    font-size: 13px;
}

.form-card {
    padding: 28px;
}

.form-step {
    width: 40px;
    height: 40px;
    font-size: 11px;
}

.form-card-heading h2,
.detail-panel-head h2 {
    font-size: 16px;
}

.field label,
.field-label {
    font-size: 14px;
}

.input-wrap {
    height: 60px;
    margin-top: 11px;
}

.input-wrap input {
    font-size: 15px;
}

.branch-input input {
    padding-left: 49px;
}

.input-wrap > svg {
    left: 17px;
    width: 20px;
    height: 20px;
}

.select-wrap {
    height: 60px;
    margin-top: 11px;
}

.select-wrap select {
    padding-left: 49px;
    font-size: 14px;
}

.select-wrap > svg:first-child {
    left: 17px;
    width: 20px;
    height: 20px;
}

.field-error {
    font-size: 11px;
}

.branch-title-row h2 {
    font-size: 16px;
}

.branch-title-row p {
    font-size: 11px;
}

.branch-uuid code,
.map-coordinates {
    font-size: 9px;
}

.branch-summary strong,
.worker-stats strong {
    font-size: 18px;
}

.branch-summary small,
.worker-stats small {
    font-size: 10px;
}

.shifts-heading h2 {
    font-size: 19px;
}

.shift-card h3 {
    font-size: 15px;
}

.shift-time span {
    font-size: 8px;
}

.shift-time strong {
    font-size: 20px;
}

.shift-foot > span,
.shift-foot em {
    font-size: 9px;
}

.worker-search input,
.worker-filters select,
.filter-button {
    font-size: 11px;
}

.worker-table th {
    font-size: 9px;
}

.worker-table td {
    height: 78px;
}

.worker-identity strong {
    font-size: 12px;
}

.worker-identity small,
.hik-code,
.worker-branch,
.worker-shift strong,
.not-assigned {
    font-size: 10px;
}

.worker-shift small {
    font-size: 9px;
}

.worker-status {
    padding: 7px 10px;
    font-size: 9px;
}

.worker-form {
    grid-template-columns: minmax(0, 1.62fr) minmax(290px, .38fr);
    gap: 22px;
}

.worker-form-main {
    gap: 20px;
}

.worker-account-card,
.worker-assignment-card {
    padding: 32px;
}

.worker-form-grid {
    margin-top: 28px;
    gap: 27px 24px;
}

.worker-password-field .input-wrap {
    max-width: none;
}

.assignment-grid {
    gap: 24px;
}

.worker-preview {
    min-height: 470px;
    padding: 34px 27px;
}

.worker-preview h2 {
    font-size: 18px;
}

.worker-preview-username {
    font-size: 11px;
}

.worker-preview-info span {
    font-size: 8px;
}

.worker-preview-info strong {
    font-size: 11px;
}

.worker-preview-role {
    font-size: 10px;
}

.shift-form-card {
    padding: 31px;
}

.shift-form-intro h2 {
    font-size: 16px;
}

.time-input-wrap {
    height: 64px;
}

.time-input-wrap input {
    font-size: 22px;
}

.overnight-note p {
    font-size: 10px;
}

@media (max-width: 980px) {
    .worker-form {
        grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
    }
}

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

    .worker-mobile-data span {
        font-size: 8px;
    }

    .worker-mobile-data strong,
    .worker-mobile-data code {
        font-size: 11px;
    }

    .worker-mobile-data small {
        font-size: 9px;
    }
}

@media (max-width: 560px) {
    .workspace-page {
        padding-top: 27px;
    }

    .workspace-heading h1 {
        font-size: 28px;
    }

    .worker-account-card,
    .worker-assignment-card,
    .form-card {
        padding: 20px;
    }

    .worker-form-grid {
        gap: 22px;
    }

    .input-wrap,
    .select-wrap {
        height: 58px;
    }
}

/* Worker management */
.workers-page {
    max-width: 1500px;
}

.worker-stats {
    display: flex;
    margin-top: 24px;
    gap: 12px;
}

.worker-stats article {
    display: flex;
    min-width: 165px;
    padding: 13px 15px;
    border: 1px solid #e4e5ec;
    border-radius: 11px;
    align-items: center;
    background: white;
    box-shadow: 0 4px 15px rgba(29, 27, 61, .03);
    gap: 11px;
}

.worker-stat-icon {
    display: grid;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    place-items: center;
}

.worker-stat-icon svg {
    width: 18px;
    height: 18px;
}

.worker-stat-icon.violet {
    color: var(--primary);
    background: #eeebff;
}

.worker-stat-icon.green {
    background: #e8f7f1;
}

.worker-stat-icon.green i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #28a879;
    box-shadow: 0 0 0 5px rgba(40, 168, 121, .13);
}

.worker-stat-icon.gray {
    color: #898b98;
    background: #f0f0f3;
}

.worker-stats article > div {
    display: flex;
    flex-direction: column;
}

.worker-stats strong {
    font-size: 15px;
}

.worker-stats small {
    margin-top: 2px;
    color: #9698a4;
    font-size: 8px;
}

.worker-filters {
    display: grid;
    margin-top: 19px;
    padding: 13px;
    border: 1px solid #e3e4eb;
    border-radius: 12px;
    grid-template-columns: minmax(240px, 1fr) 180px 200px 145px auto auto;
    align-items: center;
    background: white;
    box-shadow: var(--shadow);
    gap: 9px;
}

.worker-search {
    position: relative;
    display: flex;
    height: 39px;
    align-items: center;
}

.worker-search svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    color: #9b9da9;
}

.worker-search input,
.worker-filters select {
    width: 100%;
    height: 39px;
    border: 1px solid #e0e1e8;
    outline: 0;
    border-radius: 8px;
    color: #666876;
    font-size: 9px;
    background: #fafafd;
}

.worker-search input {
    padding: 0 12px 0 38px;
}

.worker-filters select {
    padding: 0 10px;
}

.worker-search input:focus,
.worker-filters select:focus {
    border-color: #9e95ec;
    box-shadow: 0 0 0 3px rgba(103, 88, 233, .08);
    background: white;
}

.filter-button {
    display: inline-flex;
    height: 39px;
    padding: 0 13px;
    border: 0;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    font-size: 9px;
    font-weight: 700;
    background: var(--primary);
    gap: 6px;
}

.filter-button svg,
.clear-filters svg {
    width: 14px;
    height: 14px;
}

.clear-filters {
    display: grid;
    width: 39px;
    height: 39px;
    border: 1px solid #e0e1e8;
    border-radius: 8px;
    place-items: center;
    color: #8b8d99;
    background: white;
}

.clear-filters:hover {
    border-color: #efb7bd;
    color: #dc5a67;
    background: #fff5f6;
}

.worker-table-card {
    overflow: hidden;
    margin-top: 15px;
    border: 1px solid #e3e4eb;
    border-radius: 13px;
    background: white;
    box-shadow: var(--shadow);
}

.worker-table-wrap {
    overflow-x: auto;
}

.worker-table th {
    padding-top: 12px;
    padding-bottom: 12px;
}

.worker-table td {
    height: 69px;
}

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

.worker-avatar {
    display: grid;
    width: 37px;
    height: 37px;
    flex: 0 0 auto;
    border-radius: 10px;
    place-items: center;
    color: white;
    font-size: 8px;
    font-weight: 800;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .17), transparent),
        #6255d5;
    box-shadow: 0 5px 12px rgba(98, 85, 213, .18);
}

.worker-identity > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.worker-identity strong {
    color: #343542;
    font-size: 9px;
}

.worker-identity small {
    color: #9b9ca8;
    font-size: 8px;
}

.hik-code {
    display: inline-flex;
    padding: 6px 8px;
    border: 1px solid #e5e3f5;
    border-radius: 6px;
    color: #615a91;
    font-size: 8px;
    background: #f7f6ff;
}

.worker-branch {
    display: inline-flex;
    align-items: center;
    color: #626471;
    font-size: 8px;
    gap: 6px;
}

.worker-branch svg {
    width: 14px;
    height: 14px;
    color: #8a80e2;
}

.worker-shift {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.worker-shift strong {
    color: #555765;
    font-size: 8px;
}

.worker-shift small,
.not-assigned {
    color: #a0a1ac;
    font-size: 7px;
}

.worker-status {
    display: inline-flex;
    padding: 6px 8px;
    border-radius: 6px;
    align-items: center;
    color: #238663;
    font-size: 7px;
    font-weight: 800;
    background: #e9f7f2;
    gap: 5px;
}

.worker-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #29aa7b;
}

.worker-status.inactive {
    color: #777987;
    background: #eeeef2;
}

.worker-status.inactive i {
    background: #92949f;
}

.worker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.worker-actions > a,
.worker-actions button {
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #e2e3e8;
    border-radius: 7px;
    cursor: pointer;
    place-items: center;
    color: #838592;
    background: white;
}

.worker-actions svg {
    width: 14px;
    height: 14px;
}

.worker-actions > a:hover {
    border-color: #cbc6f3;
    color: var(--primary);
    background: #f6f4ff;
}

.worker-actions button.deactivate:hover {
    border-color: #efbcc1;
    color: #dc5966;
    background: #fff4f5;
}

.worker-actions button.activate:hover {
    border-color: #aee0ce;
    color: #238663;
    background: #effaf6;
}

.worker-mobile-list {
    display: none;
}

.pagination {
    display: flex;
    min-height: 50px;
    padding: 10px 17px;
    border-top: 1px solid #ebebef;
    align-items: center;
    justify-content: flex-end;
    color: #888a97;
    font-size: 8px;
    gap: 9px;
}

.pagination a {
    display: grid;
    width: 28px;
    height: 28px;
    border: 1px solid #e1e2e8;
    border-radius: 7px;
    place-items: center;
    color: var(--primary);
}

.worker-empty {
    min-height: 330px;
}

.worker-form-page {
    max-width: 1210px;
}

.worker-form-page .workspace-heading {
    align-items: flex-start;
}

.worker-form {
    display: grid;
    margin-top: 24px;
    grid-template-columns: minmax(0, 1.55fr) minmax(265px, .45fr);
    gap: 18px;
}

.worker-form-main {
    display: grid;
    gap: 16px;
}

.worker-form-alert {
    margin-top: 0;
}

.worker-form-grid {
    display: grid;
    margin-top: 22px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 19px 16px;
}

.worker-password-field {
    grid-column: 1 / -1;
}

.worker-password-field .field-label > span {
    color: #999ba7;
    font-size: 8px;
    font-weight: 500;
}

.worker-password-field .input-wrap {
    max-width: calc(50% - 8px);
}

.select-wrap {
    position: relative;
    display: flex;
    height: 52px;
    margin-top: 9px;
    align-items: center;
}

.select-wrap > svg:first-child {
    position: absolute;
    z-index: 1;
    left: 15px;
    width: 18px;
    height: 18px;
    color: #9da0ad;
    pointer-events: none;
}

.select-wrap select {
    width: 100%;
    height: 100%;
    padding: 0 42px 0 44px;
    border: 1px solid #dedfe7;
    outline: 0;
    border-radius: 11px;
    appearance: none;
    color: #4f515f;
    font-size: 10px;
    background: white;
}

.select-wrap select:focus {
    border-color: #9186ed;
    box-shadow: 0 0 0 4px rgba(103, 88, 233, .09);
}

.select-wrap select:disabled {
    color: #aaaab5;
    background: #f3f3f6;
}

.select-arrow {
    position: absolute;
    right: 14px;
    width: 13px;
    height: 13px;
    color: #9b9ca8;
    pointer-events: none;
}

.assignment-note {
    display: flex;
    margin-top: 18px;
    padding: 11px 13px;
    border: 1px solid #e4e1f8;
    border-radius: 8px;
    align-items: center;
    color: #777197;
    background: #f8f7ff;
    gap: 8px;
}

.assignment-note svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    color: var(--primary);
}

.assignment-note p {
    margin: 0;
    font-size: 8px;
}

.worker-preview {
    position: sticky;
    top: 98px;
    display: flex;
    min-height: 420px;
    align-self: start;
    overflow: hidden;
    padding: 31px 23px;
    border: 1px solid #e3e4eb;
    border-radius: 15px;
    align-items: center;
    flex-direction: column;
    text-align: center;
    background:
        radial-gradient(circle at 50% 17%, rgba(103, 88, 233, .14), transparent 27%),
        white;
    box-shadow: var(--shadow);
}

.worker-preview .preview-label {
    position: static;
}

.worker-preview-avatar {
    display: grid;
    width: 76px;
    height: 76px;
    margin-top: 27px;
    border: 6px solid #eeebff;
    border-radius: 21px;
    place-items: center;
    color: white;
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(145deg, #776aeb, #5548ca);
    box-shadow: 0 13px 27px rgba(103, 88, 233, .22);
}

.worker-preview h2 {
    margin: 18px 0 4px;
    font-size: 15px;
}

.worker-preview-username {
    color: #8f919e;
    font-size: 9px;
}

.worker-preview-info {
    width: 100%;
    margin-top: 23px;
    border-top: 1px solid #ececf1;
}

.worker-preview-info > div {
    display: flex;
    min-height: 45px;
    padding: 10px 0;
    border-bottom: 1px solid #ececf1;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.worker-preview-info span {
    color: #a0a1ad;
    font-size: 6px;
    font-weight: 800;
    letter-spacing: .09em;
}

.worker-preview-info strong {
    overflow: hidden;
    color: #5c5e6b;
    font-size: 8px;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.worker-preview-role {
    display: inline-flex;
    margin-top: 17px;
    padding: 6px 10px;
    border-radius: 7px;
    align-items: center;
    color: #5f54c3;
    font-size: 8px;
    font-weight: 800;
    background: #eeebff;
    gap: 6px;
}

.worker-preview-role i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.worker-form-actions {
    grid-column: 1 / -1;
}

.save-worker-button {
    min-width: 180px;
}

@media (max-width: 1200px) {
    .worker-filters {
        grid-template-columns: minmax(220px, 1fr) 160px 180px 130px auto auto;
    }
}

@media (max-width: 980px) {
    .worker-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .worker-search {
        grid-column: 1 / -1;
    }

    .filter-button {
        min-width: 100px;
    }

    .worker-form {
        grid-template-columns: minmax(0, 1.4fr) minmax(240px, .6fr);
    }
}

@media (max-width: 780px) {
    .worker-stats {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .worker-stats article {
        min-width: 0;
    }

    .worker-table-wrap {
        display: none;
    }

    .worker-mobile-list {
        display: grid;
        padding: 12px;
        gap: 10px;
    }

    .worker-mobile-card {
        padding: 14px;
        border: 1px solid #e7e7ed;
        border-radius: 11px;
        background: #fcfcfe;
    }

    .worker-mobile-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
    }

    .worker-mobile-data {
        display: grid;
        margin-top: 15px;
        padding: 12px;
        border-radius: 9px;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        background: #f4f4f8;
        gap: 8px;
    }

    .worker-mobile-data > div {
        display: flex;
        min-width: 0;
        flex-direction: column;
        gap: 4px;
    }

    .worker-mobile-data span {
        color: #a0a1ac;
        font-size: 6px;
        font-weight: 800;
        letter-spacing: .08em;
    }

    .worker-mobile-data strong,
    .worker-mobile-data code {
        overflow: hidden;
        color: #5e606d;
        font-size: 8px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .worker-mobile-data small {
        color: #9698a4;
        font-size: 7px;
    }

    .worker-mobile-actions {
        display: grid;
        margin-top: 12px;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .worker-mobile-actions a,
    .worker-mobile-actions button {
        display: flex;
        width: 100%;
        height: 34px;
        border: 1px solid #dedfe7;
        border-radius: 8px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #686a78;
        font-size: 8px;
        font-weight: 700;
        background: white;
        gap: 6px;
    }

    .worker-mobile-actions svg {
        width: 13px;
        height: 13px;
    }

    .worker-mobile-actions button.deactivate {
        border-color: #f0c4c9;
        color: #d85664;
        background: #fff5f6;
    }

    .worker-mobile-actions button.activate {
        border-color: #bde4d6;
        color: #238663;
        background: #effaf6;
    }

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

    .worker-preview {
        position: static;
        min-height: 360px;
        order: 1;
    }

    .worker-form-main {
        order: 2;
    }

    .worker-form-actions {
        order: 3;
    }
}

@media (max-width: 560px) {
    .worker-stats {
        grid-template-columns: 1fr;
    }

    .worker-stats article {
        padding: 10px 12px;
    }

    .worker-filters {
        grid-template-columns: 1fr;
    }

    .worker-search {
        grid-column: auto;
    }

    .filter-button,
    .clear-filters {
        width: 100%;
    }

    .worker-mobile-data {
        grid-template-columns: 1fr 1fr;
    }

    .worker-mobile-data > div:last-child {
        grid-column: 1 / -1;
    }

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

    .worker-password-field {
        grid-column: auto;
    }

    .worker-password-field .input-wrap {
        max-width: none;
    }

    .worker-form-actions {
        flex-direction: column-reverse;
    }

    .worker-form-actions > * {
        width: 100%;
    }
}

/* Final worker form sizing and readability */
.worker-form {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, .35fr);
    gap: 24px;
}

.worker-account-card,
.worker-assignment-card {
    padding: 34px;
}

.worker-form .form-card-heading h2 {
    font-size: 17px;
}

.worker-form-grid {
    margin-top: 30px;
    gap: 29px 26px;
}

.worker-form .field label,
.worker-form .field-label {
    font-size: 15px;
}

.worker-form .input-wrap,
.worker-form .select-wrap {
    height: 64px;
    margin-top: 12px;
}

.worker-form .input-wrap input,
.worker-form .select-wrap select {
    font-size: 16px;
}

.worker-form .select-wrap select {
    padding-left: 51px;
}

.worker-password-field .input-wrap {
    width: 100%;
    max-width: none;
}

.worker-identity strong {
    font-size: 12px;
}

.worker-identity small,
.hik-code,
.worker-branch,
.worker-shift strong,
.not-assigned {
    font-size: 10px;
}

.worker-shift small,
.worker-status {
    font-size: 9px;
}

.worker-table th {
    font-size: 9px;
}

@media (max-width: 980px) {
    .worker-form {
        grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr);
    }
}

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

@media (max-width: 560px) {
    .worker-account-card,
    .worker-assignment-card {
        padding: 21px;
    }

    .worker-form-grid {
        gap: 23px;
    }

    .worker-form .input-wrap,
    .worker-form .select-wrap {
        height: 60px;
    }
}

/* Worker table/card readability must stay last */
.worker-table th {
    padding-top: 14px;
    padding-bottom: 14px;
    font-size: 10px;
}

.worker-table td {
    height: 84px;
    font-size: 12px;
}

.worker-avatar {
    width: 42px;
    height: 42px;
    font-size: 10px;
}

.worker-identity strong {
    font-size: 14px;
}

.worker-identity small {
    font-size: 11px;
}

.hik-code {
    padding: 8px 10px;
    font-size: 11px;
}

.worker-branch,
.worker-shift strong,
.not-assigned {
    font-size: 12px;
}

.worker-shift small,
.worker-status {
    font-size: 10px;
}

.worker-status {
    padding: 8px 11px;
}

.worker-mobile-card {
    padding: 18px;
}

.worker-mobile-data {
    padding: 15px;
}

.worker-mobile-data span {
    font-size: 9px;
}

.worker-mobile-data strong,
.worker-mobile-data code {
    font-size: 12px;
}

.worker-mobile-data small {
    font-size: 10px;
}

.worker-mobile-actions a,
.worker-mobile-actions button {
    height: 40px;
    font-size: 10px;
}
