/*
  4POINT2 HR Portal - design system (2026-10 redesign)
  One stylesheet for the admin panel and the public careers pages.
*/

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

:root {
    --brand: #E11D2E;
    --brand-600: #C2121F;
    --brand-50: #FEF2F2;
    --brand-100: #FEE2E2;

    --ink: #0F172A;
    --ink-2: #334155;
    --muted: #64748B;
    --subtle: #94A3B8;
    --line: #E2E8F0;
    --line-2: #F1F5F9;
    --bg: #F5F7FA;
    --surface: #FFFFFF;
    --surface-2: #F8FAFC;

    --green: #15803D;
    --green-bg: #DCFCE7;
    --amber: #B45309;
    --amber-bg: #FEF3C7;
    --blue: #1D4ED8;
    --blue-bg: #DBEAFE;
    --violet: #6D28D9;
    --violet-bg: #EDE9FE;
    --red: #B91C1C;
    --red-bg: #FEE2E2;
    --gray: #475569;
    --gray-bg: #F1F5F9;

    --side-bg: #0B1220;
    --side-ink: #94A3B8;
    --side-ink-hi: #F8FAFC;
    --side-hover: rgba(255, 255, 255, 0.05);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.15);
    --ring: 0 0 0 3px rgba(225, 29, 46, 0.15);

    --sidebar-w: 248px;
    --topbar-h: 64px;
}

body.dark-mode {
    --ink: #F1F5F9;
    --ink-2: #CBD5E1;
    --muted: #94A3B8;
    --subtle: #64748B;
    --line: #1E293B;
    --line-2: #172033;
    --bg: #0B1120;
    --surface: #111827;
    --surface-2: #0F172A;
    --brand-50: rgba(225, 29, 46, 0.12);
    --brand-100: rgba(225, 29, 46, 0.2);
    --green-bg: rgba(34, 197, 94, 0.15);
    --green: #4ADE80;
    --amber-bg: rgba(245, 158, 11, 0.15);
    --amber: #FBBF24;
    --blue-bg: rgba(59, 130, 246, 0.15);
    --blue: #60A5FA;
    --violet-bg: rgba(139, 92, 246, 0.15);
    --violet: #A78BFA;
    --red-bg: rgba(239, 68, 68, 0.15);
    --red: #F87171;
    --gray-bg: rgba(148, 163, 184, 0.12);
    --gray: #CBD5E1;
    --side-bg: #070B14;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

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

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

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

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

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

img {
    max-width: 100%;
}

ion-icon {
    flex-shrink: 0;
}

/* ============ App shell ============ */

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--side-bg);
    color: var(--side-ink);
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    z-index: 1001;
    overflow-y: auto;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 22px;
}

.sidebar-logo .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sidebar-logo .logo-mark img {
    width: 30px;
}

.sidebar-logo .logo-text {
    color: var(--side-ink-hi);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
}

.sidebar-logo .logo-text small {
    display: block;
    font-weight: 500;
    font-size: 11px;
    color: var(--side-ink);
}

.nav-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #475569;
    padding: 16px 12px 6px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    margin: 2px 0;
    border-radius: var(--radius-sm);
    font-weight: 500;
    color: var(--side-ink);
    transition: background .15s, color .15s;
}

.nav-item ion-icon {
    font-size: 18px;
}

.nav-item:hover {
    background: var(--side-hover);
    color: var(--side-ink-hi);
}

.nav-item.active {
    background: rgba(225, 29, 46, 0.14);
    color: #fff;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--brand);
}

.nav-item.active ion-icon {
    color: #FF5A67;
}

.nav-item.sub {
    padding-left: 42px;
    font-size: 13px;
}

.nav-item .nav-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    color: var(--side-ink-hi);
    padding: 1px 7px;
    border-radius: 999px;
}

