:root {
    --primary: #4F46E5;
    --primary-strong: #3730a3;
    --primary-soft: #eef2ff;
    --ink: #11183f;
    --ink-soft: #24315f;
    --muted: #7180a5;
    --line: #e6ebf5;
    --page: #f4f7fc;
    --card: #ffffff;
    --green: #19a55b;
    --green-soft: #e9f8f0;
    --orange: #f27a1a;
    --orange-soft: #fff1e6;
    --red: #f04462;
    --red-soft: #ffe9ee;
    --blue-soft: #eff3ff;
    --shadow: 0 16px 36px rgba(31, 45, 92, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--ink);
    background: var(--page);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

[hidden] {
    display: none !important;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: linear-gradient(180deg, #f7f9fd 0%, #eef3fb 100%);
}

.login-card {
    width: min(100%, 390px);
    padding: 22px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

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

.login-brand p,
.topbar-copy p,
.label-muted {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.login-brand h1,
.topbar-copy h1 {
    margin: 2px 0 0;
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.2;
}

.avatar-photo,
.brand-tile {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    color: #ffffff;
    background: linear-gradient(145deg, #4c5bff, #1f2fd0);
    border-radius: 8px;
    font-weight: 900;
}

.login-form {
    display: grid;
    gap: 10px;
}

.field-label {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
}

.field-input,
.select-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    outline: none;
}

.field-input:focus,
.select-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 70, 241, 0.12);
}

.primary-action,
.danger-action,
.soft-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
    text-decoration: none;
}

.primary-action {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 10px 20px rgba(52, 70, 241, 0.20);
}

.primary-action:hover {
    background: var(--primary-strong);
}

.danger-action {
    color: #ffffff;
    background: linear-gradient(135deg, #ff6174, #f04462);
}

.soft-action {
    color: var(--primary);
    background: var(--primary-soft);
}

.compact-alert {
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    background: var(--page);
}

.desktop-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 18px;
    background: #ffffff;
    border-right: 1px solid var(--line);
}

.desktop-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 8px 20px;
}

.desktop-brand strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
}

.desktop-brand span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.desktop-nav {
    display: grid;
    gap: 5px;
    overflow-y: auto;
}

.desktop-nav button,
.desktop-logout {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 850;
    text-align: left;
}

.desktop-nav button.active,
.desktop-nav button:hover {
    color: var(--primary);
    background: var(--primary-soft);
}

.desktop-logout {
    margin-top: auto;
    color: var(--red);
}

.app-frame {
    width: 100%;
    max-width: 1240px;
    min-height: 100vh;
    padding: 22px 28px 120px;
}

.app-topbar {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.icon-button {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    border-radius: 8px;
}

.icon-button:hover {
    background: #ffffff;
}

.icon-button svg,
.primary-action svg,
.danger-action svg,
.soft-action svg,
.desktop-nav svg,
.desktop-logout svg,
.bottom-nav svg,
.shortcut svg,
.card-action svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.topbar-copy {
    min-width: 0;
    text-align: center;
}

.topbar-copy h1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screen-root {
    display: grid;
    gap: 14px;
}

.screen-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.desktop-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 14px;
}

.desktop-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.app-card,
.task-card,
.protocol-card,
.client-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(31, 45, 92, 0.045);
}

.app-card {
    padding: 16px;
}

.card-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    min-width: 0;
}

.card-title > * {
    min-width: 0;
}

.card-title h2,
.card-title h3 {
    margin: 0;
    color: var(--ink);
    font-size: 15px;
    font-weight: 900;
}

.card-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.time-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.time-value {
    color: var(--primary);
    font-size: 30px;
    font-weight: 950;
    line-height: 1;
}

