:root {
    --bg: #f4f7fb;
    --bg-soft: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --text-soft: #334155;
    --muted: #64748b;
    --border: #e2e8f0;

    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-soft: #eff6ff;

    --green: #16a34a;
    --green-dark: #15803d;
    --green-soft: #dcfce7;

    --red: #dc2626;
    --red-dark: #b91c1c;
    --red-soft: #fee2e2;

    --amber: #f59e0b;
    --amber-soft: #fef3c7;

    --sidebar: #0b1220;
    --sidebar-soft: #111827;

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 26px;

    --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.06);
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 26px 70px rgba(15, 23, 42, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Inter", Arial, sans-serif;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 34%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    color: var(--text);
}

a {
    transition: 0.2s ease;
}

button {
    font-family: inherit;
}

::selection {
    background: #bfdbfe;
    color: #0f172a;
}

/* =========================
   APP LAYOUT
========================= */

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 278px;
    height: 100vh;
    padding: 22px 18px;
    overflow-y: auto;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.24), transparent 28%),
        linear-gradient(180deg, #0b1220 0%, #111827 48%, #020617 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 50;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 999px;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px 8px 22px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo,
.auth-logo,
.landing-logo {
    background: linear-gradient(135deg, #2563eb 0%, #22c55e 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.35);
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 16px;
}

.brand-box h2 {
    margin: 0;
    color: #ffffff;
    font-size: 21px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.brand-box p {
    margin: 5px 0 0;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
}

.sidebar-nav {
    padding-top: 8px;
}

.nav-section {
    margin: 20px 10px 8px;
    color: #64748b;
    text-transform: uppercase;
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.11em;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #cbd5e1;
    text-decoration: none;
    padding: 11px 12px;
    margin-bottom: 5px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 750;
    border: 1px solid transparent;
}

.sidebar a:hover {
    background: rgba(37, 99, 235, 0.16);
    color: #ffffff;
    border-color: rgba(147, 197, 253, 0.18);
    transform: translateX(3px);
}

.sidebar a.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.sidebar-footer {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.logout-btn {
    background: rgba(220, 38, 38, 0.14);
    color: #fecaca !important;
}

.logout-btn:hover {
    background: rgba(220, 38, 38, 0.24) !important;
}

.main {
    margin-left: 278px;
    width: calc(100% - 278px);
    padding: 26px;
}

.mobile-menu-btn,
.sidebar-overlay {
    display: none;
}

/* =========================
   TOPBAR / FLASH
========================= */

.topbar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-xl);
    padding: 22px 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.topbar h1 {
    margin: 0;
    font-size: 27px;
    letter-spacing: -0.045em;
}

.topbar p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    padding: 9px 14px;
    border-radius: 999px;
    background: var(--green-soft);
    color: #166534;
    font-weight: 900;
    font-size: 13px;
}

.flash-wrapper {
    margin-bottom: 18px;
    display: grid;
    gap: 10px;
}

.flash {
    background: #eff6ff;
    color: #1d4ed8;
    padding: 13px 15px;
    border-radius: 15px;
    border: 1px solid #bfdbfe;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
}

.flash.success {
    background: var(--green-soft);
    color: #166534;
    border-color: #86efac;
}

.flash.danger,
.flash.error {
    background: var(--red-soft);
    color: #991b1b;
    border-color: #fecaca;
}

.flash.warning {
    background: var(--amber-soft);
    color: #92400e;
    border-color: #fde68a;
}

/* =========================
   CARDS
========================= */

.card {
    background: rgba(255, 255, 255, 0.96);
    padding: 24px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(226, 232, 240, 0.96);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}

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

.card h1,
.card h2,
.card h3 {
    margin-top: 0;
}

.section-tag,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    background: var(--primary-soft);
    color: var(--primary);
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hint,
.small-muted {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

/* =========================
   FORMS
========================= */

input,
select,
textarea,
button {
    width: 100%;
    padding: 13px 14px;
    margin-bottom: 14px;
    border-radius: 14px;
    border: 1px solid #d0d7e2;
    font-family: inherit;
    font-size: 14px;
}

input,
select,
textarea {
    background: #ffffff;
    color: var(--text);
}

input:hover,
select:hover,
textarea:hover {
    border-color: #94a3b8;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

textarea {
    resize: vertical;
}

label,
.form-group label {
    display: block;
    margin-bottom: 9px;
    color: #334155;
    font-weight: 900;
}

button,
.primary-btn,
.run-btn,
.pricing-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    font-weight: 900;
    transition: 0.2s ease;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

button:hover,
.primary-btn:hover,
.run-btn:hover,
.pricing-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.25);
}

/* =========================
   BUTTONS / LINKS
========================= */

.primary-link,
.secondary-link,
.upgrade-link,
.export-btn,
.secondary-btn,
.danger-btn,
.small-btn,
.nav-login-btn,
.nav-register-btn,
.hero-primary-btn,
.hero-secondary-btn,
.landing-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 900;
    transition: 0.2s ease;
    border: 1px solid transparent;
}

.primary-link,
.upgrade-link,
.nav-register-btn,
.hero-primary-btn,
.landing-cta a {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 13px 17px;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.primary-link:hover,
.upgrade-link:hover,
.nav-register-btn:hover,
.hero-primary-btn:hover,
.landing-cta a:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.25);
}

.secondary-link,
.secondary-btn,
.hero-secondary-btn {
    background: #eef2f7;
    color: #334155;
    padding: 13px 17px;
    border-color: #dbe3ef;
}

.secondary-link:hover,
.secondary-btn:hover,
.hero-secondary-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.export-btn {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    color: white;
    padding: 12px 16px;
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(22, 163, 74, 0.22);
}

.danger-btn {
    background: linear-gradient(135deg, var(--red), var(--red-dark));
    color: white;
    padding: 12px 16px;
    margin-bottom: 0;
}

.danger-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(220, 38, 38, 0.22);
}

.small-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 11px;
}

.action-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

/* =========================
   DASHBOARD
========================= */

.dashboard-hero {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 22px;
    margin-bottom: 24px;
}

.dashboard-hero > div {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(226, 232, 240, 0.94);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.dashboard-hero > div:first-child,
.profile-card,
.upload-card,
.payroll-process-card,
.compliance-hero,
.fnf-hero-card,
.pricing-hero {
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 35%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.dashboard-hero h1 {
    margin: 15px 0 8px;
    font-size: 36px;
    letter-spacing: -0.055em;
}

.dashboard-hero p {
    color: var(--muted);
    margin: 0;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.plan-panel h3 {
    margin: 18px 0 8px;
    font-size: 28px;
    letter-spacing: -0.045em;
}

.smart-alerts {
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
}

.alert-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 15px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: white;
    box-shadow: var(--shadow-sm);
}

.alert-card h3 {
    margin: 0 0 4px;
    font-size: 16px;
}

.alert-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.alert-card a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 900;
}

.alert-card.warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.alert-card.info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.alert-card.danger {
    background: #fef2f2;
    border-color: #fecaca;
}

.alert-icon,
.stat-icon,
.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
}

.alert-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.stat-card {
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    transition: 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -32px;
    top: -32px;
    width: 105px;
    height: 105px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 50%;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    margin-bottom: 14px;
    font-size: 21px;
}