.sidebar-user {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-name {
    color: var(--side-ink-hi);
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-link {
    font-size: 12px;
    color: var(--side-ink);
}

.sidebar-user-link:hover {
    color: #fff;
}

.sidebar-user .logout-btn {
    margin-left: auto;
    color: var(--side-ink);
    font-size: 18px;
    display: flex;
    padding: 4px;
    border-radius: 6px;
}

.sidebar-user .logout-btn:hover {
    color: #fff;
    background: var(--side-hover);
}

.main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    padding: calc(var(--topbar-h) + 28px) 32px 40px;
}

.top-bar-fixed {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--topbar-h);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 1000;
}

.top-bar-fixed .page-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.top-bar-fixed .crumb {
    font-size: 12px;
    color: var(--muted);
}

.header-utilities {
    display: flex;
    align-items: center;
    gap: 6px;
}

.icon-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
}

.icon-btn:hover {
    background: var(--line-2);
}

.icon-btn .dot {
    position: absolute;
    top: 1px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
    border: 2px solid var(--surface);
}

.menu-toggle {
    display: none;
}

.header-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--surface);
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px 4px 4px;
    margin-left: 6px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    color: var(--ink-2);
}

.profile-trigger:hover {
    border-color: var(--subtle);
}

/* Dropdowns */
.dropdown-wrap {
    position: relative;
}

.dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 340px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    overflow: hidden;
    z-index: 1100;
}

.dropdown.active {
    display: block;
    animation: pop .14s ease-out;
}

.dropdown.sm {
    width: 220px;
}

@keyframes pop {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
}

.dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    font-weight: 600;
}

.dropdown-head .link {
    font-size: 12px;
    color: var(--brand);
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
}

.notif-body {
    max-height: 380px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-2);
}

.notif-item:hover {
    background: var(--surface-2);
}

.notif-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--brand-50);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.notif-title {
    font-weight: 600;
    font-size: 13px;
}

.notif-desc {
    font-size: 12px;
    color: var(--muted);
}

.notif-time {
    font-size: 11px;
    color: var(--subtle);
    margin-top: 2px;
}

.notif-empty {
    padding: 28px 16px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.menu-list {
    padding: 6px;
}

.menu-list a,
.menu-list .menu-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 13px;
    color: var(--ink-2);
}

.menu-list a:hover {
    background: var(--line-2);
}

.menu-list .menu-meta {
    color: var(--muted);
    font-size: 12px;
}

.menu-list a.danger {
    color: var(--red);
}

/* ============ Page building blocks ============ */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.page-head h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.page-head p {
    color: var(--muted);
    margin-top: 2px;
}

.page-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ui-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

