:root {
    --nd-primary: #1E40AF;
    --nd-primary-hover: #1E3A8A;
    --nd-primary-light: #DBEAFE;
    --nd-accent: #2563EB;
    --nd-accent-hover: #1D4ED8;
    --nd-accent-light: #EFF6FF;
    --nd-surface: #FFFFFF;
    --nd-bg: #F8FAFC;
    --nd-bg-alt: #F1F5F9;
    --nd-text: #0F172A;
    --nd-text-secondary: #475569;
    --nd-text-muted: #94A3B8;
    --nd-border: #E2E8F0;
    --nd-border-light: #F1F5F9;
    --nd-success: #059669;
    --nd-success-light: #ECFDF5;
    --nd-warning: #D97706;
    --nd-warning-light: #FFFBEB;
    --nd-radius: 8px;
    --nd-radius-sm: 4px;
    --nd-radius-lg: 12px;
    --nd-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --nd-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --nd-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
    --nd-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
    --nd-font: 'Inter', system-ui, -apple-system, sans-serif;
    --nd-max-width: 1200px;
    --nd-header-height: 72px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--nd-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--nd-text);
    background: var(--nd-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--nd-accent);
    transition: color 0.15s ease;
}

a:hover {
    color: var(--nd-accent-hover);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--nd-font);
    font-weight: 700;
    line-height: 1.25;
    color: var(--nd-text);
    margin-top: 0;
}

h1 { font-size: 2.5rem; letter-spacing: -0.025em; }
h2 { font-size: 2rem; letter-spacing: -0.02em; }
h3 { font-size: 1.5rem; letter-spacing: -0.01em; }
h4 { font-size: 1.25rem; }

p { margin-top: 0; }

.site-main {
    padding-top: var(--nd-header-height);
    min-height: 80vh;
}

/* Header */
.nemtly-demo-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--nd-header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--nd-border);
}

.nemtly-demo-header-inner {
    max-width: var(--nd-max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nemtly-demo-header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--nd-text);
}

.nemtly-demo-header-logo:hover {
    color: var(--nd-primary);
}

.nemtly-demo-header-logo svg,
.nemtly-demo-header-logo img {
    height: 32px;
    width: auto;
}