.stat-card h3,
.stats .card h3 {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card h2,
.stats .card h2 {
    margin: 0;
    font-size: 31px;
    color: var(--text);
    font-weight: 950;
    letter-spacing: -0.055em;
}

.stat-card h2.plan-text {
    font-size: 24px;
    white-space: nowrap;
}

.stat-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.dashboard-chart-card {
    margin-top: 24px;
}

.dashboard-chart-card canvas {
    margin-top: 12px;
}

.quick-actions {
    margin-top: 24px;
}

.quick-actions h2 {
    margin-bottom: 6px;
}

.quick-actions p {
    margin-top: 0;
    color: var(--muted);
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.quick-action-grid a {
    text-decoration: none;
    background: #f8fafc;
    color: #0f172a;
    padding: 15px;
    border-radius: 16px;
    border: 1px solid var(--border);
    font-weight: 900;
}

.quick-action-grid a:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: var(--primary);
    transform: translateY(-1px);
}

/* =========================
   TABLES
========================= */

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.table-header h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.table-header p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.table-count {
    background: var(--primary-soft);
    color: var(--primary);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 950;
    white-space: nowrap;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 860px;
}

th,
td {
    border-bottom: 1px solid var(--border);
    padding: 14px 15px;
    text-align: left;
    font-size: 14px;
    vertical-align: middle;
}

th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #334155;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 950;
}

td {
    color: #334155;
}

tbody tr {
    transition: 0.15s ease;
}

tbody tr:hover {
    background: #f8fbff;
}

.employee-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-circle {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #60a5fa);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    font-size: 16px;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.employee-cell span,
.table-sub {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
    margin-top: 3px;
}

.table-main {
    font-weight: 800;
    color: #111827;
}

.dept-badge {
    display: inline-flex;
    background: #f1f5f9;
    color: #334155;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 850;
}

.salary-box {
    font-weight: 950;
    color: var(--green);
    font-size: 15px;
}

/* =========================
   BADGES
========================= */

.badge,
.pro-badge,
.free-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-weight: 950;
    font-size: 12px;
    white-space: nowrap;
}

.badge.pro,
.pro-badge {
    background: var(--green-soft);
    color: #166534;
}

.badge.free,
.free-badge {
    background: var(--amber-soft);
    color: #92400e;
}

/* =========================
   FILTERS
========================= */

.filter-form,
.employee-filter-form,
.attendance-filter-form,
.payroll-filter-form {
    display: grid;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}

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

.employee-filter-form {
    grid-template-columns: 1fr 1.5fr auto auto;
}

.attendance-filter-form,
.payroll-filter-form {
    grid-template-columns: 1fr 1fr 1.5fr auto auto;
}

.filter-form input,
.filter-form select,
.filter-form button,
.filter-form a,
.employee-filter-form input,
.employee-filter-form select,
.employee-filter-form button,
.employee-filter-form a,
.attendance-filter-form input,
.attendance-filter-form select,
.attendance-filter-form button,
.attendance-filter-form a,
.payroll-filter-form input,
.payroll-filter-form select,
.payroll-filter-form button,
.payroll-filter-form a {
    margin-bottom: 0;
}

/* =========================
   PROFILE / LEAVE / COMPANY
========================= */

.profile-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.9fr;
    gap: 24px;
}

.profile-card h1 {
    margin: 16px 0 10px;
    font-size: 34px;
    letter-spacing: -0.055em;
}

.profile-text {
    color: var(--muted);
    margin-bottom: 24px;
    line-height: 1.7;
}

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

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

.profile-info-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 16px;
    font-size: 20px;
}

.feature-item b {
    display: block;
    margin-bottom: 6px;
}

.feature-item span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.leave-action-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.leave-action-row form {
    margin: 0;
}

.leave-approve-btn,
.leave-reject-btn {
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    margin: 0;
    border-radius: 11px;
    text-decoration: none;
    font-weight: 900;
    font-size: 13px;
    border: none;
    box-shadow: none;
}

.leave-approve-btn {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
}

.leave-reject-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.leave-approve-btn:hover,
.leave-reject-btn:hover {
    transform: translateY(-1px);
}

/* =========================
   UPLOAD / RUN PAYROLL / COMPLIANCE
========================= */

.upload-layout,
.run-payroll-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.upload-card h1,
.payroll-process-card h1,
.compliance-hero h1,
.fnf-hero-card h1,
.pricing-hero h1 {
    margin: 16px 0 10px;
    font-size: 36px;
    letter-spacing: -0.055em;
}

.upload-text,
.run-payroll-text,
.compliance-hero p,
.fnf-hero-text,
.pricing-hero p {
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.upload-form input[type="file"] {
    background: white;
    border: 2px dashed #cbd5e1;
    padding: 20px;
}

.error-box {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 18px;
}

.error-box b {
    display: block;
    margin-bottom: 4px;
}

.error-box span {
    font-size: 14px;
}

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

.column-grid span {
    background: #f8fafc;
    border: 1px solid var(--border);
    padding: 11px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 850;
    color: #334155;
}

.info-note {
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 14px;
    padding: 14px;
    font-size: 14px;
    font-weight: 850;
}

.run-payroll-form input,
.run-btn {
    max-width: 320px;
}

.run-btn {
    padding: 15px;
    font-size: 15px;
    border-radius: 15px;
}

.payroll-feature-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.compliance-form,
.compliance-premium-form {
    display: grid;
    gap: 20px;
}

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

.compliance-form h2,
.compliance-form button,
.compliance-form .full-row {
    grid-column: span 2;
}

.compliance-section {
    margin-bottom: 0;
}

.compliance-section-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 22px;
}

.compliance-section-header h2 {
    margin: 0 0 6px;
}

.compliance-section-header p {
    margin: 0;
    color: var(--muted);
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.compliance-save-bar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    position: sticky;
    bottom: 18px;
    z-index: 5;
    border: 1px solid #bfdbfe;
}

.compliance-save-bar h3 {
    margin: 0 0 6px;
}

.compliance-save-bar p {
    margin: 0;
    color: var(--muted);
}

.compliance-save-bar button {
    max-width: 260px;
    margin-bottom: 0;
}

/* =========================
   F&F
========================= */

