/* ============================================================
   RYCON EA CALCULATOR v2.0 — styles_v2.css
   Teal theme with lime-green accents
   ============================================================ */

/* ─── GOOGLE FONTS ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=DM+Mono:wght@400;500&display=swap');

/* ─── DESIGN TOKENS ────────────────────────────────────────── */
:root {
    /* Primary Palette */
    --teal-900: #0d3d3b;
    --teal-800: #115250;
    --teal-700: #156865;
    --teal-600: #197e7a;
    --teal:     #1BA19C;      /* Brand primary */
    --teal-400: #3db8b3;
    --teal-300: #6ecfcb;
    --teal-200: #9DD9D6;      /* Light teal */
    --teal-100: #d0f0ee;
    --teal-50:  #e9f8f7;

    /* Accent */
    --lime:     #CDDC39;
    --lime-dark:#a8b200;
    --lime-light: #e8f0a0;

    /* Neutral */
    --navy:     #2C3E50;
    --gray-800: #3d4e5c;
    --gray-600: #5a6a77;
    --gray-400: #7F8C8D;
    --gray-200: #c8d2d8;
    --gray-100: #e8edf1;
    --gray-50:  #F5F7FA;

    /* Semantic */
    --success:  #27AE60;
    --success-bg: #eafaf1;
    --warning:  #F39C12;
    --warning-bg: #fef9e7;
    --danger:   #E74C3C;
    --danger-bg: #fdf1f0;
    --info:     #3498DB;
    --info-bg:  #ebf5fb;

    /* Surfaces */
    --bg-body:  #F5F7FA;
    --bg-card:  #FFFFFF;
    --bg-sidebar: var(--teal);

    /* Typography */
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'DM Mono', ui-monospace, monospace;

    /* Sizing */
    --sidebar-width: 240px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 22px;

    /* Shadows */
    --shadow-xs: 0 1px 3px rgba(0,0,0,.06);
    --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,.10);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.13);
    --shadow-teal: 0 4px 18px rgba(27,161,156,.25);

    /* Transitions */
    --ease: cubic-bezier(.4,0,.2,1);
    --duration: 180ms;
}

/* ─── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { width: 100%; box-sizing: border-box; }
html { font-size: 16px; }

body {
    font-family: var(--font-body);
    background: var(--bg-body);
    color: var(--navy);
    display: block;
    min-height: 100vh;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
}

/* ─── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--teal-300); border-radius: 99px; }

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--teal);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    position: relative;
    z-index: 100;
    box-shadow: 3px 0 24px rgba(27,161,156,.20);
}

/* Subtle geometric overlay */
.sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.sidebar-header {
    padding: 1.5rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.15);
    position: relative;
}

.sidebar-logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -.3px;
    line-height: 1.2;
    color: #fff;
}

.sidebar-logo span {
    display: block;
    font-size: .7rem;
    font-weight: 400;
    color: var(--teal-200);
    letter-spacing: .05em;
    text-transform: uppercase;
    margin-top: 2px;
}

.sidebar-logo .logo-badge {
    display: inline-block;
    background: var(--lime);
    color: var(--navy);
    font-size: .6rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
    letter-spacing: .06em;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
}

/* Nav */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    position: relative;
}

.sidebar-nav ul {
    list-style: none;
}

.nav-item {
    position: relative;
}

.nav-item a, .nav-item button {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    padding: .7rem 1.25rem;
    color: rgba(255,255,255,.80);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    transition: background var(--duration) var(--ease),
                color var(--duration) var(--ease);
    border-radius: 0;
    text-align: left;
}

.nav-item a:hover, .nav-item button:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.nav-item.active a,
.nav-item.active button {
    background: rgba(0,0,0,.18);
    color: #fff;
    border-right: 3px solid var(--lime);
}

.nav-item .nav-icon {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

/* Alert badge */
.nav-badge {
    margin-left: auto;
    background: var(--lime);
    color: var(--navy);
    font-size: .65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.nav-badge.critical {
    background: var(--danger);
    color: #fff;
}

/* Version */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: .7rem;
    color: rgba(255,255,255,.45);
    line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════════════════ */
.main-content {
    display: block;
    min-height: calc(100vh - 56px);
}

.page-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--gray-100);
    padding: 1.1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: var(--shadow-xs);
}

.page-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -.4px;
}

.page-header .header-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
}

.content-area {
    padding: 1.75rem 2rem;
    width: 100%;
    box-sizing: border-box;
    max-width: 1600px;
    margin: 0 auto;
}

/* ─── PAGE VISIBILITY ───────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; }

/* ═══════════════════════════════════════════════════════════
   CARDS
═══════════════════════════════════════════════════════════ */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(0,0,0,.04);
    transition: box-shadow var(--duration) var(--ease);
}

.card:hover { box-shadow: var(--shadow-md); }

.card h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 1rem;
    letter-spacing: -.3px;
}

.card h3 {
    font-size: .9rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Card Header Row */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* ─── STAT CARDS ──────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,.04);
    transition: transform var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.stat-icon.critical { background: var(--danger-bg); }
.stat-icon.warning  { background: var(--warning-bg); }
.stat-icon.info     { background: var(--info-bg); }
.stat-icon.success  { background: var(--success-bg); }
.stat-icon.teal     { background: var(--teal-50); }

.stat-info { flex: 1; min-width: 0; }

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.04em;
}

.stat-value.critical { color: var(--danger); }
.stat-value.warning  { color: var(--warning); }
.stat-value.info     { color: var(--info); }
.stat-value.success  { color: var(--success); }
.stat-value.teal     { color: var(--teal); }

.stat-label {
    font-size: .78rem;
    color: var(--gray-400);
    margin-top: 3px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn-primary, .btn-secondary, .btn-danger, .btn-success, .btn-warning {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1.1rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background var(--duration) var(--ease),
                transform var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary {
    background: var(--teal);
    color: #fff;
    box-shadow: var(--shadow-teal);
}
.btn-primary:hover {
    background: var(--teal-700);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(27,161,156,.30);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--navy);
}
.btn-secondary:hover {
    background: var(--gray-200);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(231,76,60,.2);
}
.btn-danger:hover {
    background: var(--danger);
    color: #fff;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover {
    background: #1e8449;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(243,156,18,.2);
}
.btn-warning:hover {
    background: var(--warning);
    color: #fff;
}

.btn-lime {
    background: var(--lime);
    color: var(--navy);
    border: none;
    padding: .55rem 1.1rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: .875rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--duration) var(--ease);
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}
.btn-lime:hover { background: var(--lime-dark); }

/* Small variants */
.btn-small { padding: .35rem .75rem; font-size: .78rem; border-radius: var(--radius-sm); }

/* Full width */
.btn-block { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════════════════════════
   FORMS
═══════════════════════════════════════════════════════════ */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: .825rem;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: .35rem;
    letter-spacing: .01em;
}