main > .ui-card + .ui-card {
    margin-top: 20px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.card-head h3 {
    font-size: 15px;
    font-weight: 600;
}

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

.card-body {
    padding: 20px;
}

.card-body.tight {
    padding: 0;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid > * {
    min-width: 0;
}

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

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

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

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

.grid-main {
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
}

.span-2 {
    grid-column: span 2;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

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

.small {
    font-size: 12px;
}

.strong {
    font-weight: 600;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Stats */
.stat {
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.stat-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin-top: 6px;
    line-height: 1.1;
}

.stat-sub {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--brand-50);
    color: var(--brand);
}

.stat-icon.green {
    background: var(--green-bg);
    color: var(--green);
}

.stat-icon.blue {
    background: var(--blue-bg);
    color: var(--blue);
}

.stat-icon.amber {
    background: var(--amber-bg);
    color: var(--amber);
}

.stat-icon.violet {
    background: var(--violet-bg);
    color: var(--violet);
}

.stat-icon.red {
    background: var(--red-bg);
    color: var(--red);
}

.stat.hero {
    background: linear-gradient(135deg, #E11D2E, #9F1239);
    color: #fff;
    border: none;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.stat.hero .stat-label,
.stat.hero .stat-sub {
    color: rgba(255, 255, 255, 0.8);
}

.stat.hero .stat-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.stat.hero::after {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    right: -50px;
    bottom: -90px;
    border-radius: 50%;
    border: 28px solid rgba(255, 255, 255, 0.07);
}

/* Buttons */
.ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 15px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
    text-decoration: none;
}

.ui-btn ion-icon {
    font-size: 16px;
}

.ui-btn:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

.ui-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.ui-btn.primary {
    background: var(--brand);
    color: #fff;
}

.ui-btn.primary:hover:not(:disabled) {
    background: var(--brand-600);
}

.ui-btn.secondary {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink-2);
}

.ui-btn.secondary:hover:not(:disabled) {
    border-color: var(--subtle);
    color: var(--ink);
}

.ui-btn.dark {
    background: var(--ink);
    color: var(--surface);
}

.ui-btn.ghost {
    background: transparent;
    color: var(--ink-2);
}

.ui-btn.ghost:hover:not(:disabled) {
    background: var(--line-2);
}

.ui-btn.danger {
    background: var(--surface);
    border-color: var(--line);
    color: var(--red);
}

.ui-btn.danger:hover:not(:disabled) {
    background: var(--red-bg);
    border-color: transparent;
}

.ui-btn.success {
    background: var(--green-bg);
    color: var(--green);
}

.ui-btn.success:hover:not(:disabled) {
    filter: brightness(.97);
}

.ui-btn.warn {
    background: var(--amber-bg);
    color: var(--amber);
}

.ui-btn.sm {
    height: 32px;
    padding: 0 11px;
    font-size: 12px;
    border-radius: 8px;
}

.ui-btn.icon {
    width: 32px;
    padding: 0;
}

.ui-btn.block {
    width: 100%;
}

.ui-btn.lg {
    height: 46px;
    font-size: 15px;
    padding: 0 22px;
}

/* Forms */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.field label,
.label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
}

.field .req {
    color: var(--brand);
}

.field .help {
    font-size: 12px;
    color: var(--muted);
}

.ui-input,
.ui-select,
.ui-textarea {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}

.ui-textarea {
    height: auto;
    min-height: 110px;
    padding: 10px 12px;
    resize: vertical;
    line-height: 1.5;
}

.ui-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.ui-input::placeholder,
.ui-textarea::placeholder {
    color: var(--subtle);
}

.ui-input:focus,
.ui-select:focus,
.ui-textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.ui-input[type=file] {
    padding: 7px 10px;
    height: auto;
}

.input-icon {
    position: relative;
}

.input-icon > ion-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--subtle);
    font-size: 17px;
    pointer-events: none;
}

.input-icon .ui-input {
    padding-left: 38px;
}

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

.form-grid .full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 6px;
}

.toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 14px 16px;
}

.toolbar .grow {
    flex: 1 1 240px;
}

.toolbar .ui-select,
.toolbar .ui-input {
    width: auto;
}

.toolbar .grow .ui-input {
    width: 100%;
}

/* Small inline select used for statuses in tables */
.pill-select {
    height: 30px;
    padding: 0 28px 0 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-color: var(--surface);
    color: var(--ink-2);
}

.pill-select.s-open,
.pill-select.s-completed,
.pill-select.s-selected {
    background-color: var(--green-bg);
    color: var(--green);
    border-color: transparent;
}

.pill-select.s-draft,
.pill-select.s-shortlisted {
    background-color: var(--amber-bg);
    color: var(--amber);
    border-color: transparent;
}

.pill-select.s-closed,
.pill-select.s-rejected {
    background-color: var(--red-bg);
    color: var(--red);
    border-color: transparent;
}

.pill-select.s-scheduled,
.pill-select.s-new {
    background-color: var(--blue-bg);
    color: var(--blue);
    border-color: transparent;
}

.pill-select.s-cancelled {
    background-color: var(--gray-bg);
    color: var(--gray);
    border-color: transparent;
}

/* Alerts */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert ion-icon {
    font-size: 18px;
    margin-top: 1px;
}

.alert.success {
    background: var(--green-bg);
    color: var(--green);
}

.alert.error {
    background: var(--red-bg);
    color: var(--red);
}

.alert.info {
    background: var(--blue-bg);
    color: var(--blue);
}

/* Badges */
.status-pill,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.5;
}

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

.badge {
    background: var(--gray-bg);
    color: var(--gray);
}

.badge.violet {
    background: var(--violet-bg);
    color: var(--violet);
}