.fnf-form {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.fnf-form textarea,
.fnf-form button,
.fnf-preview {
    grid-column: span 3;
}

.fnf-preview,
.premium-preview-card {
    background: linear-gradient(135deg, #f8fafc, #ffffff);
    border: 1px solid #dbeafe;
    border-radius: 24px;
    padding: 24px;
    margin-top: 20px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.preview-grid div {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
}

.preview-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.preview-grid b {
    font-size: 22px;
    color: #0f172a;
}

.final-preview {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    color: white;
}

.final-preview span,
.final-preview b {
    color: white !important;
}

/* =========================
   PRICING / PAYMENTS
========================= */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.pricing-card {
    position: relative;
    overflow: hidden;
}

.popular-plan {
    border: 2px solid #2563eb;
}

.popular-ribbon {
    position: absolute;
    top: 18px;
    right: -38px;
    background: #2563eb;
    color: white;
    padding: 8px 42px;
    transform: rotate(35deg);
    font-size: 12px;
    font-weight: 950;
}

.pricing-card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.pricing-card-header h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.pricing-card-header p,
.pricing-card li {
    color: var(--muted);
}

.price-box {
    margin: 24px 0;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 20px;
}

.price-box h1,
.pricing-card h1 {
    margin: 0;
    font-size: 44px;
    letter-spacing: -0.065em;
}

.price-box span {
    color: var(--muted);
    font-weight: 850;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.pricing-features li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 13px;
    color: #334155;
    font-weight: 750;
}

.pricing-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #16a34a;
    font-weight: 950;
}

.payment-summary-card {
    margin-bottom: 24px;
}

.payment-summary-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}

.payment-summary-top h1 {
    margin: 14px 0 8px;
    font-size: 34px;
    letter-spacing: -0.055em;
}

.payment-summary-top p {
    margin: 0;
    color: var(--muted);
}

.payment-count-box,
.employee-count-box {
    min-width: 220px;
    color: white;
    border-radius: 24px;
    padding: 22px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.payment-count-box {
    background: linear-gradient(135deg, #16a34a, #15803d);
}

.employee-count-box {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.payment-count-box span,
.employee-count-box span {
    font-size: 13px;
    opacity: 0.9;
}

.payment-count-box h1,
.employee-count-box h1 {
    margin: 10px 0 0;
    font-size: 42px;
}

.payment-id {
    font-family: monospace;
    font-size: 13px;
    background: #f8fafc;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    display: inline-block;
}

/* =========================
   EMPLOYEE PAGES
========================= */

.employee-header-grid {
    margin-bottom: 24px;
}

.employee-summary-card {
    overflow: hidden;
}

.employee-summary-top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
}

.employee-summary-top h2 {
    margin: 12px 0 8px;
    font-size: 30px;
    letter-spacing: -0.05em;
}

.employee-summary-top p {
    margin: 0;
    color: var(--muted);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 54px;
    margin-bottom: 12px;
}

.empty-state h2 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--muted);
    margin-bottom: 24px;
}

/* =========================
   AUTH
========================= */

.auth-main,
.main.full {
    margin-left: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
        radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.12), transparent 30%),
        #f8fafc;
}

.auth-content {
    width: 100%;
}

.auth-card {
    width: 430px;
}