.nemtly-demo-header-logo .logo-mark {
    width: 32px;
    height: 32px;
    background: var(--nd-primary);
    border-radius: var(--nd-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 14px;
}

.nemtly-demo-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nemtly-demo-nav a {
    text-decoration: none;
    color: var(--nd-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.15s ease;
    position: relative;
}

.nemtly-demo-nav a:hover,
.nemtly-demo-nav a.active {
    color: var(--nd-primary);
}

.nemtly-demo-nav .nav-cta {
    background: var(--nd-primary);
    color: white;
    padding: 8px 20px;
    border-radius: var(--nd-radius);
    font-weight: 600;
    font-size: 0.875rem;
}

.nemtly-demo-nav .nav-cta:hover {
    background: var(--nd-primary-hover);
    color: white;
}

/* Footer */
.nemtly-demo-footer {
    background: var(--nd-bg-alt);
    border-top: 1px solid var(--nd-border);
    padding: 48px 24px 32px;
    margin-top: 80px;
}

.nemtly-demo-footer-inner {
    max-width: var(--nd-max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
}

.nemtly-demo-footer-brand p {
    color: var(--nd-text-secondary);
    font-size: 0.875rem;
    margin-top: 12px;
    max-width: 300px;
}

.nemtly-demo-footer h4 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--nd-text-muted);
    margin-bottom: 16px;
}

.nemtly-demo-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nemtly-demo-footer ul li {
    margin-bottom: 8px;
}

.nemtly-demo-footer ul a {
    text-decoration: none;
    color: var(--nd-text-secondary);
    font-size: 0.875rem;
}

.nemtly-demo-footer ul a:hover {
    color: var(--nd-accent);
}

.nemtly-demo-footer-bottom {
    max-width: var(--nd-max-width);
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid var(--nd-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--nd-text-muted);
}

/* Buttons */
.nemtly-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: var(--nd-radius);
    font-family: var(--nd-font);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.nemtly-btn-primary {
    background: var(--nd-primary);
    color: white;
}

.nemtly-btn-primary:hover {
    background: var(--nd-primary-hover);
    color: white;
}

.nemtly-btn-outline {
    background: transparent;
    color: var(--nd-primary);
    border: 2px solid var(--nd-primary);
}

.nemtly-btn-outline:hover {
    background: var(--nd-primary);
    color: white;
}

.nemtly-btn-sm {
    padding: 6px 16px;
    font-size: 0.8rem;
}

.nemtly-btn-lg {
    padding: 14px 32px;
    font-size: 1rem;
}

/* Homepage Hero */
.nemtly-hero {
    background: linear-gradient(135deg, #1E40AF 0%, #1E3A8A 100%);
    padding: 100px 24px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.nemtly-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.nemtly-hero-inner {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.nemtly-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    line-height: 1.15;
}

.nemtly-hero p {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 36px;
    line-height: 1.6;
}

.nemtly-hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.nemtly-hero-actions .nemtly-btn {
    font-size: 1rem;
    padding: 14px 32px;
}

.nemtly-hero-actions .nemtly-btn-primary {
    background: white;
    color: var(--nd-primary);
}

.nemtly-hero-actions .nemtly-btn-primary:hover {
    background: rgba(255,255,255,0.9);
    color: var(--nd-primary-hover);
}

.nemtly-hero-actions .nemtly-btn-outline {
    border-color: rgba(255,255,255,0.5);
    color: white;
}

.nemtly-hero-actions .nemtly-btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.8);
}

.nemtly-hero-powered {
    margin-top: 40px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.nemtly-hero-powered a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
}

.nemtly-hero-powered a:hover {
    color: white;
}

/* Homepage sections */
.nemtly-demo-section {
    max-width: var(--nd-max-width);
    margin: 0 auto;
    padding: 64px 24px;
}

.nemtly-demo-section h2 {
    text-align: center;
    margin-bottom: 12px;
}

.nemtly-demo-section .section-subtitle {
    text-align: center;
    color: var(--nd-text-secondary);
    font-size: 1.1rem;
    margin-bottom: 48px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.nemtly-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.nemtly-stat-card {
    background: var(--nd-surface);
    padding: 32px 24px;
    border-radius: var(--nd-radius-lg);
    box-shadow: var(--nd-shadow);
    border: 1px solid var(--nd-border);
}

.nemtly-stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--nd-primary);
}