.form-control {
    width: 100%;
    padding: .6rem .85rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: .9rem;
    color: var(--navy);
    background: #fff;
    transition: border-color var(--duration) var(--ease),
                box-shadow var(--duration) var(--ease);
    outline: none;
}

.form-control:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(27,161,156,.12);
}

.form-control:hover:not(:focus) {
    border-color: var(--teal-300);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237F8C8D' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .85rem center;
    padding-right: 2.5rem;
}

/* Formatted number inputs (dollar amounts) */
input.formatted-number {
    font-family: var(--font-mono);
    font-size: .9rem;
    text-align: right;
    letter-spacing: -.01em;
}

.input-prefix-group {
    position: relative;
}

.input-prefix-group .prefix {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: .9rem;
    pointer-events: none;
    font-family: var(--font-mono);
}

.input-prefix-group .form-control {
    padding-left: 1.75rem;
}

.input-suffix-group {
    position: relative;
}

.input-suffix-group .suffix {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: .85rem;
    pointer-events: none;
}

.input-suffix-group .form-control {
    padding-right: 2.5rem;
}

/* Form grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Section within a form */
.form-section {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.form-section:last-child { border-bottom: none; }

.form-section h3 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.section-description {
    font-size: .82rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Radio toggle group */
.radio-group {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border: 1.5px solid var(--gray-200);
    border-radius: 99px;
    cursor: pointer;
    font-size: .85rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all var(--duration) var(--ease);
    user-select: none;
}

.radio-option input[type="radio"] { display: none; }

.radio-option:has(input:checked) {
    border-color: var(--teal);
    background: var(--teal-50);
    color: var(--teal-700);
}

.radio-option:hover { border-color: var(--teal-300); }

/* ═══════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════ */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.data-table thead tr {
    background: var(--teal);
    color: #fff;
}

.data-table thead th {
    padding: .85rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 var(--radius-md) 0 0; }

.data-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: background var(--duration) var(--ease);
}

.data-table tbody tr:hover { background: var(--teal-50); }

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

.data-table tbody tr:nth-child(even) { background: var(--gray-50); }
.data-table tbody tr:nth-child(even):hover { background: var(--teal-50); }

.data-table td {
    padding: .8rem 1rem;
    color: var(--navy);
    vertical-align: middle;
}

.data-table td.mono {
    font-family: var(--font-mono);
    font-size: .85rem;
}

.empty-row td {
    text-align: center;
    color: var(--gray-400);
    padding: 2.5rem;
    font-style: italic;
}

/* ─── TEAM LINK STYLE ────────────────────────────────────── */
.team-link {
    color: var(--teal);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    transition: color var(--duration) var(--ease);
}
.team-link:hover {
    color: var(--teal-700);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.team-link::after { content: '→'; opacity: .6; }

/* ═══════════════════════════════════════════════════════════
   ALERTS / VALIDATION MESSAGES
═══════════════════════════════════════════════════════════ */
.alert {
    padding: .85rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: .875rem;
    margin-bottom: .75rem;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    line-height: 1.5;
}

.alert-icon { flex-shrink: 0; font-size: 1rem; }

.alert.critical {
    background: var(--danger-bg);
    border: 1px solid rgba(231,76,60,.2);
    color: #7d1a13;
}

.alert.warning {
    background: var(--warning-bg);
    border: 1px solid rgba(243,156,18,.2);
    color: #7d5a09;
}

.alert.info {
    background: var(--info-bg);
    border: 1px solid rgba(52,152,219,.2);
    color: #1a5276;
}

.alert.success {
    background: var(--success-bg);
    border: 1px solid rgba(39,174,96,.2);
    color: #1a5e33;
}

.alert strong { font-weight: 700; }

.alert-list {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

/* Validation message below inputs */
.validation-message {
    font-size: .78rem;
    font-weight: 600;
    padding: .4rem .75rem;
    border-radius: var(--radius-sm);
    margin-top: .3rem;
    display: inline-block;
}

.validation-message.legal   { background: var(--success-bg); color: var(--success); }
.validation-message.minimum { background: var(--warning-bg); color: var(--warning); }
.validation-message.illegal { background: var(--danger-bg);  color: var(--danger); }
.validation-message.error   { background: var(--danger-bg);  color: var(--danger); }

/* ═══════════════════════════════════════════════════════════
   BADGES / STATUS CHIPS
═══════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .7rem;
    border-radius: 99px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.badge-success  { background: var(--success-bg);  color: var(--success); }
.badge-warning  { background: var(--warning-bg);  color: var(--warning); }
.badge-danger   { background: var(--danger-bg);   color: var(--danger); }
.badge-info     { background: var(--info-bg);     color: var(--info); }
.badge-teal     { background: var(--teal-50);     color: var(--teal-700); }
.badge-neutral  { background: var(--gray-100);    color: var(--gray-600); }

/* ═══════════════════════════════════════════════════════════
   MODALS
═══════════════════════════════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(27,30,36,.55);
    backdrop-filter: blur(3px);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: overlayIn var(--duration) var(--ease);
}

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

@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn var(--duration) var(--ease);
}

.modal.modal-lg { max-width: 820px; }
.modal.modal-sm { max-width: 480px; }

@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -.3px;
}

.modal-close {
    background: var(--gray-100);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--duration) var(--ease);
}
.modal-close:hover { background: var(--gray-200); }

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: .75rem;
    justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════════════
   TOOLTIPS (ℹ️ info icons)
═══════════════════════════════════════════════════════════ */
.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: var(--teal-100);
    color: var(--teal-700);
    border-radius: 50%;
    font-size: .7rem;
    font-weight: 700;
    cursor: help;
    margin-left: .4rem;
    vertical-align: middle;
    flex-shrink: 0;
    transition: background var(--duration) var(--ease);
}

.info-tooltip:hover { background: var(--teal-200); }

.info-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy);
    color: #fff;
    padding: .75rem 1rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: .78rem;
    font-weight: 400;
    white-space: pre-line;
    width: 300px;
    line-height: 1.55;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%) translateY(4px);
    transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.info-tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--navy);
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}

.info-tooltip:hover::after,
.info-tooltip:hover::before { opacity: 1; transform: translateX(-50%) translateY(0); }
.info-tooltip:hover::before { transform: translateX(-50%); }

/* ═══════════════════════════════════════════════════════════
   OVERHEAD & ALLOCATION
═══════════════════════════════════════════════════════════ */
.overhead-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9rem 1.1rem;
    background: var(--teal-50);
    border: 1.5px solid var(--teal-200);
    border-radius: var(--radius-md);
    margin-top: 1rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--teal-800);
}

.overhead-total .amount {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    color: var(--teal);
}

