/* ==========================================================================
   Kariyer — iOS dark appearance
   ========================================================================== */

:root {
    color-scheme: dark;

    /* iOS system colors (dark) */
    --bg: #000000;
    --bg-elevated: #1c1c1e;
    --bg-tertiary: #2c2c2e;
    --fill: rgba(120, 120, 128, 0.24);
    --fill-secondary: rgba(120, 120, 128, 0.16);
    --separator: rgba(84, 84, 88, 0.55);
    --label: #ffffff;
    --label-secondary: rgba(235, 235, 245, 0.6);
    --label-tertiary: rgba(235, 235, 245, 0.3);

    --blue: #0a84ff;
    --indigo: #5e5ce6;
    --green: #30d158;
    --orange: #ff9f0a;
    --red: #ff453a;
    --gray: #8e8e93;

    /* Glass */
    --glass-bg: rgba(28, 28, 30, 0.62);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    --glass-blur: saturate(180%) blur(24px);

    --radius-s: 10px;
    --radius-m: 14px;
    --radius-l: 22px;
    --radius-xl: 28px;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "SF Pro", "Inter",
            system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", "Inter",
            system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --ease: cubic-bezier(0.32, 0.72, 0, 1);
    --gutter: max(20px, env(safe-area-inset-left));
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--label);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.35;
    letter-spacing: -0.022em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Soft colour fields behind the glass so the blur has something to refract */
.ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(60vmax 50vmax at 12% -10%, rgba(94, 92, 230, 0.28), transparent 60%),
        radial-gradient(50vmax 40vmax at 100% 0%, rgba(10, 132, 255, 0.18), transparent 60%),
        radial-gradient(60vmax 50vmax at 50% 120%, rgba(191, 90, 242, 0.10), transparent 60%);
}

h1, h2, h3, p {
    margin: 0;
}

a {
    color: var(--blue);
    text-decoration: none;
}

svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 3px solid rgba(10, 132, 255, 0.6);
    outline-offset: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.022em;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s var(--ease), background-color 0.2s, opacity 0.2s;
    user-select: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--blue);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 20px -6px rgba(10, 132, 255, 0.55);
}

.btn-primary:hover {
    background: #2b95ff;
}

.btn-tinted {
    background: rgba(10, 132, 255, 0.16);
    color: var(--blue);
}

.btn-tinted:hover {
    background: rgba(10, 132, 255, 0.24);
}

.btn-plain {
    min-height: 36px;
    padding: 0 12px;
    background: transparent;
    color: var(--blue);
    font-weight: 400;
}

.btn-plain:hover {
    background: var(--fill-secondary);
}

.btn-small {
    min-height: 34px;
    padding: 0 14px;
    font-size: 15px;
    gap: 4px;
}

.btn-small .btn-icon {
    width: 16px;
    height: 16px;
}

.btn-block {
    width: 100%;
}

.btn-large {
    min-height: 52px;
    font-size: 17px;
}

.btn-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.6;
}

/* ==========================================================================
   Frosted glass navbar
   ========================================================================== */

.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    padding-top: env(safe-area-inset-top);
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-bottom: 0.5px solid var(--separator);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--label);
    font-size: 17px;
    font-weight: 600;
}

.brand {
    min-width: 0;
}

.brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--indigo), var(--blue));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.brand-icon svg {
    width: 17px;
    height: 17px;
    color: #fff;
}

.navbar-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.navbar-inner {
    gap: 16px;
}

.navbar-actions form {
    margin: 0;
}

.avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(180deg, #8e8e93, #636366);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
}

/* ==========================================================================
   Auth (login / setup)
   ========================================================================== */

.page-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
    padding: 32px var(--gutter);
}

.glass-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 0.5px solid var(--glass-border);
    box-shadow: var(--glass-highlight), 0 30px 80px -20px rgba(0, 0, 0, 0.8);
}

.auth-card {
    width: 100%;
    padding: 36px 24px 24px;
    border-radius: var(--radius-xl);
    text-align: center;
}

.app-icon {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--indigo), var(--blue));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 32px -8px rgba(10, 132, 255, 0.6);
}

.app-icon svg {
    width: 40px;
    height: 40px;
    color: #fff;
    stroke-width: 1.8;
}