.nemtly-stat-card .stat-label {
    color: var(--nd-text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.nemtly-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.nemtly-feature-card {
    background: var(--nd-surface);
    padding: 28px;
    border-radius: var(--nd-radius-lg);
    border: 1px solid var(--nd-border);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.nemtly-feature-card .feature-icon {
    width: 44px;
    height: 44px;
    background: var(--nd-accent-light);
    border-radius: var(--nd-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.nemtly-feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.nemtly-feature-card p {
    color: var(--nd-text-secondary);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.6;
}

/* CTA section */
.nemtly-cta-section {
    background: var(--nd-bg-alt);
    text-align: center;
    padding: 64px 24px;
    margin-bottom: 64px;
}

.nemtly-cta-section h2 {
    margin-bottom: 12px;
}

.nemtly-cta-section .section-subtitle {
    margin-bottom: 32px;
}

.nemtly-cta-section .nemtly-btn-outline {
    border-color: var(--nd-primary);
    color: var(--nd-primary);
    font-weight: 600;
}

.nemtly-cta-section .nemtly-btn-outline:hover {
    background: var(--nd-primary);
    color: white;
}

/* Company grid on homepage */
.nemtly-companies {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    padding: 24px 0;
}

.nemtly-company-pill {
    background: var(--nd-surface);
    border: 1px solid var(--nd-border);
    border-radius: 100px;
    padding: 8px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--nd-text-secondary);
}

/* Page header */
.nemtly-page-header {
    background: var(--nd-bg-alt);
    padding: 48px 24px;
    text-align: center;
    border-bottom: 1px solid var(--nd-border);
}

.nemtly-page-header h1 {
    margin-bottom: 8px;
}

.nemtly-page-header p {
    color: var(--nd-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Content wrapper */
.nemtly-content {
    max-width: var(--nd-max-width);
    margin: 0 auto;
    padding: 40px 24px;
}

/* Demo login cards */
.nemtly-demo-login-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    border: 2px solid var(--nd-border);
    border-radius: var(--nd-radius-lg);
    overflow: hidden;
}

.nemtly-demo-login-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--nd-surface);
    border: none;
    border-right: 1px solid var(--nd-border);
    border-radius: 0;
    padding: 20px 28px;
    text-decoration: none;
    color: var(--nd-text);
    flex: 1;
    min-width: 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nemtly-demo-login-card:last-child {
    border-right: none;
}

.nemtly-demo-login-card:hover {
    background: var(--nd-accent-light);
    box-shadow: inset 0 -3px 0 var(--nd-primary);
    color: var(--nd-text);
    transform: none;
}

.nemtly-demo-login-card .card-icon {
    width: 44px;
    height: 44px;
    background: var(--nd-accent-light);
    border-radius: var(--nd-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nd-primary);
    flex-shrink: 0;
}

.nemtly-demo-login-card strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.nemtly-demo-login-card .card-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--nd-text-secondary);
    font-weight: 400;
}

.nemtly-demo-login-card.card-admin {
    background: #FFFBEB;
}

.nemtly-demo-login-card.card-admin .card-icon {
    background: #FEF3C7;
    color: #D97706;
}

.nemtly-demo-login-card.card-admin:hover {
    background: #FEF3C7;
    box-shadow: inset 0 -3px 0 #D97706;
}

.nemtly-demo-logged-in {
    text-align: center;
}

.nemtly-demo-logged-in p {
    font-size: 0.9rem;
    color: var(--nd-text-secondary);
    margin-bottom: 12px;
}

.nemtly-demo-logged-in .nemtly-hero-actions {
    justify-content: center;
}

/* Shared-account notice */
.nemtly-demo-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #1E40AF;
    color: white;
    padding: 10px 24px;
    font-size: 0.8rem;
    line-height: 1.5;
}

.nemtly-demo-notice-inner {
    max-width: var(--nd-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.nemtly-demo-notice-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.nemtly-demo-notice a {
    color: white;
    text-decoration: underline;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
}

.nemtly-demo-notice a:hover {
    color: rgba(255,255,255,0.75);
}

/* Responsive */
@media (max-width: 1024px) {
    .nemtly-stats { grid-template-columns: repeat(2, 1fr); }
    .nemtly-features { grid-template-columns: repeat(2, 1fr); }
    .nemtly-demo-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .nemtly-hero { padding: 80px 20px 60px; }
    .nemtly-hero h1 { font-size: 2rem; }
    .nemtly-hero p { font-size: 1rem; }
    .nemtly-stats { grid-template-columns: repeat(2, 1fr); }
    .nemtly-features { grid-template-columns: 1fr; }
    .nemtly-demo-footer-inner { grid-template-columns: 1fr; }
    .nemtly-demo-nav { display: none; }
    .nemtly-demo-footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .nemtly-stat-card .stat-number { font-size: 2rem; }
    .nemtly-demo-login-grid { flex-direction: column; }
    .nemtly-demo-login-card { border-right: none; border-bottom: 1px solid var(--nd-border); min-width: auto; }
    .nemtly-demo-login-card:last-child { border-bottom: none; }
}

@media (max-width: 480px) {
    .nemtly-stats { grid-template-columns: 1fr; }
}