.allocation-summary {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--gray-100);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: .75rem;
    margin-top: .75rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    padding: .85rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.summary-item span {
    font-size: .75rem;
    color: var(--gray-400);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.summary-item strong {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    font-family: var(--font-mono);
}

.summary-item.warning strong { color: var(--warning); }
.summary-item.danger strong  { color: var(--danger); }
.summary-item.success strong { color: var(--success); }

/* Allocation bar */
.allocation-bar-wrap {
    margin-top: .75rem;
}

.allocation-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: .75rem;
    color: var(--gray-400);
    margin-bottom: .35rem;
}

.allocation-bar {
    height: 8px;
    background: var(--gray-100);
    border-radius: 99px;
    overflow: hidden;
}

.allocation-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--teal-300));
    border-radius: 99px;
    transition: width .5s var(--ease);
}

.allocation-bar-fill.over { background: linear-gradient(90deg, var(--warning), var(--danger)); }

/* Preview text */
.calc-preview {
    font-size: .8rem;
    color: var(--teal-700);
    background: var(--teal-50);
    padding: .3rem .7rem;
    border-radius: var(--radius-sm);
    margin-top: .35rem;
    font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════
   CALCULATOR RESULTS
═══════════════════════════════════════════════════════════ */
.calc-results {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--gray-100);
    margin-top: 1.25rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: .75rem;
}

.result-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: .9rem 1rem;
    border: 1px solid var(--gray-100);
}

.result-label {
    font-size: .72rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .3rem;
}

.result-value {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
}

.result-item.highlight {
    background: linear-gradient(135deg, var(--teal-700) 0%, var(--teal) 100%);
    border: none;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow-teal);
}

.result-item.highlight .result-label { color: rgba(255,255,255,.7); }
.result-item.highlight .result-value { color: #fff; font-size: 1.6rem; }

/* ═══════════════════════════════════════════════════════════
   TEAM DETAIL VIEW
═══════════════════════════════════════════════════════════ */
.team-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
    padding: 1.1rem;
    background: linear-gradient(135deg, var(--teal-50), var(--teal-100));
    border-radius: var(--radius-lg);
    border: 1px solid var(--teal-200);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--teal);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1rem;
    transition: color var(--duration) var(--ease);
}

.back-btn:hover { color: var(--teal-700); }
.back-btn::before { content: '←'; }

/* ═══════════════════════════════════════════════════════════
   EMPLOYEE DETAIL PAGE
═══════════════════════════════════════════════════════════ */

/* Header card with avatar + summary */
.emp-detail-header {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    padding: 1.5rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.emp-detail-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-700), var(--teal));
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.emp-detail-info { flex: 1; }

.emp-detail-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: .3rem;
}

.emp-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    font-size: .82rem;
    color: var(--gray-400);
}

.emp-detail-actions {
    display: flex;
    gap: .6rem;
    flex-shrink: 0;
}

/* Wage breakdown table specifics */
.wage-breakdown-table .mono-th { text-align: right; }

.wage-breakdown-table td.amount-cell {
    text-align: right;
    font-family: var(--font-mono);
    font-size: .875rem;
    color: var(--navy);
    white-space: nowrap;
}

.wage-breakdown-table tr.row-base td { font-weight: 700; }

.wage-breakdown-table tr.row-standard td { background: var(--teal-50); }

.wage-breakdown-table tr.row-adhoc td { background: var(--gray-50); }

.wage-breakdown-table tr.row-total td {
    font-weight: 800;
    background: var(--navy);
    color: white;
    font-size: .9rem;
}

.wage-breakdown-table tr.row-total td.amount-cell { color: var(--lime); }

/* Type badge inside table */
.type-pill {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    padding: .15rem .55rem;
    border-radius: 999px;
    white-space: nowrap;
}
.type-pill.base     { background: var(--teal-50);   color: var(--teal-700); }
.type-pill.standard { background: var(--teal-100);  color: var(--teal-700); }
.type-pill.adhoc    { background: var(--gray-100);  color: var(--gray-600); }
.type-pill.excluded { background: var(--danger-bg); color: var(--danger);   text-decoration: line-through; }

/* Inline edit panel */
.emp-detail-edit-panel {
    background: var(--teal-50);
    border: 1.5px solid var(--teal-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-top: 1rem;
}

.emp-detail-edit-panel h3 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .85rem;
}

/* btn-teal for the View button */
.btn-teal {
    background: var(--teal);
    color: white;
    border: none;
    padding: .35rem .75rem;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--duration) var(--ease);
}
.btn-teal:hover { background: var(--teal-700); }

/* ═══════════════════════════════════════════════════════════
   INFO BOX (guidance text)
═══════════════════════════════════════════════════════════ */
.info-box {
    background: var(--info-bg);
    border: 1px solid rgba(52,152,219,.2);
    border-radius: var(--radius-md);
    padding: .85rem 1.1rem;
    font-size: .83rem;
    color: var(--navy);
    line-height: 1.55;
    margin-top: .75rem;
}

.info-box p { margin: 0; }

/* ═══════════════════════════════════════════════════════════
   COMPLIANCE / COUNTDOWN CARDS
═══════════════════════════════════════════════════════════ */
.countdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: .75rem;
}

.countdown-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    border: 1px solid var(--gray-100);
    text-align: center;
}

.countdown-days {
    font-size: 2rem;
    font-weight: 800;
    color: var(--teal);
    letter-spacing: -.04em;
    line-height: 1;
}

.countdown-days.urgent { color: var(--danger); }
.countdown-days.warning { color: var(--warning); }

.countdown-label {
    font-size: .75rem;
    color: var(--gray-400);
    margin-top: .3rem;
    font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════
   RATES REFERENCE TABLE (special colours)
═══════════════════════════════════════════════════════════ */
.rates-table .award-row { background: rgba(52,152,219,.04); }
.rates-table .eba-row   { background: rgba(27,161,156,.05); }
.rates-table .eba-row td { font-weight: 600; }
.rates-table .highlight-row {
    background: var(--teal-50) !important;
    border-left: 3px solid var(--teal);
}

.rate-comparison {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .78rem;
    color: var(--success);
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   EMPLOYEE COMPLIANCE ROWS
═══════════════════════════════════════════════════════════ */
.employee-compliance-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem;
    border-radius: var(--radius-md);
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    margin-bottom: .5rem;
    transition: background var(--duration) var(--ease);
}

.employee-compliance-row:hover { background: var(--teal-50); }

.employee-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--teal-300));
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.employee-info { flex: 1; min-width: 0; }
.employee-name { font-weight: 600; font-size: .875rem; color: var(--navy); }
.employee-sub  { font-size: .75rem; color: var(--gray-400); margin-top: 1px; }

/* ═══════════════════════════════════════════════════════════
   DASHBOARD ALERTS
═══════════════════════════════════════════════════════════ */
.alerts-list { display: flex; flex-direction: column; gap: .5rem; }

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
}

.alert-item.critical {
    background: var(--danger-bg);
    border-color: rgba(231,76,60,.2);
}