.app-icon--warn {
    background: linear-gradient(135deg, #ff9f0a, #ff453a);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 12px 32px -8px rgba(255, 69, 58, 0.5);
}

.auth-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.auth-subtitle {
    margin-top: 6px;
    margin-bottom: 28px;
    color: var(--label-secondary);
    font-size: 15px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.auth-footnote {
    margin-top: 24px;
    color: var(--label-tertiary);
    font-size: 13px;
}

/* Inset grouped text fields */
.field-group {
    overflow: hidden;
    border-radius: var(--radius-m);
    background: var(--fill-secondary);
}

.field {
    display: block;
    position: relative;
}

.field + .field::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 0;
    border-top: 0.5px solid var(--separator);
}

.field input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 0;
    background: transparent;
    color: var(--label);
    font: inherit;
    font-size: 17px;
    outline: none;
}

.field input::placeholder {
    color: var(--label-tertiary);
}

.field input:focus {
    background: rgba(255, 255, 255, 0.04);
}

.alert {
    margin-bottom: 20px;
    padding: 12px 16px;
    border-radius: var(--radius-m);
    background: rgba(255, 69, 58, 0.14);
    color: #ff6961;
    font-size: 15px;
    text-align: left;
}

.alert p + p {
    margin-top: 4px;
}

/* ==========================================================================
   App layout
   ========================================================================== */

.container {
    padding: 20px var(--gutter) calc(48px + env(safe-area-inset-bottom));
}

/* Metrics */
.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 20px;
    border-radius: var(--radius-l);
    background: var(--bg-elevated);
    border: 0.5px solid var(--glass-border);
    box-shadow: var(--glass-highlight);
}

.metric-label {
    color: var(--label-secondary);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.005em;
}