.small-caption {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

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

.stat-card {
    min-height: 78px;
    padding: 12px;
    background: #f6f8fd;
    border: 1px solid #edf1f8;
    border-radius: 8px;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.stat-card strong {
    display: block;
    margin-top: 10px;
    color: var(--ink);
    font-size: 18px;
    font-weight: 950;
}

.stat-card strong.primary {
    color: var(--primary);
}

.shortcut-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.shortcut {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 10px 4px;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 850;
}

.shortcut span:first-child {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: var(--primary-soft);
    border-radius: 8px;
}

.segmented {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    padding: 4px;
    background: #eef2f8;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.segmented button {
    min-height: 32px;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 850;
}

.segmented button.active {
    color: #ffffff;
    background: var(--primary);
    box-shadow: 0 8px 16px rgba(52, 70, 241, 0.18);
}

.task-list,
.protocol-list,
.settings-list,
.timeline-list {
    display: grid;
    gap: 10px;
}

.task-card,
.protocol-card {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 14px 14px 14px 18px;
    overflow: hidden;
}

.task-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 4px;
    background: var(--primary);
    border-radius: 0 8px 8px 0;
}

.task-card.orange::before {
    background: var(--orange);
}

.task-card.green::before {
    background: var(--green);
}

.task-card strong,
.protocol-card strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 900;
}

.task-card small,
.protocol-card small,
.meta-line {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

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

.badge-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    max-width: 100%;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 8px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge-green {
    color: var(--green);
    background: var(--green-soft);
}

.badge-orange {
    color: var(--orange);
    background: var(--orange-soft);
}

.badge-red {
    color: var(--red);
    background: var(--red-soft);
}

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

.leave-balance .app-card strong {
    display: block;
    margin: 8px 0 4px;
    color: var(--primary);
    font-size: 26px;
    font-weight: 950;
}

.leave-balance .app-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.leave-screen {
    display: grid;
    gap: 14px;
}

.leave-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border-color: #e6ebf5;
}

.leave-hero-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.leave-hero-copy span,
.leave-hero-copy small,
.leave-balance-card span,
.leave-balance-card small {
    color: #60708d;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
}

.leave-hero-copy strong {
    color: var(--ink);
    font-size: 28px;
    font-weight: 760;
    line-height: 1;
}

.leave-primary-action {
    background: var(--primary);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.18);
}

.leave-primary-action:hover {
    background: var(--primary-strong);
}

.leave-balance-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.leave-balance-card {
    min-height: 94px;
    display: grid;
    align-content: start;
    gap: 7px;
    background: #ffffff;
}

.leave-balance .leave-balance-card strong {
    margin: 0;
    color: #10183d;
    font-size: 21px;
    font-weight: 760;
    line-height: 1;
}

.leave-balance-card.blue {
    background: #f6f7ff;
    border-color: #e1e5ff;
}

.leave-balance-card.blue strong {
    color: var(--primary);
}

.leave-balance-card.neutral {
    background: #fbfcff;
    border-color: #e7edf7;
}

.leave-balance-card.neutral strong {
    color: #526089;
}

.leave-balance-card.amber {
    background: #fffaf2;
    border-color: #fde9c6;
}

.leave-balance-card.amber strong {
    color: #ca6a10;
}

.leave-form-card {
    background: #fbfcff;
}

.leave-form-card .card-title p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.leave-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.leave-form-grid label,
.leave-note-field {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.leave-form-grid .field-input,
.leave-form-grid .select-input {
    min-width: 0;
    max-width: 100%;
}

.leave-date-shell {
    width: 100%;
    height: 46px;
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.leave-date-shell:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 70, 241, 0.12);
}

.leave-date-shell .leave-date-input {
    width: 100%;
    height: 44px;
    display: block;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: 0 14px;
    color: var(--ink);
    background: transparent;
    border: 0;
    outline: 0;
    font: inherit;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    line-height: 44px;
}

.leave-date-shell .leave-date-input::-webkit-date-and-time-value {
    min-width: 0;
    text-align: left;
}

.leave-usage-summary {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    padding: 12px;
    color: #526089;
    background: #f7f9ff;
    border: 1px solid #e4e9ff;
    border-radius: 8px;
}

.leave-usage-summary.ok {
    background: #f5fbf8;
    border-color: #d9f0e4;
}

.leave-usage-summary.warning,
.leave-usage-summary.danger {
    background: #fff7f7;
    border-color: #ffdce2;
}

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

.leave-usage-grid div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.leave-usage-summary span,
.leave-usage-summary small,
.leave-usage-summary p {
    margin: 0;
    color: #60708d;
    font-size: 11px;
    font-weight: 620;
    line-height: 1.3;
}

.leave-usage-summary strong {
    color: var(--ink);
    font-size: 17px;
    font-weight: 760;
    line-height: 1.1;
    white-space: nowrap;
}

.leave-usage-summary.ok strong {
    color: #15965a;
}