.alert-item.warning {
    background: var(--warning-bg);
    border-color: rgba(243,156,18,.2);
}

.alert-item.info {
    background: var(--info-bg);
    border-color: rgba(52,152,219,.2);
}

.alert-item-body { flex: 1; }
.alert-item-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .15rem;
}
.alert-item-msg {
    font-size: .78rem;
    color: var(--gray-600);
    line-height: 1.45;
}

.alert-item .btn-small { flex-shrink: 0; }

/* ═══════════════════════════════════════════════════════════
   SETTINGS PAGE
═══════════════════════════════════════════════════════════ */
.settings-section {
    border-bottom: 1px solid var(--gray-100);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-section:last-child { border-bottom: none; padding-bottom: 0; }

.settings-section h3 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--teal-700);
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--teal-100);
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* ═══════════════════════════════════════════════════════════
   OVERHEADS PAGE (dedicated)
═══════════════════════════════════════════════════════════ */
.overhead-hero {
    background: linear-gradient(135deg, var(--teal-700) 0%, var(--teal) 100%);
    color: #fff;
    border-radius: var(--radius-xl);
    padding: 1.75rem 2rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-shadow: var(--shadow-teal);
}

.overhead-hero-text h2 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -.04em;
    margin-bottom: .3rem;
}

.overhead-hero-text p {
    font-size: .875rem;
    opacity: .8;
    max-width: 42ch;
    line-height: 1.5;
}

.overhead-hero-value {
    text-align: right;
    flex-shrink: 0;
}

.overhead-hero-value .big-amount {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -.05em;
    font-family: var(--font-mono);
    color: var(--lime);
}

.overhead-hero-value .big-label {
    font-size: .72rem;
    opacity: .7;
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-top: 2px;
}

/* ═══════════════════════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════════════════════ */
.divider {
    border: none;
    border-top: 1px solid var(--gray-100);
    margin: 1.25rem 0;
}

.text-muted   { color: var(--gray-400); }
.text-teal    { color: var(--teal); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-navy    { color: var(--navy); }

.fw-bold   { font-weight: 700; }
.fw-medium { font-weight: 500; }
.font-mono { font-family: var(--font-mono); }

.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm      { gap: .5rem; }
.gap-md      { gap: 1rem; }
.gap-lg      { gap: 1.5rem; }

.mt-sm { margin-top: .5rem; }
.mt-md { margin-top: 1rem; }
.mt-lg { margin-top: 1.5rem; }
.mb-sm { margin-bottom: .5rem; }
.mb-md { margin-bottom: 1rem; }

.hidden { display: none !important; }

/* ─── TEAL ACCENT LINE (section top border) ─────────────── */
.card.accent-top {
    border-top: 3px solid var(--teal);
}
.card.accent-lime {
    border-top: 3px solid var(--lime);
}

/* ─── LOADING SPINNER ────────────────────────────────────── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid var(--teal-200);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin .6s linear infinite;
    display: inline-block;
}

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

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .content-area { padding: 1.1rem; }
    .page-header { padding: .9rem 1.1rem; }
    .form-grid-2 { grid-template-columns: 1fr; }
    .overhead-hero { flex-direction: column; text-align: center; }
    .overhead-hero-value { text-align: center; }
    /* Top nav — collapse labels on smaller screens */
    .topnav-subtitle { display: none; }
    .topnav-nav .topnav-link { padding: 0 .65rem; font-size: .8rem; }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .result-item.highlight { flex-direction: column; text-align: center; }
    /* Top nav — stack on mobile */
    .topnav { flex-wrap: wrap; height: auto; padding: .5rem .75rem; gap: .5rem; }
    .topnav-brand { margin-right: 0; }
    .topnav-nav { overflow-x: auto; width: 100%; }
    .topnav-right { margin-left: 0; }
    body { padding-top: 80px; }
}

/* ═══════════════════════════════════════════════════════════
   ALLOWANCE TOGGLES (Settings page)
═══════════════════════════════════════════════════════════ */
.allowance-grid {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.allowance-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1rem;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color var(--duration) var(--ease),
                background var(--duration) var(--ease);
    gap: 1rem;
    user-select: none;
}

.allowance-toggle:hover {
    border-color: var(--teal-300);
    background: var(--teal-50);
}

.allowance-toggle:has(input:checked) {
    border-color: var(--teal);
    background: var(--teal-50);
}

.allowance-toggle-left {
    display: flex;
    align-items: center;
    gap: .85rem;
    flex: 1;
}

.allowance-toggle-left input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--teal);
    flex-shrink: 0;
    cursor: pointer;
}

.allowance-toggle-name {
    font-size: .875rem;
    font-weight: 600;
    color: var(--navy);
}

.allowance-toggle-desc {
    font-size: .75rem;
    color: var(--gray-400);
    margin-top: 2px;
}

.allowance-toggle-right {
    text-align: right;
    flex-shrink: 0;
}

.allowance-amount {
    display: block;
    font-family: var(--font-mono);
    font-size: .9rem;
    font-weight: 700;
    color: var(--teal-700);
}

.allowance-annual {
    display: block;
    font-size: .72rem;
    color: var(--gray-400);
    margin-top: 1px;
}

/* ═══════════════════════════════════════════════════════════
   AD HOC ALLOWANCE ROWS (Employee modal)
═══════════════════════════════════════════════════════════ */
.adhoc-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .5rem;
}

.adhoc-row .adhoc-name {
    flex: 1;
}

.adhoc-row .adhoc-amount {
    width: 130px;
    flex-shrink: 0;
}

.adhoc-row .adhoc-remove {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 1.1rem;
    cursor: pointer;
    padding: .3rem;
    line-height: 1;
    border-radius: var(--radius-sm);
    transition: color var(--duration) var(--ease),
                background var(--duration) var(--ease);
    flex-shrink: 0;
}

.adhoc-row .adhoc-remove:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

.adhoc-empty {
    font-size: .8rem;
    color: var(--gray-400);
    font-style: italic;
    padding: .5rem 0;
}

/* ═══════════════════════════════════════════════════════════
   DUPLICATE EMPLOYEE MODAL
═══════════════════════════════════════════════════════════ */
.btn-duplicate {
    color: var(--teal-700) !important;
    border: 1px solid var(--teal-200) !important;
}
.btn-duplicate:hover {
    background: var(--teal-50) !important;
    border-color: var(--teal) !important;
}

.duplicate-source-card {
    background: var(--teal-50);
    border: 1.5px solid var(--teal-200);
    border-radius: var(--radius-md);
    padding: .9rem 1.1rem;
    display: flex;
    align-items: center;
    gap: .85rem;
}

.duplicate-source-card .dup-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-700), var(--teal));
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.duplicate-source-card .dup-info strong {
    display: block;
    font-size: .9rem;
    color: var(--navy);
}

.duplicate-source-card .dup-info small {
    font-size: .75rem;
    color: var(--gray-400);
}