.badge.blue {
    background: var(--blue-bg);
    color: var(--blue);
}

/* Tables */
.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ui-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ui-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    padding: 11px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.ui-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line-2);
    vertical-align: middle;
    color: var(--ink-2);
}

.ui-table tbody tr {
    transition: background .12s;
}

.ui-table tbody tr:hover {
    background: var(--surface-2);
}

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

.ui-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ui-table .actions {
    text-align: right;
    white-space: nowrap;
}

.ui-table .actions > * {
    vertical-align: middle;
}

.inline-form {
    display: inline-flex;
    gap: 6px;
    margin: 0;
}

.person {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.person .name {
    font-weight: 600;
    color: var(--ink);
}

.person .name:hover {
    color: var(--brand);
}

.person .sub {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    background: var(--brand-50);
    color: var(--brand);
}

.avatar.lg {
    width: 64px;
    height: 64px;
    font-size: 24px;
}

.avatar.c1 { background: #DBEAFE; color: #1D4ED8; }
.avatar.c2 { background: #DCFCE7; color: #15803D; }
.avatar.c3 { background: #FEF3C7; color: #B45309; }
.avatar.c4 { background: #EDE9FE; color: #6D28D9; }
.avatar.c5 { background: #FCE7F3; color: #BE185D; }
.avatar.c0 { background: #FEE2E2; color: #B91C1C; }

body.dark-mode .avatar[class*=" c"] {
    filter: saturate(.8) brightness(.9);
}

.score {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 110px;
}

.score-bar {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: var(--line-2);
    overflow: hidden;
    max-width: 70px;
}

.score-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    transition: width .4s;
}

.score-val {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    min-width: 34px;
    color: var(--ink);
}

.ai-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: var(--violet-bg);
    color: var(--violet);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.ai-btn:hover {
    filter: brightness(.95);
}

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--muted);
}

.empty-state ion-icon {
    font-size: 36px;
    color: var(--subtle);
    margin-bottom: 8px;
}

.empty-state h4 {
    color: var(--ink);
    font-size: 15px;
    margin-bottom: 4px;
}

.table-foot {
    display: flex;
    justify-content: center;
    padding: 14px;
    border-top: 1px solid var(--line);
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Expandable job rows */
.expand-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform .2s;
}

.expand-btn:hover {
    background: var(--line-2);
}

tr.expanded .expand-btn {
    transform: rotate(90deg);
    color: var(--brand);
}

tr.detail-row > td {
    padding: 0;
    background: var(--surface-2);
}

.detail-inner {
    padding: 8px 16px 16px 56px;
}

.detail-inner .ui-table {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

/* Key/value list */
.kv {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.kv .full {
    grid-column: 1 / -1;
}

.kv dt {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kv dd {
    margin: 4px 0 0;
    font-weight: 600;
    color: var(--ink);
    word-break: break-word;
}

.profile-top {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.profile-top h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.profile-top .meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
    color: var(--muted);
}

.ats-box {
    margin-left: auto;
    text-align: right;
}

.ats-box .score-bar {
    max-width: 120px;
    width: 120px;
}

/* Calendar picker */
.cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cal-head .month-label {
    font-weight: 600;
}

.cal-nav {
    display: flex;
    gap: 4px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.day-name {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--subtle);
    padding: 4px 0;
}

.calendar-day {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-2);
    cursor: pointer;
    border: 1px solid transparent;
}

.calendar-day:hover:not(.empty):not(.past) {
    background: var(--line-2);
}

.calendar-day.today {
    border-color: var(--brand);
    color: var(--brand);
    font-weight: 700;
}

.calendar-day.selected {
    background: var(--brand);
    color: #fff !important;
    font-weight: 700;
}

.calendar-day.past {
    color: var(--subtle);
    opacity: .5;
    cursor: not-allowed;
}

.calendar-day.empty {
    cursor: default;
}

.cal-picked {
    font-size: 12px;
    color: var(--muted);
    margin: 10px 0 16px;
}

/* Mini calendar (dashboard) */
.mini-cal .calendar-day {
    height: 32px;
    cursor: default;
}

.mini-cal .calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand);
}

.mini-cal .calendar-day {
    position: relative;
}

/* Lists */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--line-2);
}

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

.list-item .grow {
    flex: 1;
    min-width: 0;
}

.time-chip {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
    background: var(--line-2);
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    animation: pop .15s ease-out;
}

.modal-box.wide {
    max-width: 520px;
}

.modal-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--red-bg);
    color: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-desc {
    color: var(--muted);
    margin-bottom: 20px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Bars in report table */
.progress {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress .bar {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: var(--line-2);
    overflow: hidden;
    min-width: 60px;
}

.progress .bar > span {
    display: block;
    height: 100%;
    background: var(--brand);
    border-radius: inherit;
}

.chart-box {
    position: relative;
    height: 280px;
}

/* Rich text from TinyMCE */
.rich {
    line-height: 1.75;
    color: var(--ink-2);
}

.rich h1, .rich h2, .rich h3, .rich h4 {
    color: var(--ink);
    margin: 1.2em 0 .5em;
    line-height: 1.3;
}

.rich p {
    margin: 0 0 1em;
}

.rich ul, .rich ol {
    padding-left: 1.3em;
    margin: 0 0 1em;
}

.rich li {
    margin-bottom: .35em;
}

/* ============ AI assistant ============ */

.ai-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 20px;
    height: calc(100vh - var(--topbar-h) - 68px);
    min-height: 480px;
}

.ai-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-chat {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ai-welcome {
    margin: auto;
    text-align: center;
    max-width: 640px;
    padding: 20px 0;
}

.ai-orb {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #E11D2E, #7C3AED);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.3);
}

.ai-welcome h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.prompt-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
    text-align: left;
}

.prompt-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    background: var(--surface);
    transition: border-color .15s, transform .15s;
}

.prompt-card:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
}