.leave-usage-summary.warning strong,
.leave-usage-summary.danger strong {
    color: var(--red);
}

.leave-usage-summary.danger p,
.leave-usage-summary.warning p {
    color: var(--red);
}

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

.leave-note-input {
    min-height: 88px;
    height: auto;
    padding-top: 12px;
    resize: vertical;
}

.leave-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.leave-tabs {
    background: #f0f3f8;
}

.leave-tabs button.active {
    background: var(--primary);
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.16);
}

.leave-list-card {
    padding: 0 16px;
}

.leave-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

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

.leave-list-main {
    min-width: 0;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
}

.leave-type-pill {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: #f0f2ff;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 760;
}

.leave-list-item.green .leave-type-pill {
    color: #15965a;
    background: #e9f8f0;
}

.leave-list-item.orange .leave-type-pill {
    color: #d96c0d;
    background: #fff1e6;
}

.leave-list-item.amber .leave-type-pill {
    color: #c66a10;
    background: #fff6e8;
}

.leave-list-item.red .leave-type-pill {
    color: var(--red);
    background: var(--red-soft);
}

.leave-list-main strong {
    display: block;
    color: var(--ink);
    font-size: 14px;
    font-weight: 760;
    line-height: 1.2;
}

.leave-list-main p,
.leave-list-main small {
    display: block;
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.leave-list-status {
    min-width: 96px;
    display: flex;
    justify-content: flex-end;
}

.leave-list-status span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 9px;
    color: var(--primary);
    background: #f0f2ff;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 730;
    white-space: nowrap;
}

.leave-list-item.green .leave-list-status span {
    color: #15965a;
    background: #e9f8f0;
}

.leave-list-status svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.leave-list-item.orange .leave-list-status span {
    color: #d96c0d;
    background: #fff1e6;
}

.leave-list-item.amber .leave-list-status span {
    color: #b86613;
    background: #fff6e8;
}

.leave-list-item.red .leave-list-status span {
    color: var(--red);
    background: var(--red-soft);
}

.leave-empty-state {
    min-height: 150px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    padding: 22px;
    text-align: center;
}

.leave-empty-state svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.leave-empty-state strong {
    color: var(--ink);
    font-size: 14px;
    font-weight: 760;
}

.leave-empty-state span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.history-row,
.info-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

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

.history-row strong,
.info-row strong {
    display: block;
    color: var(--ink);
    font-size: 13px;
    font-weight: 900;
}

.history-row span,
.info-row span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.calendar-card {
    display: grid;
    gap: 12px;
}

.calendar-head,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    text-align: center;
}

.calendar-head span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 850;
}

.calendar-day {
    height: 32px;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 800;
    border-radius: 8px;
}

.calendar-day.muted {
    color: #b7c0d4;
}

.calendar-day.active {
    color: #ffffff;
    background: var(--primary);
}

.progress-ring {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(var(--primary) 0 72%, #dfe5fb 72% 100%);
}

.progress-ring div {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: #ffffff;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 950;
}

.sales-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.sales-value {
    color: var(--ink);
    font-size: 20px;
    font-weight: 950;
}

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

.client-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
}

.client-logo {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    color: #0f9f83;
    background: #e8fbf6;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 950;
}

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