.duplicate-counter {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: .75rem 0;
}

.dup-counter-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--teal-200);
    background: var(--teal-50);
    color: var(--teal-700);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--duration) var(--ease),
                border-color var(--duration) var(--ease);
    flex-shrink: 0;
}

.dup-counter-btn:hover {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
}

.dup-counter-input {
    width: 80px !important;
    text-align: center;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    font-family: var(--font-mono) !important;
    border-color: var(--teal-200) !important;
}

.duplicate-preview {
    margin-top: .75rem;
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    background: var(--gray-50);
}

.dup-preview-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .45rem .85rem;
    border-bottom: 1px solid var(--gray-100);
    font-size: .8rem;
    color: var(--navy);
}

.dup-preview-row:last-child { border-bottom: none; }

.dup-preview-num {
    font-family: var(--font-mono);
    font-size: .72rem;
    color: var(--teal);
    font-weight: 700;
    width: 28px;
    flex-shrink: 0;
}

.dup-preview-name { font-weight: 600; flex: 1; }
.dup-preview-rate { font-family: var(--font-mono); color: var(--gray-400); font-size: .75rem; }

@media print {
    .sidebar, .page-header, .btn-primary, .btn-secondary, .btn-danger { display: none !important; }
    .content-area { padding: 0; }
    .card { box-shadow: none; border: 1px solid #ccc; }
    .data-table thead tr { background: #eee; color: #000; }
}

/* ═══════════════════════════════════════════════════════════
   RATES PAGE — TABS
═══════════════════════════════════════════════════════════ */

.tab-nav {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--gray-100);
    padding-bottom: .6rem;
}

.tab-btn {
    padding: .45rem 1rem;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gray-200);
    background: white;
    color: var(--gray-500);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.tab-btn:hover { border-color: var(--teal); color: var(--teal); }
.tab-btn.active { background: var(--teal); border-color: var(--teal); color: white; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ═══════════════════════════════════════════════════════════
   AWARD GUIDE
═══════════════════════════════════════════════════════════ */

.award-guide-search {
    position: relative;
    margin-bottom: 1rem;
}

.award-guide-search .search-icon {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .9rem;
    pointer-events: none;
}

.award-guide-search .form-control {
    padding-left: 2.4rem;
    font-size: .9rem;
}

.guide-subtab-nav {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.guide-subtab-btn {
    padding: .35rem .9rem;
    border-radius: 999px;
    border: 1.5px solid var(--gray-200);
    background: white;
    color: var(--gray-500);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
}

.guide-subtab-btn:hover { border-color: var(--teal); color: var(--teal); }
.guide-subtab-btn.active { background: var(--teal-50); border-color: var(--teal); color: var(--teal-700); }

/* Award guide cards */
.guide-card {
    background: white;
    border: 1.5px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    transition: border-color var(--duration) var(--ease);
}

.guide-card:hover { border-color: var(--teal-200); }

.guide-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
}

.guide-card-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: .2rem;
}

.guide-card-clause {
    font-size: .75rem;
    color: var(--teal-700);
    font-weight: 600;
    font-family: var(--font-mono);
}

.guide-card-badges {
    display: flex;
    gap: .4rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.guide-card-body { font-size: .875rem; color: var(--gray-600); line-height: 1.55; }

.guide-applies {
    margin-bottom: .6rem;
}

.guide-applies-label {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--gray-400);
    margin-bottom: .2rem;
}

.guide-coaching-box {
    background: var(--teal-50);
    border-left: 3px solid var(--teal);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: .75rem 1rem;
    margin: .75rem 0;
    font-size: .855rem;
    color: var(--navy);
    line-height: 1.55;
}

.guide-coaching-box::before {
    content: '💡 ';
    font-style: normal;
}

.guide-mistake-box {
    background: var(--danger-bg);
    border-left: 3px solid var(--danger);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: .65rem 1rem;
    margin: .6rem 0;
    font-size: .82rem;
    color: var(--danger);
    line-height: 1.5;
}

.guide-mistake-box::before { content: '⚠ Common mistake: '; font-weight: 700; }

.guide-tip-box {
    background: var(--gray-50);
    border-left: 3px solid var(--gray-300);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: .65rem 1rem;
    margin: .6rem 0;
    font-size: .82rem;
    color: var(--gray-600);
    line-height: 1.5;
}

.guide-tip-box::before { content: '✓ Tip: '; font-weight: 700; color: var(--teal-700); }

.guide-rates-table {
    margin: .75rem 0;
    border-collapse: collapse;
    width: 100%;
    font-size: .82rem;
}

.guide-rates-table th {
    background: var(--navy);
    color: white;
    padding: .4rem .75rem;
    text-align: left;
    font-size: .72rem;
}

.guide-rates-table td {
    padding: .35rem .75rem;
    border-bottom: 1px solid var(--gray-100);
}

.guide-rates-table tr:last-child td { border-bottom: none; }

.guide-expand-btn {
    background: none;
    border: none;
    color: var(--teal);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    padding: .3rem 0;
    margin-top: .5rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}

.guide-card[data-hidden="true"] { display: none; }

/* job-cost badge */
.badge-job-cost { background: #fff3cd; color: #856404; }
.badge-emp-cost { background: var(--teal-50); color: var(--teal-700); }

/* ═══════════════════════════════════════════════════════════
   FWC SYNC UI
═══════════════════════════════════════════════════════════ */

.fwc-sync-panel {
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.fwc-sync-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-wrap: wrap;
}

.fwc-sync-status {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.fwc-sync-message {
    flex: 1;
    font-size: .875rem;
    color: var(--gray-600);
}

.fwc-last-synced {
    font-size: .75rem;
    color: var(--gray-400);
    margin-top: .4rem;
}

.fwc-banner {
    background: var(--teal-50);
    border: 1px solid var(--teal-200);
    border-radius: var(--radius-md);
    padding: .65rem 1rem;
    font-size: .82rem;
    color: var(--teal-700);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.fwc-data-section h3 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .75rem;
}

/* ═══════════════════════════════════════════════════════════
   SETTINGS — TOGGLE SWITCH
═══════════════════════════════════════════════════════════ */

.toggle-switch-label {
    display: flex;
    align-items: center;
    gap: .75rem;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: .9rem;
}

.toggle-switch-label input[type="checkbox"] { display: none; }

.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--gray-300);
    border-radius: 999px;
    transition: background var(--duration) var(--ease);
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: left var(--duration) var(--ease);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.toggle-switch-label input:checked + .toggle-switch {
    background: var(--teal);
}

.toggle-switch-label input:checked + .toggle-switch::after {
    left: 23px;
}

/* ═══════════════════════════════════════════════════════════
   AI CHAT PANEL
═══════════════════════════════════════════════════════════ */

.ai-coach-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--teal);
    color: white;
    border-radius: 999px;
    padding: .65rem 1.1rem;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,150,136,.35);
    display: flex;
    align-items: center;
    gap: .5rem;
    z-index: 900;
    transition: all var(--duration) var(--ease);
    user-select: none;
}