.prompt-card ion-icon {
    font-size: 20px;
    color: var(--brand);
    margin-bottom: 8px;
}

.prompt-card h4 {
    font-size: 13px;
    font-weight: 600;
}

.prompt-card p {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
}

.msg-row {
    display: flex;
    gap: 10px;
    max-width: 85%;
}

.msg-row.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 15px;
    background: var(--line-2);
    color: var(--ink-2);
}

.msg-avatar.ai {
    background: linear-gradient(135deg, #E11D2E, #7C3AED);
    color: #fff;
}

.msg-content {
    padding: 10px 14px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    line-height: 1.6;
    word-break: break-word;
}

.msg-row.user .msg-content {
    background: var(--ink);
    color: var(--surface);
    border-color: transparent;
}

.msg-file {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(127, 127, 127, 0.12);
    margin-bottom: 6px;
}

.typing span {
    display: inline-block;
    animation: blink 1.2s infinite both;
    font-weight: 700;
}

.typing span:nth-child(2) {
    animation-delay: .2s;
}

.typing span:nth-child(3) {
    animation-delay: .4s;
}

@keyframes blink {
    0%, 80%, 100% {
        opacity: .2;
    }

    40% {
        opacity: 1;
    }
}

.ai-composer {
    border-top: 1px solid var(--line);
    padding: 14px 16px;
}

.ai-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 5px 5px 5px 6px;
    background: var(--surface);
}

.ai-input-row:focus-within {
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.ai-input-row input[type=text] {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    padding: 8px 4px;
    min-width: 0;
}

.file-chip {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 13px;
}

.ai-foot {
    font-size: 11px;
    color: var(--subtle);
    text-align: center;
    margin-top: 8px;
}

.ai-side {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.rp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--ink-2);
    font-size: 13px;
}

.rp-item:hover {
    background: var(--line-2);
}

.rp-item.active {
    background: var(--brand-50);
    color: var(--brand);
    font-weight: 600;
}

.rp-item .del-btn {
    opacity: 0;
    color: var(--red);
}

.rp-item:hover .del-btn {
    opacity: 1;
}

/* ============ Login ============ */

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    background: var(--surface);
}