.attachment {
    height: 60px;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    background: linear-gradient(145deg, #dbe4f4, #b9c7df);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 900;
}

.signature {
    height: 72px;
    display: grid;
    place-items: center;
    color: #161b2f;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: "Segoe Script", "Brush Script MT", cursive;
    font-size: 26px;
}

.settings-item {
    min-height: 48px;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    font-weight: 850;
}

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

.profile-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.app-topbar.dashboard-topbar {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 10px;
    margin-bottom: 14px;
}

.dashboard-topbar .topbar-copy {
    text-align: left;
}

.dashboard-topbar .topbar-copy p {
    color: #697699;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.1;
}

.dashboard-topbar .topbar-copy h1 {
    margin-top: 1px;
    color: #10183d;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;
}

.profile-button {
    width: 38px;
    height: 38px;
    padding: 0;
    cursor: default;
}

.profile-button:hover {
    background: transparent;
}

.profile-button:disabled {
    opacity: 1;
}

.dashboard-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(145deg, #6b7cff, #1222b2);
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 8px 18px rgba(30, 43, 88, 0.16);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.avatar-photo.employee-avatar {
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: minmax(320px, 390px) minmax(360px, 1fr);
    gap: 18px;
    align-items: start;
}

.dashboard-phone,
.dashboard-side {
    display: grid;
    gap: 10px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #eef2f8;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(29, 42, 92, 0.035);
    padding: 12px;
}

.dashboard-card h2 {
    margin: 0 0 12px;
    color: #10183d;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
}

.dashboard-work-card {
    min-height: 90px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 13px;
    background: #f7f9ff;
    border-color: #edf2ff;
}

.dashboard-work-card.leave-green {
    background: #f0fbf5;
    border-color: #d8f2e2;
}

.dashboard-work-card.leave-orange {
    background: #fff8f1;
    border-color: #ffe8d4;
}

.dashboard-work-card.free-day {
    background: #f8faff;
}

.dashboard-work-card.special-work {
    background: #f7fbff;
    border-color: #dbeafe;
}

.dashboard-work-copy {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.dashboard-work-copy .dashboard-label {
    color: #10183d;
    font-size: 12px;
    font-weight: 600;
}

.dashboard-work-copy strong {
    color: #2031e7;
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.dashboard-work-card.leave-green .dashboard-work-copy strong,
.dashboard-work-card.leave-green .dashboard-work-meta b {
    color: #15965a;
}

.dashboard-work-card.leave-orange .dashboard-work-copy strong,
.dashboard-work-card.leave-orange .dashboard-work-meta b {
    color: #d96c0d;
}

.dashboard-work-card.free-day .dashboard-work-copy strong {
    color: #526089;
}

.dashboard-work-copy span:last-child {
    color: #687598;
    font-size: 11px;
    font-weight: 500;
}

.dashboard-work-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    margin-top: 2px;
}

.dashboard-work-meta span,
.dashboard-work-meta b {
    font-size: 10px;
    line-height: 1.1;
}

.dashboard-work-meta span {
    color: #687598;
    font-weight: 500;
}

.dashboard-work-meta b {
    color: #2031e7;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-finish {
    width: 92px;
    min-height: 40px;
    padding: 0 9px;
    color: #ffffff;
    background: #19b967;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 14px rgba(25, 185, 103, 0.18);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.dashboard-stats-today {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-stat {
    min-height: 64px;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 10px 8px;
    background: #f8faff;
    border: 1px solid #eef3fb;
    border-radius: 11px;
}

.dashboard-stat span {
    color: #526089;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.25;
}

.dashboard-stat strong {
    color: #0f173d;
    font-size: 17px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.dashboard-stat strong.primary {
    color: #2031e7;
}

.dashboard-stat strong.green,
.dashboard-stat strong.positive {
    color: #15965a;
}

.dashboard-stat strong.red,
.dashboard-stat strong.negative {
    color: #d83a52;
}

.dashboard-shortcuts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.dashboard-shortcut {
    min-width: 0;
    display: grid;
    justify-items: center;
    gap: 7px;
    padding: 0;
    color: #142050;
    background: transparent;
    border: 0;
    border-radius: 10px;
}

.dashboard-shortcut span:first-child {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    color: #2031e7;
    background: #f4f6ff;
    border-radius: 12px;
}

.dashboard-shortcut svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

.dashboard-shortcut strong {
    max-width: 100%;
    overflow: hidden;
    color: #172152;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-current-card {
    padding-bottom: 14px;
}

.dashboard-current-card h2 {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f8;
}

.dashboard-task {
    position: relative;
    min-height: 74px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    overflow: hidden;
    margin-top: 0;
    padding: 13px 10px 12px 17px;
    background: #ffffff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.dashboard-task + .dashboard-task {
    border-top: 1px solid #edf2f8;
}

.dashboard-empty,
.task-empty {
    padding: 10px 0;
}

.dashboard-task::before {
    content: "";
    position: absolute;
    top: 12px;
    bottom: 12px;
    left: 0;
    width: 4px;
    background: #2031e7;
    border-radius: 0 6px 6px 0;
}

.dashboard-task div {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.dashboard-task strong {
    overflow: hidden;
    color: #11193f;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-task span {
    color: #5d6b91;
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}

.dashboard-task-status {
    align-self: end;
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 0 7px;
    color: #2031e7;
    background: #eef2ff;
    border-radius: 7px;
    font-size: 10px !important;
    font-weight: 600 !important;
    white-space: nowrap;
}

.dashboard-side-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.dashboard-side-title h2 {
    margin-bottom: 0;
}

.dashboard-link {
    padding: 0;
    color: #2031e7;
    background: transparent;
    border: 0;
    font-size: 11px;
    font-weight: 600;
}

.dashboard-timeline {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid #eef2fb;
}

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

.dashboard-timeline span,
.dashboard-timeline strong {
    color: #56638b;
    font-size: 12px;
    font-weight: 850;
}

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

.dashboard-leaves div {
    padding: 12px;
    background: #f4f7ff;
    border: 1px solid #eef3fb;
    border-radius: 11px;
}

.dashboard-leaves span,
.dashboard-leaves small {
    display: block;
    color: #5d6b91;
    font-size: 11px;
    font-weight: 800;
}

.dashboard-leaves strong {
    display: block;
    margin: 8px 0 4px;
    color: #2031e7;
    font-size: 22px;
    font-weight: 700;
}

.work-time-screen {
    display: grid;
    gap: 12px;
}

.work-today-card {
    background: #f7f9ff;
}

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

.punch-box,
.time-metric {
    min-width: 0;
    padding: 12px;
    background: #f8faff;
    border: 1px solid #eef3fb;
    border-radius: 10px;
}

.punch-box span,
.time-metric span,
.work-total span {
    display: block;
    color: #647195;
    font-size: 11px;
    font-weight: 500;
}

.punch-box strong {
    display: block;
    margin-top: 8px;
    color: #11183f;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
}

.punch-box.green strong,
.punch-times .green,
.time-metric.positive strong,
.punch-worked .positive {
    color: #19a55b;
}

.punch-box.red strong,
.punch-times .red,
.time-metric.negative strong,
.punch-worked .negative {
    color: #d83a52;
}

.work-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eaf0fa;
}

.work-total strong {
    color: #2031e7;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.leave-today-panel {
    display: grid;
    gap: 6px;
    padding: 14px 12px;
    background: #f0fbf5;
    border: 1px solid #d8f2e2;
    border-radius: 10px;
}

.leave-today-panel.leave-orange {
    background: #fff8f1;
    border-color: #ffe8d4;
}

.leave-today-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.leave-today-head svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: #15965a;
    stroke-width: 3;
}

.leave-today-panel.leave-orange .leave-today-head svg {
    color: #d96c0d;
}

.leave-today-panel span,
.leave-today-panel small {
    color: #176b43;
    font-size: 11px;
    font-weight: 500;
}

.leave-today-panel strong {
    color: #15965a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.leave-today-panel.leave-orange span,
.leave-today-panel.leave-orange small {
    color: #9a5a18;
}

.leave-today-panel.leave-orange strong {
    color: #d96c0d;
}

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

.time-metric strong {
    display: block;
    margin-top: 8px;
    color: #11183f;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

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

.punch-row {
    display: grid;
    grid-template-columns: minmax(74px, 0.8fr) minmax(96px, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f8;
}

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

.punch-row.today {
    color: #2031e7;
}

.punch-row.muted {
    opacity: 0.72;
}

.punch-row.leave {
    grid-template-columns: minmax(74px, 1fr) auto minmax(62px, auto);
    opacity: 1;
}

.punch-date strong,
.punch-worked strong {
    display: block;
    color: #11183f;
    font-size: 12px;
    font-weight: 700;
}

.punch-note,
.punch-worked span {
    display: block;
    margin-top: 4px;
    color: #687598;
    font-size: 10px;
    font-weight: 500;
}

.punch-note-leave,
.punch-row.leave .punch-worked span {
    color: #176b43;
}

.punch-row.leave-orange .punch-note-leave,
.punch-row.leave .punch-worked.leave-orange span {
    color: #9a5a18;
}

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

.punch-times span {
    min-height: 26px;
    display: grid;
    place-items: center;
    background: #f8faff;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.punch-leave-state {
    min-width: 62px;
    min-height: 26px;
    display: grid;
    place-items: center;
    padding: 5px 8px;
    background: #f0fbf5;
    border: 1px solid #d8f2e2;
    border-radius: 8px;
    text-align: center;
}

.punch-leave-state.leave-orange {
    background: #fff8f1;
    border-color: #ffe8d4;
}

.punch-leave-state strong {
    color: #15965a;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}

.punch-leave-state.leave-orange strong {
    color: #d96c0d;
}

.punch-leave-result {
    display: grid;
    justify-items: end;
    gap: 4px;
}

.punch-leave-result svg {
    width: 16px;
    height: 16px;
    color: #15965a;
    stroke-width: 3;
}

.punch-leave-result.leave-orange svg {
    color: #d96c0d;
}

.punch-worked {
    text-align: right;
}

.bottom-nav {
    display: none;
}

@media (min-width: 980px) {
    .app-frame {
        margin: 0 auto;
    }

    .screen-root {
        gap: 16px;
    }
}

@media (max-width: 979px) {
    .app-shell {
        display: block;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .app-shell.dashboard-mode {
        background: #ffffff;
    }

    .desktop-sidebar {
        display: none;
    }

    .app-frame {
        width: 100%;
        max-width: none;
        min-height: 100vh;
        margin: 0;
        padding: 14px 0 86px;
    }

    .app-shell.dashboard-mode .app-frame {
        width: 100%;
        max-width: 390px;
        margin: 0 auto;
        padding: 9px 7px 68px;
        background: #ffffff;
    }

    .screen-root,
    .app-topbar {
        width: min(calc(100vw - 36px), 390px);
        margin-inline: auto;
    }

    .app-shell.dashboard-mode .screen-root,
    .app-shell.dashboard-mode .app-topbar {
        width: auto;
        margin-inline: 0;
    }

    .app-topbar {
        position: sticky;
        top: 0;
        z-index: 10;
        margin-top: 0;
        margin-bottom: 12px;
        padding: 0 0 8px;
        background: rgba(244, 247, 252, 0.92);
        backdrop-filter: blur(14px);
    }

    .app-topbar.dashboard-topbar {
        position: relative;
        margin: 0 0 12px;
        padding: 0;
        background: transparent;
        backdrop-filter: none;
    }

    .desktop-columns,
    .desktop-three {
        grid-template-columns: 1fr;
    }

    .dashboard-layout {
        display: block;
    }

    .dashboard-phone {
        max-width: 390px;
        margin: 0 auto;
        gap: 10px;
    }

    .dashboard-side {
        display: none;
    }

    .bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        transform: none;
        z-index: 30;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 2px;
        width: min(100%, 520px);
        max-width: 100vw;
        margin: 0 auto;
        padding: 5px 8px 6px;
        background: #ffffff;
        border: 0;
        border-top: 1px solid #edf1f8;
        border-radius: 0;
        box-shadow: 0 -4px 18px rgba(29, 42, 92, 0.04);
        backdrop-filter: none;
    }

    .bottom-nav button {
        min-width: 0;
        display: grid;
        justify-items: center;
        gap: 4px;
        min-height: 43px;
        padding: 6px 2px;
        color: var(--muted);
        background: transparent;
        border: 0;
        border-radius: 8px;
        font-size: 9px;
        font-weight: 500;
    }

    .bottom-nav svg {
        width: 16px;
        height: 16px;
        stroke-width: 2;
    }

    .bottom-nav button.active {
        color: var(--primary);
        font-weight: 600;
    }

    .bottom-nav button.plus {
        transform: translateY(-10px);
    }

    .bottom-nav button.plus span:first-child {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        color: #ffffff;
        background: var(--primary);
        border-radius: 8px;
        box-shadow: 0 10px 20px rgba(52, 70, 241, 0.24);
    }
}

@media (max-width: 420px) {
    .leave-hero-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .leave-hero-card .primary-action {
        width: 100%;
    }

    .leave-balance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .leave-balance-card.amber {
        grid-column: 1 / -1;
    }

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

    .leave-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .leave-list-item {
        grid-template-columns: minmax(0, 1fr);
        gap: 9px;
    }

    .leave-list-status {
        min-width: 0;
        justify-content: flex-start;
        padding-left: 57px;
    }

    .stats-grid {
        gap: 6px;
    }

    .stat-card {
        padding: 10px 8px;
    }

    .stat-card strong {
        font-size: 16px;
    }

    .shortcut-grid {
        gap: 6px;
    }
}