.ai-coach-fab:hover {
    background: var(--teal-700);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,150,136,.4);
}

.ai-coach-fab-label {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .01em;
}

.ai-chat-panel {
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    width: 380px;
    max-height: 580px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    z-index: 901;
    overflow: hidden;
    border: 1px solid var(--gray-100);
}

.ai-chat-header {
    background: var(--teal);
    color: white;
    padding: .85rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.ai-chat-title { font-size: .95rem; font-weight: 800; }
.ai-chat-subtitle { font-size: .72rem; opacity: .85; margin-top: .1rem; }

.ai-chat-close {
    background: rgba(255,255,255,.2);
    border: none;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: .85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--duration) var(--ease);
}

.ai-chat-close:hover { background: rgba(255,255,255,.35); }

.ai-chat-disclaimer {
    background: var(--teal-50);
    color: var(--teal-700);
    font-size: .72rem;
    padding: .45rem .85rem;
    border-bottom: 1px solid var(--teal-100);
    flex-shrink: 0;
    line-height: 1.4;
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: .85rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    min-height: 200px;
}

.ai-chat-starters { display: flex; flex-direction: column; gap: .45rem; }
.ai-chat-starters-label {
    font-size: .75rem;
    font-weight: 700;
    color: var(--gray-400);
    margin-bottom: .2rem;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ai-starter-btn {
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: .5rem .75rem;
    font-size: .8rem;
    color: var(--navy);
    cursor: pointer;
    text-align: left;
    transition: all var(--duration) var(--ease);
    line-height: 1.4;
}

.ai-starter-btn:hover { background: var(--teal-50); border-color: var(--teal); color: var(--teal-700); }

/* Chat bubbles */
.ai-msg {
    display: flex;
    flex-direction: column;
    max-width: 90%;
}

.ai-msg.user { align-self: flex-end; align-items: flex-end; }
.ai-msg.assistant { align-self: flex-start; align-items: flex-start; }

.ai-msg-bubble {
    padding: .6rem .85rem;
    border-radius: var(--radius-md);
    font-size: .84rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.ai-msg.user .ai-msg-bubble {
    background: var(--teal);
    color: white;
    border-radius: var(--radius-md) var(--radius-md) 4px var(--radius-md);
}

.ai-msg.assistant .ai-msg-bubble {
    background: var(--gray-50);
    color: var(--navy);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md) var(--radius-md) var(--radius-md) 4px;
}

.ai-msg-thinking {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    padding: .6rem .85rem;
    font-size: .82rem;
    color: var(--gray-400);
    font-style: italic;
    align-self: flex-start;
}

.ai-chat-input-area {
    border-top: 1px solid var(--gray-100);
    padding: .65rem;
    display: flex;
    gap: .5rem;
    align-items: flex-end;
    flex-shrink: 0;
    background: white;
}

.ai-chat-input {
    flex: 1;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: .55rem .75rem;
    font-size: .85rem;
    font-family: var(--font-sans);
    resize: none;
    outline: none;
    transition: border-color var(--duration) var(--ease);
    line-height: 1.4;
}

.ai-chat-input:focus { border-color: var(--teal); }

.ai-chat-send {
    background: var(--teal);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--duration) var(--ease);
}

.ai-chat-send:hover { background: var(--teal-700); }
.ai-chat-send:disabled { background: var(--gray-300); cursor: not-allowed; }

/* Coaching note on employee detail wage table */
.coaching-note {
    background: var(--teal-50);
    border: 1px solid var(--teal-200);
    border-radius: var(--radius-sm);
    padding: .55rem .85rem;
    font-size: .8rem;
    color: var(--teal-700);
    line-height: 1.5;
    position: relative;
    margin-top: .3rem;
}

.coaching-note-dismiss {
    position: absolute;
    top: .3rem;
    right: .45rem;
    background: none;
    border: none;
    color: var(--teal-400);
    cursor: pointer;
    font-size: .75rem;
    padding: 0;
    line-height: 1;
}

.coaching-note-dismiss:hover { color: var(--danger); }

.coaching-note-job-cost {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    font-size: .7rem;
    font-weight: 700;
    padding: .1rem .45rem;
    border-radius: 999px;
    margin-left: .4rem;
    vertical-align: middle;
}

/* Coaching toast variant */
.toast.toast-coaching {
    background: var(--teal-700);
    border-left: 4px solid var(--lime);
    max-width: 360px;
}

@media (max-width: 640px) {
    .ai-chat-panel { width: calc(100vw - 2rem); right: 1rem; bottom: 4.5rem; }
    .ai-coach-fab { right: 1rem; bottom: 1rem; }
    .tab-nav { gap: .3rem; }
    .tab-btn { font-size: .75rem; padding: .4rem .7rem; }
}

/* ═══════════════════════════════════════════════════════════
   NON-CHARGEABLE TIME EDITOR
═══════════════════════════════════════════════════════════ */

.nc-row {
    display: grid;
    grid-template-columns: 1fr 280px 32px;
    align-items: start;
    gap: 1rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.nc-row:last-of-type { border-bottom: none; }

.nc-label-text {
    font-weight: 600;
    font-size: .875rem;
    color: var(--navy);
    margin-bottom: .15rem;
}

.nc-label-note {
    font-size: .72rem;
    color: var(--gray-400);
}

.nc-label-input {
    font-size: .875rem;
    font-weight: 600;
    padding: .35rem .6rem;
}

.nc-input-group {
    display: flex;
    gap: .4rem;
    align-items: center;
}

.nc-input-group .form-control {
    font-size: .875rem;
}

.nc-value-input { width: 90px; text-align: right; }

.nc-unit-select {
    width: 90px;
    font-size: .8rem;
    padding: .35rem .5rem;
}

.nc-hours-label {
    font-size: .72rem;
    color: var(--teal-700);
    font-weight: 600;
    margin-top: .25rem;
    min-height: 1rem;
    font-family: var(--font-mono);
}

.nc-delete-btn {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: .9rem;
    padding: .3rem;
    border-radius: var(--radius-sm);
    transition: color var(--duration) var(--ease);
    margin-top: .2rem;
}

.nc-delete-btn:hover { color: var(--danger); }

/* Team RDO quick-set buttons */
.rdo-quick-btns .btn-secondary {
    font-size: .75rem;
    padding: .3rem .65rem;
}

@media (max-width: 640px) {
    .nc-row {
        grid-template-columns: 1fr 32px;
        grid-template-rows: auto auto;
    }
    .nc-row-input { grid-column: 1 / -1; }
}

/* ═══════════════════════════════════════════════════════════
   NON-CHARGEABLE PROFILES PAGE
═══════════════════════════════════════════════════════════ */

.profile-globals-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    background: var(--teal-50);
    border: 1px solid var(--teal-200);
    border-radius: var(--radius-md);
    padding: .65rem 1rem;
    font-size: .82rem;
}