.auth-layout {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    margin: 0 auto;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.auth-logo {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    font-size: 20px;
}

.auth-brand h2 {
    margin: 0;
}

.auth-brand p {
    margin: 4px 0 0;
    color: var(--muted);
}

.auth-left h1 {
    font-size: 54px;
    line-height: 1.05;
    letter-spacing: -0.065em;
    margin: 28px 0 18px;
}

.auth-description {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
    max-width: 620px;
}

.auth-feature-list {
    margin-top: 34px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    padding: 16px;
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.auth-feature span {
    font-size: 22px;
}

.auth-feature p {
    margin: 0;
    font-weight: 750;
    color: #334155;
}

.premium-auth-card {
    padding: 34px;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
}

.premium-auth-card h1 {
    margin: 16px 0 10px;
    font-size: 38px;
    letter-spacing: -0.055em;
}

.auth-subtext {
    color: var(--muted);
    margin-bottom: 26px;
}

.auth-footer-link {
    margin-top: 22px;
    text-align: center;
}

.auth-footer-link p {
    color: var(--muted);
}

.auth-footer-link a {
    color: var(--primary);
    font-weight: 900;
    text-decoration: none;
}

.auth-footer-link a:hover {
    text-decoration: underline;
}

/* =========================
   LANDING / FAQ
========================= */

.landing-body {
    background: #f8fafc;
}

.landing-hero {
    padding: 40px 8%;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 35%),
        linear-gradient(135deg, #ffffff, #f8fafc);
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.landing-logo {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 20px;
}

.landing-brand h2 {
    margin: 0;
}

.landing-brand p {
    margin: 4px 0 0;
    color: #64748b;
}

.landing-nav-actions {
    display: flex;
    gap: 14px;
}

.nav-login-btn {
    color: #0f172a;
    padding: 12px 18px;
}

.landing-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
    margin-top: 90px;
}

.hero-content {
    max-width: 760px;
}

.hero-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 850;
}

.hero-content h1 {
    font-size: 68px;
    line-height: 1.05;
    letter-spacing: -0.065em;
    margin: 28px 0 24px;
    color: #0f172a;
}

.hero-content p {
    font-size: 20px;
    line-height: 1.8;
    color: #64748b;
    max-width: 680px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-top: 34px;
}

.hero-preview-card {
    background: white;
    border: 1px solid #dbeafe;
    border-radius: 32px;
    padding: 28px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.hero-preview-card::before {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -60px;
    top: -60px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 50%;
}

.preview-topbar {
    display: flex;
    gap: 8px;
    margin-bottom: 26px;
}

.preview-topbar span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.preview-stats div,
.preview-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
}

.preview-stats span,
.preview-row span {
    display: block;
    color: #64748b;
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 750;
}

.preview-stats b {
    font-size: 28px;
    color: #0f172a;
}

.preview-chart {
    height: 170px;
    background: #eff6ff;
    border-radius: 22px;
    padding: 18px;
    display: flex;
    align-items: end;
    gap: 14px;
    margin-bottom: 22px;
}

.preview-chart div {
    flex: 1;
    background: linear-gradient(180deg, #2563eb, #22c55e);
    border-radius: 999px 999px 6px 6px;
}

.preview-row {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.preview-row b {
    color: #16a34a;
}

.feature-section {
    padding: 80px 8%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: white;
    border-radius: 26px;
    padding: 28px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.feature-card p {
    color: #64748b;
    line-height: 1.7;
}

.landing-cta {
    padding: 90px 8%;
    text-align: center;
}

.landing-cta h2 {
    font-size: 48px;
    margin-bottom: 18px;
    letter-spacing: -0.045em;
}

.landing-cta p {
    color: #64748b;
    margin-bottom: 30px;
}

.lp-faq-section,
.faq-section {
    padding: 90px 8%;
    background: #f8fafc;
}

.lp-faq-header,
.faq-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 40px;
}

.lp-faq-header h2,
.faq-header h2 {
    font-size: 46px;
    margin: 20px 0 12px;
    color: #0f172a;
    letter-spacing: -0.055em;
}

.lp-faq-header p,
.faq-header p {
    color: #64748b;
    line-height: 1.7;
}

.lp-faq-list,
.faq-list {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.lp-faq-item,
.faq-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-item summary,
.lp-faq-question {
    cursor: pointer;
    font-weight: 950;
    color: #0f172a;
    list-style: none;
    padding: 20px 24px;
    position: relative;
    background: white !important;
    border: none !important;
    width: 100%;
    margin: 0 !important;
    text-align: left;
    box-shadow: none !important;
}

.lp-faq-question {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 24px;
    top: 16px;
    font-size: 26px;
    color: #2563eb;
}

.faq-item[open] summary::after {
    content: "-";
}

.faq-item p,
.lp-faq-answer {
    margin: 0;
    padding: 0 24px 22px;
    color: #64748b;
    line-height: 1.7;
}

.lp-faq-answer {
    display: none;
    font-size: 16px;
}

.lp-faq-item.active .lp-faq-answer {
    display: block;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {
    .dashboard-hero,
    .profile-layout,
    .upload-layout,
    .run-payroll-layout,
    .landing-hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-preview-card {
        display: none;
    }
}

@media (max-width: 900px) {
    .mobile-menu-btn {
        display: flex;
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 1001;
        width: 44px;
        height: 44px;
        border-radius: 14px;
        align-items: center;
        justify-content: center;
        background: #2563eb;
        color: white;
        border: none;
        font-size: 22px;
        box-shadow: 0 10px 24px rgba(37, 99, 235, 0.3);
        cursor: pointer;
        padding: 0;
        margin: 0;
    }

    .sidebar {
        left: -290px;
        width: 280px;
        transition: 0.25s ease;
    }

    body.sidebar-open .sidebar {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.55);
        z-index: 49;
    }

    body.sidebar-open .sidebar-overlay {
        display: block;
    }

    .main {
        margin-left: 0;
        width: 100%;
        padding: 76px 18px 18px;
    }

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

    .filter-form,
    .employee-filter-form,
    .attendance-filter-form,
    .payroll-filter-form,
    .fnf-form,
    .compliance-form,
    .settings-grid,
    .pricing-grid,
    .profile-form {
        grid-template-columns: 1fr;
    }

    .fnf-form textarea,
    .fnf-form button,
    .fnf-preview,
    .compliance-form h2,
    .compliance-form button,
    .compliance-form .full-row,
    .full-row {
        grid-column: span 1;
    }

    .compliance-save-bar {
        display: block;
    }

    .compliance-save-bar button {
        max-width: 100%;
        margin-top: 16px;
    }

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-left {
        display: none;
    }

    .premium-auth-card,
    .auth-card {
        width: 100%;
    }

    .payment-summary-top,
    .employee-summary-top,
    .table-header,
    .landing-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .payment-count-box,
    .employee-count-box {
        width: 100%;
    }

    .action-row,
    .hero-buttons,
    .landing-nav-actions {
        flex-direction: column;
        width: 100%;
    }

    .action-row a,
    .action-row form,
    .action-row button,
    .hero-buttons a,
    .landing-nav-actions a {
        width: 100%;
    }

    .dashboard-hero h1,
    .upload-card h1,
    .payroll-process-card h1,
    .profile-card h1,
    .compliance-hero h1,
    .fnf-hero-card h1,
    .pricing-hero h1 {
        font-size: 29px;
    }

    .hero-content h1 {
        font-size: 44px;
    }

    .hero-content p {
        font-size: 17px;
    }

    .lp-faq-header h2,
    .faq-header h2,
    .landing-cta h2 {
        font-size: 34px;
    }
}

@media (max-width: 520px) {
    .card,
    .dashboard-hero > div {
        padding: 20px;
        border-radius: 22px;
    }

    .topbar h1 {
        font-size: 23px;
    }

    .stat-card h2,
    .stats .card h2 {
        font-size: 27px;
    }

    .preview-grid,
    .preview-stats,
    .column-grid {
        grid-template-columns: 1fr;
    }

    table {
        min-width: 980px;
    }
}

.table-scroll-hint {
    display: none;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    margin: -6px 0 10px;
}

@media (max-width: 768px) {
    .table-scroll-hint {
        display: block;
    }

    .dashboard-chart-card canvas {
        min-height: 260px;
    }
}

.payroll-employee-cell {
    min-width: 210px;
    align-items: center;
}

.employee-meta b {
    display: block;
    font-size: 14px;
    line-height: 1.25;
    color: #0f172a;
    white-space: normal;
}

.employee-code {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 800;
    color: #2563eb;
}

.employee-role {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
    white-space: normal;
    line-height: 1.35;
}

.table-wrapper td,
.table-wrapper th {
    white-space: nowrap;
}

.employee-cell,
.employee-meta,
.employee-meta b,
.employee-role {
    white-space: normal;
}

.upload-rule-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.upload-rule-card b {
    display: block;
    color: #0f172a;
    margin-bottom: 7px;
    font-size: 14px;
}

.upload-rule-card span {
    display: block;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.upload-rule-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
}

.upload-rule-card b {
    display: block;
    color: #0f172a;
    margin-bottom: 7px;
    font-size: 14px;
}

.upload-rule-card span {
    display: block;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.payroll-employee-cell {
    min-width: 220px;
    align-items: center;
}

.employee-meta b {
    display: block;
    font-size: 14px;
    line-height: 1.25;
    color: #0f172a;
    white-space: normal;
}

.employee-code {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 900;
    color: #2563eb;
}

.employee-role {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
    white-space: normal;
    line-height: 1.35;
}

.table-wrapper td,
.table-wrapper th {
    white-space: nowrap;
}

.employee-cell,
.employee-meta,
.employee-meta b,
.employee-role {
    white-space: normal;
}

.payroll-note-box {
    margin-top: 20px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
    border-radius: 16px;
    padding: 14px 16px;
    line-height: 1.6;
}

.payroll-note-box b {
    display: block;
    margin-bottom: 4px;
}

.payroll-note-box span {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.pricing-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.pricing-trust-row span {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.pricing-info-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.pricing-info-banner h2 {
    margin: 0 0 6px;
}

.pricing-info-banner p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

.pricing-info-banner .secondary-btn {
    white-space: nowrap;
}

.pricing-note {
    margin: 14px 0 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 768px) {
    .pricing-info-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .pricing-info-banner .secondary-btn {
        width: 100%;
    }
}

.popular-ribbon {
    top: 22px;
    right: -42px;
    padding: 8px 46px;
    font-size: 11px;
    letter-spacing: 0.03em;
}

.pricing-features li {
    line-height: 1.35;
}

.pricing-card {
    padding-top: 28px;
}

.pricing-btn {
    margin-top: 8px;
}

.disabled-pricing-btn {
    background: #94a3b8 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.disabled-pricing-btn:hover {
    transform: none !important;
    box-shadow: none !important;
}

.pricing-disabled-notice {
    background: #fffbeb;
    border-color: #fde68a;
}

.pricing-disabled-notice h2 {
    margin: 12px 0 8px;
}

.pricing-disabled-notice p {
    margin: 0;
    color: #92400e;
    line-height: 1.6;
    font-weight: 700;
}

.pricing-card {
    position: relative;
    overflow: hidden;
}

.popular-plan {
    padding-top: 42px;
}

.pricing-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.pricing-card-header .badge {
    flex-shrink: 0;
    font-size: 11px;
    padding: 8px 12px;
    border-radius: 999px;
    margin-top: 4px;
}

.popular-ribbon {
    position: absolute;
    top: 14px;
    right: -42px;
    transform: rotate(38deg);
    background: #2563eb;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 8px 44px;
    z-index: 2;
    line-height: 1.1;
    text-align: center;
}

@media (max-width: 768px) {
    .popular-plan {
        padding-top: 52px;
    }

    .popular-ribbon {
        top: 12px;
        right: -48px;
        font-size: 10px;
        padding: 7px 42px;
    }

    .pricing-card-header .badge {
        font-size: 10px;
        padding: 7px 10px;
    }
}

.auth-demo-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 28px;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
}

.login-demo-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    padding: 14px 15px;
    border-radius: 16px;
    margin-bottom: 22px;
    line-height: 1.6;
}

.login-demo-note b {
    display: block;
    margin-bottom: 4px;
    color: #78350f;
}

.login-demo-note span {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.chart-empty-state {
    text-align: center;
    padding: 42px 20px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
}

.chart-empty-state .empty-icon {
    font-size: 42px;
    margin-bottom: 10px;
}

.chart-empty-state h2 {
    margin: 0 0 8px;
}

.chart-empty-state p {
    margin: 0 0 20px;
    color: #64748b;
}

/* =========================
   ENTERPRISE HRMS OVERRIDE
   SmartHire Payroll
========================= */

:root {
    --bg: #f6f8fb;
    --card: #ffffff;
    --text: #101828;
    --text-soft: #344054;
    --muted: #667085;
    --border: #e4e7ec;

    --primary: #155eef;
    --primary-dark: #004eeb;
    --primary-soft: #eef4ff;

    --green: #12b76a;
    --green-dark: #039855;
    --green-soft: #ecfdf3;

    --red: #f04438;
    --red-dark: #d92d20;
    --red-soft: #fef3f2;

    --amber: #f79009;
    --amber-soft: #fffaeb;

    --sidebar: #ffffff;
    --sidebar-soft: #f9fafb;

    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
    --shadow-lg: 0 12px 28px rgba(16, 24, 40, 0.12);
}

body {
    background: #f6f8fb !important;
    color: var(--text);
}

/* Layout */
.sidebar {
    width: 310px;
    background: #ffffff !important;
    border-right: 1px solid #e4e7ec !important;
    box-shadow: none !important;
    padding: 18px 14px;
}

.main {
    margin-left: 310px;
    width: calc(100% - 310px);
    padding: 22px 26px;
}

/* Brand */
.brand-box {
    border-bottom: 1px solid #e4e7ec;
    padding: 8px 8px 18px;
}

.brand-logo {
    background: #155eef !important;
    box-shadow: none !important;
    border-radius: 10px;
    width: 42px;
    height: 42px;
}

.brand-box h2 {
    color: #101828 !important;
    font-size: 18px;
    letter-spacing: -0.02em;
}

.brand-box p {
    color: #667085 !important;
    font-size: 12px;
    font-weight: 600;
}

/* Sidebar nav */
.nav-section {
    color: #98a2b3 !important;
    font-size: 10px;
    margin: 18px 10px 8px;
}

.sidebar a {
    color: #344054 !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13.5px;
    font-weight: 650;
    margin-bottom: 3px;
    box-shadow: none !important;
}

.sidebar a:hover {
    background: #f2f4f7 !important;
    color: #101828 !important;
    transform: none !important;
}

.sidebar a.active {
    background: #eef4ff !important;
    color: #155eef !important;
    border-color: #d1e0ff !important;
    box-shadow: none !important;
}

.logout-btn {
    background: #fef3f2 !important;
    color: #b42318 !important;
}

/* Topbar */
.topbar {
    background: #ffffff !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 18px 22px;
}

.topbar h1 {
    font-size: 24px;
    color: #101828;
}

.topbar p {
    color: #667085;
    font-size: 13.5px;
}

.status-pill {
    background: #eef4ff !important;
    color: #155eef !important;
    border: 1px solid #d1e0ff;
    font-weight: 700;
}

/* Cards */
.card,
.dashboard-hero > div {
    background: #ffffff !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

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

.dashboard-hero > div:first-child,
.profile-card,
.upload-card,
.payroll-process-card,
.compliance-hero,
.fnf-hero-card,
.pricing-hero {
    background: #ffffff !important;
}

/* Tags */
.section-tag,
.eyebrow {
    background: #eef4ff !important;
    color: #155eef !important;
    border: 1px solid #d1e0ff;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
}

/* Buttons */
button,
.primary-btn,
.run-btn,
.pricing-btn,
.primary-link,
.upgrade-link,
.nav-register-btn,
.hero-primary-btn,
.landing-cta a,
.small-btn {
    background: #155eef !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font-weight: 700;
}

button:hover,
.primary-btn:hover,
.run-btn:hover,
.pricing-btn:hover,
.primary-link:hover,
.small-btn:hover {
    background: #004eeb !important;
    transform: none !important;
    box-shadow: none !important;
}

.secondary-btn,
.secondary-link,
.hero-secondary-btn {
    background: #ffffff !important;
    color: #344054 !important;
    border: 1px solid #d0d5dd !important;
    box-shadow: none !important;
}

.secondary-btn:hover,
.secondary-link:hover {
    background: #f9fafb !important;
}

.export-btn {
    background: #039855 !important;
    color: #ffffff !important;
    border-radius: 10px;
    box-shadow: none !important;
}

.danger-btn {
    background: #d92d20 !important;
    border-radius: 10px;
    box-shadow: none !important;
}

/* Forms */
input,
select,
textarea {
    border-radius: 10px;
    border: 1px solid #d0d5dd;
    background: #ffffff;
    color: #101828;
    box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #155eef;
    box-shadow: 0 0 0 3px rgba(21, 94, 239, 0.12);
}

label,
.form-group label {
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

/* Tables */
.table-wrapper {
    border-radius: 12px;
    border: 1px solid #e4e7ec;
}

table {
    background: #ffffff;
}

th {
    background: #f9fafb !important;
    color: #475467;
    font-size: 11px;
    font-weight: 800;
    border-bottom: 1px solid #e4e7ec;
}

td {
    color: #344054;
    border-bottom: 1px solid #eaecf0;
    font-size: 13.5px;
}

tbody tr:hover {
    background: #f9fafb !important;
}

.table-count {
    background: #f2f4f7 !important;
    color: #344054 !important;
    border: 1px solid #e4e7ec;
}

/* Employee cell */
.avatar-circle {
    background: #eef4ff !important;
    color: #155eef !important;
    box-shadow: none !important;
    border: 1px solid #d1e0ff;
}

.employee-code {
    color: #155eef;
}

.dept-badge {
    background: #f2f4f7;
    color: #344054;
    border: 1px solid #e4e7ec;
}

/* Stats */
.stats {
    gap: 14px;
}

.stat-card {
    border-radius: 14px;
}

.stat-card::after {
    display: none;
}

.stat-icon,
.alert-icon,
.feature-icon {
    background: #eef4ff !important;
    color: #155eef;
    border: 1px solid #d1e0ff;
}

.stat-card h3 {
    color: #667085;
    font-size: 12px;
    letter-spacing: 0.03em;
}

.stat-card h2 {
    color: #101828;
    font-size: 28px;
}

/* Badges */
.badge.pro,
.pro-badge {
    background: #ecfdf3 !important;
    color: #027a48 !important;
    border: 1px solid #abefc6;
}

.badge.free,
.free-badge {
    background: #fffaeb !important;
    color: #b54708 !important;
    border: 1px solid #fedf89;
}

/* Flash */
.flash {
    box-shadow: none !important;
    border-radius: 12px;
}

/* Upload cards */
.upload-rule-card,
.feature-item,
.column-grid span {
    background: #f9fafb !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 12px;
}

.info-note,
.payroll-note-box {
    background: #eef4ff !important;
    color: #155eef !important;
    border: 1px solid #d1e0ff !important;
}

/* Dashboard hero */
.dashboard-hero h1,
.upload-card h1,
.payroll-process-card h1,
.profile-card h1,
.compliance-hero h1,
.fnf-hero-card h1,
.pricing-hero h1 {
    font-size: 30px;
    color: #101828;
}

/* Pricing */
.price-box {
    background: #f9fafb !important;
    border: 1px solid #e4e7ec !important;
}

.popular-plan {
    border: 1px solid #155eef !important;
}

.popular-ribbon {
    background: #155eef !important;
}

/* Mobile */
@media (max-width: 900px) {
    .main {
        margin-left: 0;
        width: 100%;
        padding: 76px 18px 18px;
    }

    .mobile-menu-btn {
        background: #155eef !important;
        box-shadow: none !important;
    }

    .sidebar {
        left: -290px;
    }
}

/* Dashboard enterprise compact layout */
.payroll-command-center {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 22px 26px;
}

.payroll-command-center h1 {
    margin: 12px 0 8px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.payroll-command-center p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

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

.command-actions a {
    white-space: nowrap;
}

.executive-kpis {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.payroll-money-grid {
    grid-template-columns: repeat(4, minmax(200px, 1fr));
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 1.8fr 0.8fr;
    gap: 18px;
    margin-top: 24px;
}

.dashboard-chart-card,
.dashboard-process-card {
    margin-bottom: 0;
}

.dashboard-process-card h2 {
    margin: 12px 0 18px;
}

.process-list {
    display: grid;
    gap: 12px;
}

.process-list a {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #f9fafb;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    padding: 14px;
}

.process-list a:hover {
    background: #eef4ff;
    border-color: #d1e0ff;
}

.process-list b {
    display: block;
    color: #101828;
    font-size: 14px;
    margin-bottom: 5px;
}

.process-list span {
    display: block;
    color: #667085;
    font-size: 12.5px;
    line-height: 1.45;
}

.compact-alerts {
    margin-top: 18px;
}

.compact-alerts .alert-card {
    padding: 13px 16px;
}

.compact-action-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.compact-action-grid a {
    min-height: 54px;
    display: flex;
    align-items: center;
}

@media (max-width: 1200px) {
    .executive-kpis,
    .payroll-money-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .payroll-command-center {
        display: block;
    }

    .command-actions {
        justify-content: flex-start;
        margin-top: 18px;
    }

    .command-actions a {
        width: 100%;
    }

    .executive-kpis,
    .payroll-money-grid {
        grid-template-columns: 1fr;
    }
}

.command-actions {
    min-width: 520px;
}

.command-actions a {
    min-width: 160px;
}

.stat-card {
    min-height: 210px;
}

.salary-highlight h2 {
    font-size: 34px;
    line-height: 1.15;
}

.enterprise-run-form {
    display: grid;
    grid-template-columns: 220px 160px;
    gap: 12px;
    align-items: end;
    min-width: 400px;
}

.enterprise-run-form input,
.enterprise-run-form button {
    margin-bottom: 0;
}

.enterprise-run-form .run-btn {
    max-width: 160px;
    height: 46px;
}

.compact-feature-list .feature-item {
    padding: 13px;
    margin-bottom: 10px;
}

.compact-feature-list .feature-icon {
    font-size: 13px;
    font-weight: 800;
}

.enterprise-note-box {
    margin-top: 24px;
    margin-bottom: 24px;
}

.enterprise-note-box b {
    color: #101828;
}

.enterprise-note-box span {
    color: #475467;
}

@media (max-width: 900px) {
    .enterprise-run-form {
        grid-template-columns: 1fr;
        min-width: 100%;
        margin-top: 18px;
    }

    .enterprise-run-form .run-btn {
        max-width: 100%;
        width: 100%;
    }
}

.sidebar {
    background: #ffffff;
    border-right: 1px solid #eaecf0;
    box-shadow: 0 0 20px rgba(0,0,0,0.03);
}

.stat-card {
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

/* Payroll History Summary Strip */

.payroll-summary-strip {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin: 20px 0;
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    border: 1px solid #e5e7eb;
}

.payroll-summary-strip h2 {
    margin: 6px 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.payroll-summary-strip p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.summary-mini-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 760px;
}

.summary-mini-grid div {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.summary-mini-grid small {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.summary-mini-grid b {
    display: block;
    font-size: 18px;
    color: #111827;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .payroll-summary-strip {
        flex-direction: column;
    }

    .summary-mini-grid {
        max-width: 100%;
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

@media (max-width: 600px) {
    .summary-mini-grid {
        grid-template-columns: 1fr;
    }
}

.pro-plan-pill {
    background: #ecfdf3;
    color: #027a48;
    border: 1px solid #abefc6;
}

.free-plan-pill {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.pricing-current-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    padding: 22px;
}

.pricing-current-plan h2 {
    margin: 6px 0;
    font-size: 24px;
    font-weight: 800;
    color: #111827;
}

.pricing-current-plan p {
    margin: 0;
    color: #667085;
    line-height: 1.6;
}

.active-pricing-card {
    border: 2px solid #22c55e;
    box-shadow: 0 14px 32px rgba(34, 197, 94, 0.12);
}

.current-plan-ribbon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #027a48;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 12px;
    border: 1px solid #abefc6;
}

.active-plan-btn {
    background: #027a48;
}

@media (max-width: 768px) {
    .pricing-current-plan {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================
   MODERN LOGIN PAGE OVERRIDE
   SmartHire Payroll Launch
========================= */

.auth-main,
.main.full {
    margin-left: 0 !important;
    width: 100% !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 28px !important;
    background:
        radial-gradient(circle at top left, rgba(21, 94, 239, 0.14), transparent 34%),
        radial-gradient(circle at bottom right, rgba(249, 115, 22, 0.12), transparent 32%),
        linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%) !important;
}

.auth-content {
    width: 100% !important;
}

.auth-layout {
    width: 100%;
    max-width: 1280px;
    min-height: calc(100vh - 56px);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 46px;
    align-items: center;
    margin: 0 auto;
}

.auth-left {
    display: block;
    padding: 10px 0;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 32px;
}

.auth-logo {
    width: 62px !important;
    height: 62px !important;
    border-radius: 20px !important;
    background: linear-gradient(135deg, #155eef, #12b76a) !important;
    color: #ffffff !important;
    font-size: 23px !important;
    font-weight: 950 !important;
    box-shadow: 0 18px 38px rgba(21, 94, 239, 0.26) !important;
}

.auth-brand h2 {
    margin: 0;
    color: #101828;
    font-size: 30px;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.auth-brand p {
    margin: 6px 0 0;
    color: #667085;
    font-size: 14px;
    font-weight: 700;
}

.auth-demo-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0 0 28px !important;
    background: #ecfdf3 !important;
    color: #027a48 !important;
    border: 1px solid #abefc6 !important;
    padding: 11px 17px !important;
    border-radius: 999px !important;
    font-size: 14px !important;
    font-weight: 950 !important;
    box-shadow: 0 12px 28px rgba(18, 183, 106, 0.12);
}

.auth-left h1 {
    max-width: 780px;
    margin: 0 0 24px !important;
    color: #101828;
    font-size: clamp(42px, 5vw, 72px) !important;
    line-height: 1.04 !important;
    letter-spacing: -0.075em !important;
    font-weight: 950;
}

.auth-left h1 span {
    color: #f97316;
}

.auth-description {
    max-width: 760px;
    color: #475467 !important;
    font-size: 19px !important;
    line-height: 1.75 !important;
    margin: 0 0 26px !important;
}

.auth-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(130px, 1fr));
    gap: 14px;
    max-width: 760px;
    margin: 0 0 26px;
}

.auth-metric {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #e4e7ec;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06);
}

.auth-metric b {
    display: block;
    color: #101828;
    font-size: 21px;
    margin-bottom: 5px;
}

.auth-metric span {
    display: block;
    color: #667085;
    font-size: 12.5px;
    font-weight: 800;
}

.auth-feature-list {
    max-width: 760px;
    margin-top: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 14px !important;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 13px;
    background: rgba(255, 255, 255, 0.86) !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 18px !important;
    padding: 15px 16px !important;
    box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06) !important;
    backdrop-filter: blur(10px);
}

.auth-feature span {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 12px;
    background: #eef4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px !important;
}

.auth-feature p {
    margin: 0;
    color: #344054;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.35;
}

.auth-bottom-note {
    max-width: 760px;
    margin-top: 22px;
    color: #667085;
    font-size: 14px;
    font-weight: 700;
}

.premium-auth-card {
    width: 100%;
    max-width: 500px;
    justify-self: end;
    padding: 36px !important;
    border-radius: 28px !important;
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(228, 231, 236, 0.95) !important;
    box-shadow: 0 28px 70px rgba(16, 24, 40, 0.14) !important;
    backdrop-filter: blur(16px);
}

.premium-auth-card .section-tag {
    margin-bottom: 18px;
}

.premium-auth-card h1 {
    margin: 0 0 10px !important;
    color: #101828;
    font-size: 44px !important;
    letter-spacing: -0.06em !important;
    font-weight: 950;
}

.auth-subtext {
    color: #667085 !important;
    font-size: 16px;
    line-height: 1.65;
    margin: 0 0 20px !important;
}

.login-demo-note {
    background: #fffaeb !important;
    border: 1px solid #fedf89 !important;
    color: #93370d !important;
    padding: 16px 17px !important;
    border-radius: 18px !important;
    margin-bottom: 24px !important;
    line-height: 1.6;
}

.login-demo-note b {
    display: block;
    color: #7a2e0e !important;
    margin-bottom: 5px;
    font-size: 16px;
    font-weight: 950;
}

.login-demo-note span {
    display: block;
    font-size: 13.5px !important;
    font-weight: 750 !important;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form label {
    color: #344054 !important;
    font-size: 13px;
    font-weight: 850;
    margin-bottom: 0;
}

.auth-form input {
    min-height: 52px;
    border-radius: 14px !important;
    border: 1px solid #d0d5dd !important;
    background: #f9fafb !important;
    padding: 13px 14px !important;
    font-size: 15px;
    margin-bottom: 6px !important;
}

.auth-form input:focus {
    border-color: #155eef !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.12) !important;
}

.auth-form button {
    min-height: 54px;
    margin-top: 8px;
    margin-bottom: 0;
    border-radius: 14px !important;
    background: linear-gradient(135deg, #155eef, #004eeb) !important;
    color: #ffffff !important;
    font-size: 16px;
    font-weight: 950;
    box-shadow: 0 18px 36px rgba(21, 94, 239, 0.24) !important;
}

.auth-form button:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 22px 44px rgba(21, 94, 239, 0.30) !important;
}

.auth-footer-link {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #e4e7ec;
    text-align: center;
}

.auth-footer-link p {
    margin: 0;
    color: #667085;
    font-weight: 700;
}

.auth-footer-link a {
    color: #155eef !important;
    font-weight: 950;
    text-decoration: none;
}

.auth-footer-link a:hover {
    text-decoration: underline;
}

.auth-contact-strip {
    margin-top: 18px;
    display: grid;
    gap: 8px;
    text-align: center;
    color: #667085;
    font-size: 13px;
}

.auth-contact-strip a {
    color: #101828;
    font-weight: 850;
    text-decoration: none;
}

@media (max-width: 980px) {
    .auth-main,
    .main.full {
        padding: 22px !important;
    }

    .auth-layout {
        grid-template-columns: 1fr;
        gap: 28px;
        min-height: auto;
    }

    .auth-left {
        display: block !important;
    }

    .auth-left h1 {
        font-size: 44px !important;
        letter-spacing: -0.055em !important;
    }

    .premium-auth-card {
        justify-self: stretch;
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .auth-main,
    .main.full {
        padding: 16px !important;
    }

    .auth-left h1 {
        font-size: 36px !important;
    }

    .auth-description {
        font-size: 15.5px !important;
    }

    .auth-metrics,
    .auth-feature-list {
        grid-template-columns: 1fr;
    }

    .premium-auth-card {
        padding: 24px !important;
        border-radius: 22px !important;
    }

    .premium-auth-card h1 {
        font-size: 34px !important;
    }

    .auth-brand h2 {
        font-size: 23px;
    }

    .auth-logo {
        width: 52px !important;
        height: 52px !important;
    }
}

/* =========================
   LOGIN MOBILE FIX
   Clean mobile auth experience
========================= */

@media (max-width: 900px) {
    .auth-main,
    .main.full {
        min-height: 100vh !important;
        padding: 18px !important;
        align-items: flex-start !important;
    }

    .auth-layout {
        display: flex !important;
        flex-direction: column !important;
        max-width: 460px !important;
        width: 100% !important;
        min-height: auto !important;
        gap: 18px !important;
        margin: 0 auto !important;
    }

    /* Mobile par long marketing section hide */
    .auth-left {
        display: none !important;
    }

    .premium-auth-card,
    .auth-card {
        width: 100% !important;
        max-width: 460px !important;
        margin: 0 auto !important;
        padding: 24px !important;
        border-radius: 24px !important;
    }

    .premium-auth-card h1 {
        font-size: 34px !important;
        line-height: 1.1 !important;
        margin-bottom: 8px !important;
    }

    .auth-subtext {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin-bottom: 16px !important;
    }

    .login-demo-note {
        padding: 13px 14px !important;
        border-radius: 15px !important;
        margin-bottom: 18px !important;
    }

    .login-demo-note b {
        font-size: 15px !important;
    }

    .login-demo-note span {
        font-size: 12.5px !important;
        line-height: 1.5 !important;
    }

    .auth-form input {
        min-height: 48px !important;
        font-size: 14px !important;
    }

    .auth-form button {
        min-height: 50px !important;
        font-size: 14px !important;
        line-height: 1.2 !important;
    }

    .auth-footer-link {
        margin-top: 18px !important;
        padding-top: 16px !important;
    }

    .auth-contact-strip {
        font-size: 12px !important;
        gap: 6px !important;
    }

    .flash-wrapper {
        max-width: 460px !important;
        width: 100% !important;
        margin: 0 auto 14px !important;
    }

    .flash {
        font-size: 13px !important;
        padding: 11px 13px !important;
        border-radius: 12px !important;
    }
}

.mobile-auth-brand {
    display: none;
}

@media (max-width: 900px) {
    .mobile-auth-brand {
        display: flex !important;
        align-items: center;
        gap: 12px;
        width: 100%;
        margin: 0 auto 4px;
    }

    .mobile-auth-brand .auth-logo {
        width: 48px !important;
        height: 48px !important;
        border-radius: 15px !important;
        font-size: 18px !important;
    }

    .mobile-auth-brand h2 {
        margin: 0;
        font-size: 21px;
        color: #101828;
        letter-spacing: -0.03em;
    }

    .mobile-auth-brand p {
        margin: 3px 0 0;
        font-size: 12px;
        color: #667085;
        font-weight: 700;
    }
}

@media (max-width: 900px) {
    .auth-main,
    .main.full {
        padding-top: 28px !important;
    }
}

/* =========================
   LOGIN DESKTOP FINAL POLISH
========================= */

@media (min-width: 901px) {
    .auth-main,
    .main.full {
        padding: 24px 28px !important;
        align-items: center !important;
    }

    .auth-layout {
        min-height: auto !important;
        max-width: 1240px !important;
        gap: 44px !important;
    }

    .auth-left h1 {
        font-size: clamp(48px, 4.6vw, 66px) !important;
        line-height: 1.04 !important;
        margin-bottom: 22px !important;
    }

    .auth-description {
        font-size: 18px !important;
        line-height: 1.65 !important;
        margin-bottom: 22px !important;
    }

    .auth-metrics {
        margin-bottom: 22px !important;
    }

    .auth-feature-list {
        gap: 12px !important;
    }

    .auth-feature {
        padding: 13px 15px !important;
        min-height: 62px !important;
    }

    .premium-auth-card {
        padding: 30px !important;
        max-width: 470px !important;
    }

    .premium-auth-card h1 {
        font-size: 38px !important;
    }

    .login-demo-note {
        padding: 14px 16px !important;
        margin-bottom: 18px !important;
    }

    .auth-form input {
        min-height: 48px !important;
    }

    .auth-form button {
        min-height: 50px !important;
    }
}

/* =========================
   REGISTER PAGE COMPACT FIX
========================= */

@media (min-width: 901px) {
    .premium-auth-card .auth-form textarea {
        min-height: 78px !important;
        resize: vertical;
    }

    .premium-auth-card .auth-form input,
    .premium-auth-card .auth-form textarea {
        margin-bottom: 4px !important;
    }

    .premium-auth-card .auth-form label {
        margin-top: 2px !important;
    }
}

@media (max-width: 900px) {
    .mobile-auth-brand {
        display: flex !important;
        align-items: center;
        gap: 12px;
        width: 100%;
        margin: 0 auto 4px;
    }

    .mobile-auth-brand .auth-logo {
        width: 48px !important;
        height: 48px !important;
        border-radius: 15px !important;
        font-size: 18px !important;
    }

    .mobile-auth-brand h2 {
        margin: 0;
        font-size: 21px;
        color: #101828;
        letter-spacing: -0.03em;
    }

    .mobile-auth-brand p {
        margin: 3px 0 0;
        font-size: 12px;
        color: #667085;
        font-weight: 700;
    }
}

@media (min-width: 901px) {
    .mobile-auth-brand {
        display: none !important;
    }
}

/* CMPF layout final fix */
html,
body {
    min-height: 100%;
    overflow-x: hidden;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 270px;
    height: 100vh;
    overflow-y: auto;
}

.main {
    margin-left: 270px;
    width: calc(100% - 270px);
    min-height: 100vh;
    padding: 22px 26px 90px;
    overflow: visible;
}

.run-payroll-layout {
    align-items: start;
}

.payroll-process-card,
.run-payroll-layout .card {
    overflow: visible;
}

@media (max-width: 900px) {
    .main {
        margin-left: 0;
        width: 100%;
        padding: 76px 18px 90px;
    }
}

/* CMPF final layout fix - sidebar overlap + horizontal cut */
html,
body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

.app-shell {
    display: block;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 270px;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.main {
    margin-left: 270px !important;
    width: auto !important;
    max-width: none !important;
    min-height: 100vh;
    padding: 22px 26px 100px !important;
    overflow-x: hidden;
}

/* Prevent card/grid from going behind sidebar */
.run-payroll-layout,
.upload-layout,
.profile-layout,
.dashboard-hero,
.stats,
.payroll-money-grid,
.executive-kpis,
.quick-action-grid {
    max-width: 100%;
    overflow: visible;
}

/* Run payroll feature cards should wrap properly */
.payroll-feature-list,
.process-list {
    max-width: 100%;
}

/* Any wide card should stay inside main area */
.card {
    max-width: 100%;
}

/* Mobile layout */
@media (max-width: 900px) {
    .sidebar {
        width: 280px;
        left: -290px;
    }

    body.sidebar-open .sidebar {
        left: 0;
    }

    .main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 76px 18px 100px !important;
    }
}

/* =========================
   FINAL CMPF LAYOUT FIX
   Sidebar + Main no cut / no overlap
========================= */

html,
body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden !important;
}

.app-shell {
    display: flex !important;
    align-items: flex-start !important;
    min-height: 100vh !important;
    width: 100% !important;
}

/* Sidebar normal flex item - no fixed overlap */
.sidebar {
    position: sticky !important;
    top: 0 !important;
    left: auto !important;
    flex: 0 0 270px !important;
    width: 270px !important;
    height: 100vh !important;
    overflow-y: auto !important;
    z-index: 50 !important;
}

/* Main content takes remaining space */
.main {
    margin-left: 0 !important;
    width: auto !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 100vh !important;
    padding: 22px 26px 100px !important;
    overflow-x: hidden !important;
}

/* Prevent grids/cards from overflowing left/right */
.stats,
.payroll-money-grid,
.executive-kpis,
.dashboard-hero,
.run-payroll-layout,
.upload-layout,
.profile-layout,
.quick-action-grid,
.dashboard-main-grid {
    max-width: 100% !important;
    min-width: 0 !important;
}

/* Stat cards should fit inside visible area */
.stats {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    gap: 18px !important;
}

.stat-card,
.card {
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Run payroll form should not create horizontal overflow */
.enterprise-run-form {
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Mobile */
@media (max-width: 900px) {
    .app-shell {
        display: block !important;
    }

    .sidebar {
        position: fixed !important;
        left: -290px !important;
        top: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        transition: 0.25s ease !important;
    }

    body.sidebar-open .sidebar {
        left: 0 !important;
    }

    .main {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 76px 18px 100px !important;
    }
}

/* CMPF Payroll History export buttons only */
.cmpf-export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
    align-items: center;
}

.cmpf-export-actions a,
.cmpf-export-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 22px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid transparent;
}

/* All download buttons purple */
.cmpf-export-actions a {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed) !important;
    color: #ffffff !important;
    border-color: #7c3aed !important;
}

.cmpf-export-actions a:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Delete button red */
.cmpf-export-actions .danger-btn {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

.cmpf-export-actions .danger-btn:hover {
    background: #b91c1c !important;
}

/* Mobile */
@media (max-width: 768px) {
    .cmpf-export-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cmpf-export-actions a,
    .cmpf-export-actions button {
        width: 100%;
    }
}

.cmpf-payslip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 10px;
    background: #2563eb;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid #1d4ed8;
}

.cmpf-payslip-btn:hover {
    background: #1d4ed8;
    color: #ffffff !important;
}

.cmpf-whatsapp-btn {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 8px;
    background: #16a34a;
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    margin-left: 6px;
}

.cmpf-whatsapp-btn:hover {
    background: #15803d;
    color: #ffffff;
}