.auth-brand {
    position: relative;
    overflow: hidden;
    background: radial-gradient(1200px 600px at -10% -10%, #E11D2E 0%, transparent 55%), radial-gradient(900px 600px at 110% 110%, #7F1D1D 0%, transparent 55%), #0B1220;
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand .logo-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-brand .logo-mark img {
    width: 40px;
}

.auth-brand h1 {
    font-size: 40px;
    line-height: 1.1;
    letter-spacing: -.03em;
    font-weight: 800;
    max-width: 460px;
}

.auth-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    max-width: 420px;
    margin-top: 14px;
}

.auth-points {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.auth-points div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.85);
}

.auth-points ion-icon {
    color: #FCA5A5;
    font-size: 18px;
}

.auth-form-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-form {
    width: 100%;
    max-width: 380px;
}

.auth-form h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.auth-form .sub {
    color: var(--muted);
    margin: 6px 0 28px;
}

.auth-form .ui-input {
    height: 44px;
}

.auth-foot {
    margin-top: 28px;
    font-size: 12px;
    color: var(--subtle);
    text-align: center;
}

/* ============ Public careers pages ============ */

.public {
    background: var(--surface);
}

.pub-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.pub-nav .inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pub-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.pub-logo img {
    height: 32px;
}

.pub-hero {
    background: radial-gradient(800px 400px at 85% -20%, rgba(225, 29, 46, 0.12), transparent 60%), var(--surface-2);
    border-bottom: 1px solid var(--line);
}

.pub-hero .inner,
.pub-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.pub-hero .inner {
    padding-top: 64px;
    padding-bottom: 56px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand);
    background: var(--brand-50);
    padding: 5px 10px;
    border-radius: 999px;
}

.pub-hero h1 {
    font-size: 48px;
    line-height: 1.08;
    letter-spacing: -.03em;
    font-weight: 800;
    margin-top: 16px;
    max-width: 720px;
}

.pub-hero p {
    font-size: 17px;
    color: var(--muted);
    margin-top: 14px;
    max-width: 620px;
}

.pub-hero .hero-meta {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 26px;
    color: var(--ink-2);
    font-weight: 500;
}

.pub-hero .hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.pub-hero .hero-meta ion-icon {
    color: var(--brand);
    font-size: 18px;
}

.jobs-section {
    padding-top: 48px;
    padding-bottom: 72px;
}

.jobs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.jobs-head h2 {
    font-size: 22px;
    font-weight: 700;
}

.job-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: border-color .15s, box-shadow .15s, transform .15s;
}

.job-card + .job-card {
    margin-top: 12px;
}

.job-card:hover {
    border-color: rgba(225, 29, 46, 0.4);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.job-card h3 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.job-card:hover h3 {
    color: var(--brand);
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.job-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--ink-2);
    background: var(--surface-2);
    border: 1px solid var(--line);
    padding: 4px 10px;
    border-radius: 999px;
}

.job-tag ion-icon {
    color: var(--muted);
}

.pub-footer {
    border-top: 1px solid var(--line);
    padding: 28px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.pub-footer a {
    color: var(--brand);
    font-weight: 600;
}

.job-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 32px;
    align-items: start;
    padding: 40px 0 72px;
}

.job-layout .sticky {
    position: sticky;
    top: 88px;
}

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

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

.success-panel {
    text-align: center;
    padding: 48px 28px;
}

.success-panel .tick {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green-bg);
    color: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 18px;
}

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

.sidebar-overlay {
    display: none;
}

@media (max-width: 1200px) {
    .grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .grid-main {
        grid-template-columns: minmax(0, 1fr) 320px;
    }
}