.profile-globals-label {
    font-weight: 700;
    color: var(--navy);
    white-space: nowrap;
}

.profile-globals-edit {
    margin-left: auto;
    color: var(--teal-700);
    font-weight: 600;
    font-size: .75rem;
    white-space: nowrap;
}

.profile-total-bar {
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
}

.profile-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .3rem 0;
    font-size: .85rem;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-100);
}

.profile-total-row:last-child { border-bottom: none; }

.profile-total-final {
    font-weight: 800;
    color: var(--navy);
    font-size: .95rem;
    padding-top: .5rem;
    margin-top: .25rem;
    border-top: 2px solid var(--gray-200) !important;
    border-bottom: none !important;
}

/* ═══════════════════════════════════════════════════════════
   TAFE CALENDAR
═══════════════════════════════════════════════════════════ */

.tafe-cal-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.tafe-cal-title {
    font-weight: 700;
    color: var(--navy);
    font-size: .9rem;
}

.tafe-cal-year-nav {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: 700;
    font-size: .9rem;
    color: var(--navy);
}

.tafe-cal-total {
    margin-left: auto;
    font-size: .82rem;
    font-weight: 700;
    color: var(--teal-700);
    font-family: var(--font-mono);
}

.tafe-cal-legend {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: .75rem;
}

.tafe-legend-item {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .72rem;
    color: var(--gray-600);
}

.tafe-legend-item::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}

.tafe-week-teaching.tafe-legend-item::before  { background: #c8e6c9; border: 1.5px solid #4caf50; }
.tafe-week-holiday.tafe-legend-item::before   { background: #ffe0b2; border: 1.5px solid #ff9800; }
.tafe-week-nonteach.tafe-legend-item::before  { background: #c8e6c9; border: 1.5px solid #388e3c; }
.tafe-week-none.tafe-legend-item::before      { background: var(--gray-100); border: 1.5px solid var(--gray-300); }

.tafe-calendar-grid {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.tafe-quarter { }

.tafe-quarter-label {
    font-size: .72rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .3rem;
}

.tafe-week-row {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
}

.tafe-week-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: 1.5px solid transparent;
    font-size: .7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
}

/* Week types — background colour */
.tafe-week-none     { background: var(--gray-100); border-color: var(--gray-200); color: var(--gray-400); }
.tafe-week-teaching { background: #e8f5e9; border-color: #a5d6a7; color: #2e7d32; }
.tafe-week-holiday  { background: #fff8e1; border-color: #ffe082; color: #f57f17; }
.tafe-week-nonteach { background: #e8f5e9; border-color: #66bb6a; color: #1b5e20; }

/* Selected = TAFE attendance confirmed */
.tafe-week-btn.tafe-week-selected {
    background: var(--teal) !important;
    border-color: var(--teal-700) !important;
    color: white !important;
    box-shadow: 0 2px 6px rgba(0,150,136,.3);
}

.tafe-week-btn:hover:not(.tafe-week-selected) {
    border-color: var(--teal);
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════
   TEAM CHARGE-OUT RATE WIDGET
═══════════════════════════════════════════════════════════ */

.team-rate-card {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: .75rem;
    overflow: hidden;
    transition: box-shadow var(--duration) var(--ease);
}

.team-rate-card:last-child { margin-bottom: 0; }
.team-rate-card:hover { box-shadow: var(--shadow-md); }

.team-rate-header {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background: var(--gray-50);
    transition: background var(--duration) var(--ease);
}

.team-rate-header:hover { background: var(--teal-50); }

.team-rate-name {
    font-weight: 800;
    font-size: 1rem;
    color: var(--navy);
}

.team-rate-meta {
    font-size: .75rem;
    color: var(--gray-400);
    margin-top: .15rem;
}

.team-rate-hours-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.team-rate-hours-item { text-align: center; }

.team-rate-hours-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--navy);
    font-family: var(--font-mono);
}

.team-rate-hours-label {
    font-size: .68rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-top: .1rem;
}

.team-rate-hours-divider {
    color: var(--gray-300);
    font-size: 1.5rem;
    font-weight: 300;
}

.team-rate-right {
    text-align: right;
    min-width: 160px;
}

.team-rate-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--teal-700);
    font-family: var(--font-mono);
    line-height: 1;
}

.team-rate-unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-400);
}

.team-rate-label {
    font-size: .7rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-top: .2rem;
}

.team-rate-expand-icon {
    font-size: .7rem;
    color: var(--gray-400);
    margin-top: .3rem;
    transition: transform var(--duration) var(--ease);
}

/* Breakdown panel */
.team-rate-breakdown {
    padding: 1.25rem;
    border-top: 1.5px solid var(--gray-200);
    background: white;
}

.team-rate-breakdown-grid {
    max-width: 380px;
}

.trb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .3rem 0;
    font-size: .85rem;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-100);
}

.trb-subtotal {
    font-weight: 700;
    color: var(--navy);
    border-top: 1px solid var(--gray-200);
    margin-top: .25rem;
    padding-top: .4rem;
}

.trb-total {
    font-weight: 900;
    font-size: .95rem;
    color: var(--teal-700);
    border-top: 2px solid var(--teal-200);
    border-bottom: none;
    margin-top: .25rem;
    padding-top: .4rem;
}

/* Per-employee table */
.team-rate-emp-table {
    font-size: .8rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.trb-emp-header,
.trb-emp-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: .5rem;
    padding: .45rem .75rem;
}

.trb-emp-header {
    background: var(--gray-100);
    font-weight: 700;
    font-size: .72rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.trb-emp-row {
    border-top: 1px solid var(--gray-100);
    color: var(--gray-700);
}

.trb-emp-row:hover { background: var(--gray-50); }

@media (max-width: 768px) {
    .team-rate-header {
        grid-template-columns: 1fr;
        gap: .75rem;
    }
    .team-rate-right { text-align: left; }
    .trb-emp-header,
    .trb-emp-row { grid-template-columns: 2fr 1fr 1fr; }
    .trb-emp-header span:nth-child(4),
    .trb-emp-row span:nth-child(4) { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   HOURS OF WORK PREVIEW
═══════════════════════════════════════════════════════════ */

.hours-work-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 480px;
    margin-bottom: .75rem;
}

.hours-work-preview {
    margin-top: .75rem;
}

.how-calc {
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: .75rem 1rem;
    font-size: .82rem;
}

.how-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .3rem 0;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-100);
    gap: 1rem;
}

.how-row:last-child { border-bottom: none; }

.how-row-accent {
    color: var(--teal-700);
    font-weight: 600;
    background: var(--teal-50);
    margin: .25rem -.5rem -.25rem;
    padding: .4rem .5rem;
    border-radius: var(--radius-sm);
    border-bottom: none !important;
}