.metric-value {
    font-family: var(--font-display);
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.metric-value small {
    margin-left: 8px;
    color: var(--label-secondary);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.tone-orange { color: var(--orange); }
.tone-green { color: var(--green); }

/* Card + table */
.card {
    border-radius: var(--radius-l);
    background: var(--bg-elevated);
    border: 0.5px solid var(--glass-border);
    box-shadow: var(--glass-highlight);
}

.table-card {
    overflow: hidden;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    letter-spacing: -0.012em;
}

.table th {
    padding: 12px;
    color: var(--label-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: center;
    vertical-align: middle;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 0.5px solid var(--separator);
}

.table td {
    padding: 14px 12px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 0.5px solid var(--separator);
}

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

.table tbody tr {
    transition: background-color 0.15s;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table th:first-child,
.table td:first-child,
.table th:last-child,
.table td:last-child {
    padding-left: 20px;
    padding-right: 20px;
}

.num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.muted {
    color: var(--label-secondary);
}

.cell-company {
    font-weight: 600;
}

.note-text {
    display: block;
    max-width: 170px;
    margin: 0 auto;
    overflow: hidden;
    color: var(--label);
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Row actions */
.table th.cell-actions,
.table td.cell-actions {
    width: 1%;
    text-align: center;
    white-space: nowrap;
}

.actions {
    display: inline-flex;
    gap: 8px;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s var(--ease), background-color 0.2s;
}

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

.icon-btn:active {
    transform: scale(0.9);
}

.icon-btn--edit {
    background: rgba(10, 132, 255, 0.16);
    color: #409cff;
}

.icon-btn--edit:hover {
    background: rgba(10, 132, 255, 0.28);
}

.icon-btn--delete {
    background: rgba(255, 69, 58, 0.14);
    color: #ff6961;
}

.icon-btn--delete:hover {
    background: rgba(255, 69, 58, 0.26);
}

/* Status pills */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.005em;
    white-space: nowrap;
}

.pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.pill-blue   { color: #409cff; background: rgba(10, 132, 255, 0.16); }
.pill-indigo { color: #7d7aff; background: rgba(94, 92, 230, 0.20); }
.pill-yellow { color: #ffd60a; background: rgba(255, 214, 10, 0.14); }
.pill-orange { color: var(--orange); background: rgba(255, 159, 10, 0.16); }
.pill-purple { color: #da8fff; background: rgba(191, 90, 242, 0.18); }
.pill-green  { color: var(--green); background: rgba(48, 209, 88, 0.16); }
.pill-red    { color: #ff6961; background: rgba(255, 69, 58, 0.16); }
.pill-gray   { color: #aeaeb2; background: rgba(142, 142, 147, 0.18); }

/* Empty state */
.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 64px 24px;
    text-align: center;
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border-radius: 18px;
    background: var(--bg-tertiary);
    color: var(--label-secondary);
}

.empty-icon svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.8;
}

.empty h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.empty p {
    margin: 6px 0 22px;
    color: var(--label-secondary);
    font-size: 15px;
}

/* ==========================================================================
   Sheet (modal)
   ========================================================================== */

.sheet {
    width: min(520px, calc(100vw - 32px));
    max-height: min(760px, calc(100dvh - 48px));
    padding: 0;
    border: 0.5px solid var(--glass-border);
    border-radius: var(--radius-xl);
    background: rgba(28, 28, 30, 0.86);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    color: var(--label);
    box-shadow: var(--glass-highlight), 0 40px 120px -20px rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.sheet[open] {
    display: flex;
    animation: sheet-in 0.42s var(--ease);
}

.sheet.is-closing {
    animation: sheet-out 0.24s var(--ease) forwards;
}

.sheet::backdrop {
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    animation: fade-in 0.3s var(--ease);
}

.sheet.is-closing::backdrop {
    animation: fade-out 0.24s var(--ease) forwards;
}

.sheet-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
}

.sheet-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 0.5px solid var(--separator);
}

.sheet-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.sheet-header .btn {
    justify-self: end;
}

.sheet-body {
    padding: 8px 20px 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sheet-body .alert {
    margin: 12px 0 0;
}

.group-title {
    margin: 22px 16px 7px;
    color: var(--label-secondary);
    font-size: 13px;
    letter-spacing: -0.005em;
    text-transform: uppercase;
}

.list-group {
    overflow: hidden;
    border-radius: var(--radius-m);
    background: var(--bg-tertiary);
}

.list-row {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    min-height: 48px;
    padding: 0 16px;
    cursor: text;
}

.list-row + .list-row::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16px;
    right: 0;
    border-top: 0.5px solid var(--separator);
}

.list-row > span {
    flex: 0 0 auto;
    min-width: 128px;
    font-size: 17px;
}

.list-row input,
.list-row select {
    flex: 1 1 auto;
    min-width: 0;
    height: 46px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--label-secondary);
    font: inherit;
    font-size: 17px;
    text-align: right;
    outline: none;
}

.list-row input:focus {
    color: var(--label);
}

.list-row input::placeholder {
    color: var(--label-tertiary);
}

.list-row input[type="date"] {
    color-scheme: dark;
    font-variant-numeric: tabular-nums;
}

.list-row input[type="date"]::-webkit-date-and-time-value {
    text-align: right;
}

.list-row input[type="date"]::-webkit-calendar-picker-indicator {
    margin-left: 12px;
    opacity: 0.6;
    cursor: pointer;
}

.list-row select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 18px;
    cursor: pointer;
    text-align-last: right;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 1.5 9 4.5M3 7.5 6 10.5 9 7.5' fill='none' stroke='%238e8e93' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 12px;
}

.list-row select option {
    background: var(--bg-elevated);
    color: var(--label);
}

/* Salary range: [min] - [max] AED */
.list-row > .range {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

.list-row--range > span:first-child {
    min-width: 0;
}

.list-row .range input {
    flex: 0 1 108px;
    width: 0;
    min-width: 0;
}

.range-sep,
.range-unit {
    flex: 0 0 auto;
    color: var(--label-tertiary);
}

/* Multi-line row: label on top, text below (like Notes in Contacts) */
.list-row--stacked {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding-top: 12px;
    padding-bottom: 10px;
}

.list-row--stacked textarea {
    width: 100%;
    min-height: 48px;
    max-height: 200px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--label);
    font: inherit;
    font-size: 17px;
    line-height: 1.35;
    resize: none;
    outline: none;
}

.list-row--stacked textarea::placeholder {
    color: var(--label-tertiary);
}

.sheet-submit {
    margin-top: 28px;
}

/* ==========================================================================
   Alert dialog (iOS UIAlertController)
   ========================================================================== */

.alert-dialog {
    width: 280px;
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: rgba(44, 44, 46, 0.82);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    color: var(--label);
    box-shadow: var(--glass-highlight), 0 30px 80px -20px rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.alert-dialog[open] {
    animation: alert-in 0.3s var(--ease);
}

.alert-dialog.is-closing {
    animation: fade-out 0.18s var(--ease) forwards;
}

.alert-dialog::backdrop {
    background: rgba(0, 0, 0, 0.45);
    animation: fade-in 0.25s var(--ease);
}

.alert-dialog form {
    margin: 0;
}

.alert-dialog-body {
    padding: 20px 16px 18px;
    text-align: center;
}

.alert-dialog-body h2 {
    font-size: 17px;
    font-weight: 600;
}

.alert-dialog-body p {
    margin-top: 4px;
    color: var(--label);
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: -0.005em;
}

.alert-dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 0.5px solid var(--separator);
}

.alert-dialog-btn {
    min-height: 44px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: var(--blue);
    font: inherit;
    font-size: 17px;
    cursor: pointer;
}

.alert-dialog-btn + .alert-dialog-btn {
    border-left: 0.5px solid var(--separator);
}

.alert-dialog-btn:hover,
.alert-dialog-btn:focus-visible {
    background: rgba(255, 255, 255, 0.06);
}

.alert-dialog-btn--destructive {
    color: var(--red);
    font-weight: 600;
}

@keyframes alert-in {
    from { opacity: 0; transform: scale(1.12); }
    to   { opacity: 1; transform: none; }
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 100;
    max-width: calc(100vw - 32px);
    padding: 12px 20px;
    border-radius: 999px;
    background: rgba(44, 44, 46, 0.78);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 0.5px solid var(--glass-border);
    box-shadow: var(--glass-highlight), 0 12px 40px -8px rgba(0, 0, 0, 0.7);
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: translateX(-50%);
    animation: toast 3.2s var(--ease) forwards;
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes sheet-in {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: none; }
}

@keyframes sheet-out {
    to { opacity: 0; transform: translateY(24px) scale(0.97); }
}

@keyframes fade-in {
    from { opacity: 0; }
}

@keyframes fade-out {
    to { opacity: 0; }
}

@keyframes toast {
    0%   { opacity: 0; transform: translate(-50%, 16px) scale(0.96); }
    10%  { opacity: 1; transform: translate(-50%, 0) scale(1); }
    85%  { opacity: 1; transform: translate(-50%, 0) scale(1); }
    100% { opacity: 0; transform: translate(-50%, 8px) scale(0.98); visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

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

@media (max-width: 720px) {
    .navbar .btn-small {
        width: 34px;
        padding: 0;
    }

    .navbar .btn-label {
        display: none;
    }

    .metric {
        padding: 16px;
    }

    .metric-value {
        font-size: 28px;
    }

    /* Table rows become iOS list cells */
    .table-card {
        background: transparent;
        border: 0;
        box-shadow: none;
        overflow: visible;
    }

    .table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tbody tr {
        margin-bottom: 12px;
        overflow: hidden;
        border-radius: var(--radius-l);
        background: var(--bg-elevated);
        border: 0.5px solid var(--glass-border);
    }

    .table tbody tr:hover {
        background: var(--bg-elevated);
    }

    .table td,
    .table td:first-child,
    .table td:last-child {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        min-height: 44px;
        padding: 10px 16px;
        text-align: right;
        border-bottom: 0.5px solid var(--separator);
    }

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

    .table td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        color: var(--label-secondary);
        font-weight: 400;
        text-align: left;
    }

    /* Company becomes the cell header */
    .table td.cell-company {
        order: -1;
        justify-content: flex-start;
        padding: 14px 16px;
        font-size: 17px;
        text-align: left;
    }

    .table td.cell-company::before {
        display: none;
    }

    .table td.cell-actions {
        width: 100%;
    }

    /* Notes wrap (up to 4 lines) instead of truncating */
    .table td.cell-note {
        align-items: flex-start;
    }

    .note-text {
        display: -webkit-box;
        max-width: none;
        margin: 0 0 0 auto;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        white-space: pre-line;
        text-align: right;
    }

    .table tbody tr {
        display: flex;
        flex-direction: column;
    }

    .sheet {
        width: 100vw;
        max-width: 100vw;
        max-height: calc(100dvh - 12px - env(safe-area-inset-top));
        margin: auto 0 0;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        border-bottom: 0;
    }

    .sheet[open] {
        animation: sheet-up 0.45s var(--ease);
    }

    .sheet.is-closing {
        animation: sheet-down 0.28s var(--ease) forwards;
    }

    .sheet-body {
        padding: 8px 16px calc(24px + env(safe-area-inset-bottom));
    }

    .list-row > span {
        min-width: 112px;
        font-size: 16px;
    }
}

@keyframes sheet-up {
    from { transform: translateY(100%); }
    to   { transform: none; }
}

@keyframes sheet-down {
    to { transform: translateY(100%); }
}