@media (max-width: 1024px) {
    .grid-main,
    .job-layout {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .ai-shell {
        grid-template-columns: minmax(0, 1fr);
        height: auto;
    }

    .ai-main {
        height: calc(100vh - var(--topbar-h) - 60px);
    }

    .ai-side {
        display: none;
    }

    .job-layout .sticky {
        position: static;
    }
}

@media (max-width: 860px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        padding: 28px 24px;
    }

    .auth-brand h1 {
        font-size: 26px;
    }

    .auth-points,
    .auth-brand .brand-foot {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: none;
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    body.sidebar-open .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 1000;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .top-bar-fixed {
        left: 0;
        padding: 0 12px;
    }

    .top-bar-fixed .page-title {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .top-bar-fixed .crumb {
        display: none;
    }

    .profile-trigger ion-icon {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: calc(var(--topbar-h) + 16px) 14px 32px;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .form-grid,
    .kv {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .span-2 {
        grid-column: auto;
    }

    .page-head h2 {
        font-size: 19px;
    }

    .toolbar > * {
        flex: 1 1 140px;
    }

    .toolbar .ui-select,
    .toolbar .ui-input {
        width: 100%;
    }

    .dropdown {
        position: fixed;
        left: 10px;
        right: 10px;
        top: calc(var(--topbar-h) + 4px);
        width: auto;
    }

    .ats-box {
        margin-left: 0;
        text-align: left;
    }

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

    .msg-row {
        max-width: 95%;
    }

    .pub-hero h1 {
        font-size: 32px;
    }

    .pub-hero .inner {
        padding-top: 40px;
        padding-bottom: 36px;
    }

    .job-card {
        flex-direction: column;
        align-items: stretch;
    }

    .job-card .ui-btn {
        width: 100%;
    }

    .detail-inner {
        padding-left: 16px;
    }

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

/* TinyMCE: hide upsell banners */
.tox-notification,
.tox-statusbar__branding,
.tox-promotion,
.tox-notifications-container {
    display: none !important;
}

.tox-tinymce {
    border-radius: 10px !important;
    border-color: var(--line) !important;
}

/* Status pills (shared PHP/JS: class s-<status>) */
.status-pill.s-new,
.status-pill.s-scheduled {
    background: var(--blue-bg);
    color: var(--blue);
}

.status-pill.s-shortlisted,
.status-pill.s-draft {
    background: var(--amber-bg);
    color: var(--amber);
}

.status-pill.s-selected,
.status-pill.s-hired,
.status-pill.s-completed,
.status-pill.s-open {
    background: var(--green-bg);
    color: var(--green);
}

.status-pill.s-rejected,
.status-pill.s-closed {
    background: var(--red-bg);
    color: var(--red);
}

.status-pill.s-cancelled,
.status-pill {
    background: var(--gray-bg);
    color: var(--gray);
}

/* Underline tabs */
.tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px 12px;
    font-weight: 600;
    font-size: 13px;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--ink);
}

.tab.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.tab-count {
    font-size: 11px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--line-2);
    color: var(--muted);
}

.tab.active .tab-count {
    background: var(--brand-50);
    color: var(--brand);
}

.tabs-bar {
    border-bottom: 1px solid var(--line);
    padding-bottom: 0;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs-bar.pills {
    padding-bottom: 12px;
}

.tabs-bar > * {
    flex: 0 0 auto !important;
}

/* Tables that turn into stacked cards on phones */
@media (max-width: 768px) {
    .ui-table.cards thead {
        display: none;
    }

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

    .ui-table.cards tbody tr {
        padding: 14px 16px;
        border-bottom: 1px solid var(--line);
    }

    .ui-table.cards tbody tr:last-child {
        border-bottom: none;
    }

    .ui-table.cards td {
        padding: 3px 0;
        border: none;
    }

    .ui-table.cards td:empty {
        display: none;
    }

    .ui-table.cards td.actions {
        text-align: left;
        padding-top: 10px;
        white-space: normal;
    }

    .ui-table.cards td.actions > * {
        margin: 0 4px 4px 0;
    }

    .ui-table.cards td.num {
        text-align: left;
    }

    .ui-table.cards td[data-label]::before {
        content: attr(data-label);
        display: inline-block;
        min-width: 92px;
        font-size: 12px;
        color: var(--muted);
        font-weight: 500;
    }

    .ui-table.cards tr.detail-row {
        padding: 0;
    }

    .ui-table.cards .score {
        display: inline-flex;
    }
}