.how-row-neutral {
    color: var(--gray-400);
    font-style: italic;
    border-bottom: none !important;
}

.hours-work-presets {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════════
   ONBOARDING TOUR
═══════════════════════════════════════════════════════════ */

.tour-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 47, 0.55);
    z-index: 9000;
    animation: fadeIn .25s ease;
}

.tour-tooltip {
    position: fixed;
    z-index: 9100;
    width: 340px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,.25), 0 4px 16px rgba(0,0,0,.12);
    overflow: visible;
    animation: tourPop .2s cubic-bezier(.34,1.56,.64,1);
}

@keyframes tourPop {
    from { opacity:0; transform: scale(.92); }
    to   { opacity:1; transform: scale(1); }
}

.tour-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1rem .5rem;
    border-bottom: 1px solid var(--gray-100);
}

.tour-progress-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.tour-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gray-200);
    transition: all .2s ease;
}

.tour-dot.active {
    background: var(--teal);
    width: 20px;
    border-radius: 4px;
}

.tour-dot.done { background: var(--teal-200); }

.tour-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: .9rem;
    padding: .2rem .4rem;
    border-radius: var(--radius-sm);
    transition: all .15s ease;
}
.tour-close:hover { background: var(--gray-100); color: var(--gray-700); }

.tour-body {
    padding: 1rem 1.1rem .75rem;
}

.tour-step-label {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--teal-700);
    margin-bottom: .35rem;
}

.tour-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: .6rem;
    line-height: 1.3;
}

.tour-text {
    font-size: .84rem;
    color: var(--gray-600);
    line-height: 1.6;
    white-space: pre-line;
}

.tour-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem 1rem;
    border-top: 1px solid var(--gray-100);
}

.tour-btn-skip {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: .78rem;
    cursor: pointer;
    padding: .3rem .5rem;
    border-radius: var(--radius-sm);
    transition: color .15s ease;
}
.tour-btn-skip:hover { color: var(--gray-600); }

.tour-nav {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.tour-btn-back {
    background: var(--gray-100);
    border: none;
    color: var(--gray-600);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    padding: .45rem .9rem;
    border-radius: var(--radius-md);
    transition: all .15s ease;
}
.tour-btn-back:hover { background: var(--gray-200); }

.tour-btn-next {
    background: var(--teal);
    border: none;
    color: white;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    padding: .45rem 1.1rem;
    border-radius: var(--radius-md);
    transition: all .15s ease;
    box-shadow: 0 2px 8px rgba(0,150,136,.3);
}
.tour-btn-next:hover { background: var(--teal-700); transform: translateY(-1px); }

/* Arrow */
.tour-arrow {
    position: absolute;
    width: 0;
    height: 0;
}

.tour-arrow.arrow-top {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
    filter: drop-shadow(0 -2px 3px rgba(0,0,0,.08));
}

.tour-arrow.arrow-bottom {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.08));
}

.tour-arrow.arrow-left {
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid white;
    filter: drop-shadow(-2px 0 3px rgba(0,0,0,.08));
}

/* Highlighted element — lifts above backdrop */
.tour-highlight {
    position: relative;
    z-index: 9050 !important;
    box-shadow: 0 0 0 4px var(--teal), 0 0 0 8px rgba(0,150,136,.2) !important;
    border-radius: var(--radius-md);
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   PRODUCTIVITY EFFICIENCY
═══════════════════════════════════════════════════════════ */

.efficiency-presets {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    align-items: center;
}

.efficiency-impact {
    margin-top: .65rem;
    padding: .65rem .85rem;
    background: var(--gray-50);
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: .82rem;
}

.efficiency-impact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .2rem 0;
}

.team-rate-hours-sub {
    font-size: .65rem;
    color: var(--teal-700);
    font-weight: 600;
    margin-top: .15rem;
    font-family: var(--font-mono);
}

/* ═══════════════════════════════════════════════════════════
   TOP NAVIGATION (replaces sidebar)
═══════════════════════════════════════════════════════════ */

/* top nav padding applied at root level */
body { padding-top: 56px; }

.topnav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: var(--navy);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    gap: 0;
    z-index: 8000;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.topnav-brand {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-right: 2rem;
    flex-shrink: 0;
}

.topnav-logo {
    font-size: 1.1rem;
    font-weight: 900;
    color: white;
    letter-spacing: -.02em;
}

.topnav-subtitle {
    font-size: .72rem;
    color: rgba(255,255,255,.45);
    font-weight: 500;
}

.topnav-brand .logo-badge {
    font-size: .6rem;
    background: var(--teal);
    color: white;
    padding: .1rem .4rem;
    border-radius: 99px;
    font-weight: 700;
    margin-left: .25rem;
}

.topnav-nav {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex: 1;
}

.topnav-link {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: 0 1rem;
    height: 56px;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 600;
    transition: all .15s ease;
    white-space: nowrap;
    position: relative;
    border-bottom: 3px solid transparent;
}

.topnav-link:hover {
    color: white;
    background: rgba(255,255,255,.07);
}

.topnav-link.active {
    color: white;
    border-bottom-color: var(--teal);
    background: rgba(255,255,255,.05);
}

.topnav-right {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-left: auto;
}

.topnav-settings {
    background: rgba(255,255,255,.06);
    border-radius: 0;
}

/* Remove old sidebar styles' effect on layout */
.sidebar { display: none !important; }

.main-content {
    margin-left: 0 !important;
    width: 100%;
    box-sizing: border-box;
}

/* ═══════════════════════════════════════════════════════════
   SETTINGS SUB-NAV
═══════════════════════════════════════════════════════════ */

.settings-subnav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    flex-wrap: nowrap;
}

.settings-subnav-link {
    display: block;
    padding: .65rem 1rem;
    color: var(--gray-500);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -2px;
    transition: all .15s ease;
}

.settings-subnav-link:hover { color: var(--navy); }

.settings-subnav-link.active {
    color: var(--teal-700);
    border-bottom-color: var(--teal);
}

.settings-subpage { display: none; }
.settings-subpage.active { display: block; }

/* Page header without sidebar */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.page-breadcrumb {
    font-size: .72rem;
    color: var(--gray-400);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .2rem;
}

/* Pay type toggle */
.pay-type-toggle {
    display: flex;
    gap: 1.5rem;
}

.pay-type-option {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--gray-700);
}


/* ═══════════════════════════════════════════════════════════
   SCROLL FIX — overrides any legacy rules that block scroll
═══════════════════════════════════════════════════════════ */
html {
    height: auto !important;
    overflow-y: scroll !important;
}

body {
    height: auto !important;
    min-height: 100vh !important;
    overflow: visible !important;
    display: block !important;
    padding-top: 56px !important;
}

.main-content,
.content-area,
.page,
.page.active {
    overflow: visible !important;
    height: auto !important;
}
