/*
 * HR Process Manager - Flat Design Theme
 * Primary Color: Deep Teal (#0B6E6E) - Trust, Knowledge, Calm
 * Inspired by Salesforce/ServiceNow flat design principles
 */

/* CSS Variables */
:root {
    --primary: #0B6E6E;
    --primary-hover: #095555;
    --primary-light: #E8F4F4;
    --primary-subtle: #F0F7F7;
    --secondary: #5C6BC0;
    --success: #2E7D32;
    --success-light: #E8F5E9;
    --warning: #ED6C02;
    --warning-light: #FFF4E5;
    --error: #D32F2F;
    --premium: #D97706;
    --premium-light: #FEF9C3;
    --premium-text: #854D0E;
    --success-border: #86EFAC;
    --text-primary: #1C2B33;
    --text-secondary: #54698D;
    --text-muted: #8A94A6;
    --border: #D8DDE6;
    --border-light: #E9EDF2;
    --bg-white: #FFFFFF;
    --bg-gray: #F4F6F9;
    --bg-page: #F3F4F6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Salesforce Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-page);
    min-height: 100vh;
    font-size: 14px;
}

/* Navigation - Flat header bar */
.navbar {
    background: var(--primary);
    border-bottom: none;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}

.navbar h1 {
    margin: 0;
    line-height: 56px;
}

.navbar h1 a {
    color: #FFFFFF;
    text-decoration: none;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.03em;
    line-height: 56px;
}

.nav-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-links span {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 13px;
    padding: 0 12px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: background-color 0.15s ease;
    font-weight: 500;
    font-size: 13px;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

.nav-links a:active {
    background: rgba(255, 255, 255, 0.2);
}

.btn-nav-login {
    color: rgba(255, 255, 255, 0.9) !important;
}

.btn-nav-register {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    font-weight: 600 !important;
}

.btn-nav-register:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
}

/* Main content */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* Flash messages - Flat style */
.flash-messages {
    margin-bottom: 20px;
}

.flash-message {
    background: var(--success-light);
    border: 1px solid var(--success);
    border-left: 4px solid var(--success);
    color: var(--success);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-weight: 500;
    font-size: 13px;
}

.flash-message.flash-error {
    background: #FDECEA;
    border: 1px solid var(--error);
    border-left: 4px solid var(--error);
    color: var(--error);
}

/* Card base style */
.card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Forms - Flat input style */
.form-container {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 640px;
    margin: 0 auto;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: var(--bg-white);
    color: var(--text-primary);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2354698D' d='M6 8.825a.7.7 0 0 1-.5-.206L1.205 4.324a.71.71 0 0 1 1.003-1.003L6 7.113l3.792-3.792a.71.71 0 0 1 1.003 1.003L6.5 8.619a.7.7 0 0 1-.5.206z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
    line-height: 1.4;
}

.form-group select:disabled {
    background-color: var(--bg-gray);
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: #B0B7C3;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(11, 110, 110, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.form-group small {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
}

/* Buttons - Flat style */
.btn {
    background: var(--primary);
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.15s ease;
    min-height: 40px;
}

.btn:hover {
    background: var(--primary-hover);
}

.btn:active {
    background: #074444;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(11, 110, 110, 0.3);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-gray);
}

.btn-secondary:active {
    background: #E5E9EF;
}

/* Dashboard */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.dashboard-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Process grid and cards */
.process-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.process-card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.process-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #C5CBD4;
}

.process-card h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
}

.process-card p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.process-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge--active {
    background: var(--primary-light);
    color: var(--primary);
}

.status-badge--completed {
    background: var(--success-light);
    color: var(--success);
}

.status-badge--pending {
    background: var(--warning-light);
    color: var(--warning);
}

/* Welcome section */
.welcome-section {
    text-align: center;
    background: var(--bg-white);
    padding: 48px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid var(--border);
}

.welcome-section h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.welcome-section p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.6;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.welcome-section .btn {
    margin: 0 6px;
}

/* Resource list */
.resource-list {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.resource-list h2 {
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 18px;
}

.resource-list ul {
    list-style-type: none;
}

.resource-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 14px;
}

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

.resource-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

.resource-list a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.resource-list a:hover {
    text-decoration: underline;
}

/* Process form sections */
.process-fields {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-gray);
}

.process-fields h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 700;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
}

/* Info and warning boxes - Flat style */
.info-box {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-left: 4px solid var(--primary);
    padding: 16px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
}

.info-box strong {
    color: var(--primary);
}

.warning-box {
    background: var(--warning-light);
    border: 1px solid var(--warning);
    border-left: 4px solid var(--warning);
    padding: 16px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-primary);
}

.warning-box strong {
    color: #C55A00;
}

.success-box {
    background: var(--success-light);
    border: 1px solid var(--success-border);
    border-left: 4px solid var(--success);
    padding: 16px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.6;
    color: #166534;
}

.success-box strong {
    color: var(--success);
}

.premium-box {
    background: var(--premium-light);
    border: 1px solid var(--premium);
    border-left: 4px solid var(--premium);
    padding: 16px;
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    font-size: 13px;
    line-height: 1.6;
    color: var(--premium-text);
}

.premium-box strong {
    color: var(--premium-text);
}

.premium-box a {
    color: #92400E;
    font-weight: 600;
}

/* Section headers in forms */
.section-header {
    background: var(--bg-white);
    padding: 10px 16px;
    margin: 24px 0 16px 0;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--text-primary);
    border: 1px solid var(--border);
    font-size: 14px;
}

/* Collapsible settings sections (accordion) */
.settings-section {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
}

.settings-header {
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    transition: background 0.2s;
}

.settings-header:hover {
    background: var(--bg-gray);
}

.settings-arrow {
    transition: transform 0.2s;
    font-size: 12px;
    color: var(--text-muted);
}

.settings-header.active .settings-arrow {
    transform: rotate(180deg);
}

.settings-content {
    display: none;
    padding: 0 20px 20px 20px;
}

.settings-content.show {
    display: block;
}

.settings-content .form-group:first-child {
    margin-top: 4px;
}

/* Info tooltip - inline icon with hover popover */
.info-tip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    vertical-align: middle;
}

.info-tip-icon {
    width: 18px;
    height: 18px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: help;
    font-weight: 700;
    font-style: normal;
    flex-shrink: 0;
    transition: background 0.15s;
}

.info-tip-icon:hover {
    background: var(--primary);
    color: #fff;
}

.info-tip-content {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    width: 340px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    font-weight: 400;
    z-index: 50;
}

.info-tip-content strong {
    color: var(--text-primary);
}

.info-tip-content .legal-ref {
    display: block;
    margin-top: 8px;
}

.info-tip:hover .info-tip-content,
.info-tip:focus-within .info-tip-content {
    display: block;
}

/* Keep tooltip from overflowing right edge */
.info-tip-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--border);
}

.info-tip-content::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--bg-white);
}

/* Collapsible detail toggle for longer info */
.info-detail-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--primary);
    font-weight: 500;
    padding: 6px 0;
    margin-bottom: 12px;
    border: none;
    background: none;
}

.info-detail-toggle:hover {
    text-decoration: underline;
}

.info-detail-toggle .toggle-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}

.info-detail-toggle.active .toggle-arrow {
    transform: rotate(180deg);
}

.info-detail-content {
    display: none;
    margin-bottom: 16px;
}

.info-detail-content.show {
    display: block;
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    font-size: 14px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 400;
}

/* Radio button group - segmented control */
.radio-group {
    display: flex;
    gap: 0;
    margin: 8px 0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 16px;
    border: 1px solid var(--border);
    font-weight: 400;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.15s;
}

.radio-group label:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.radio-group label:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    border-left: none;
}

.radio-group label:hover {
    border-color: var(--primary);
    background: var(--primary-subtle);
}

.radio-group label:has(input:checked) {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.radio-group input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
    margin: 0;
}

/* Contract view styles */
.signed-info {
    background: var(--success-light);
    border: 1px solid var(--success-border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-top: 8px;
}

.signed-info p {
    font-size: 13px;
    color: #166534;
    margin: 0;
}

.unsigned-info {
    background: var(--premium-light);
    border: 1px solid var(--premium);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-top: 8px;
}

.unsigned-info p {
    font-size: 13px;
    color: var(--premium-text);
    margin: 0;
}

.status-banner {
    padding: 16px 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-banner--complete {
    background: var(--success-light);
    border: 1px solid var(--success-border);
}

.status-banner--pending {
    background: var(--premium-light);
    border: 1px solid var(--premium);
}

/* Checklist panel */
.checklist {
    background: var(--bg-white);
    padding: 16px;
    border-radius: var(--radius-md);
    margin: 16px 0;
    border: 1px solid var(--border);
}

.checklist strong {
    display: block;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-size: 14px;
}

/* Legal reference text */
.legal-ref {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    display: block;
    margin-top: 8px;
}

/* Services page */
.services-hero {
    text-align: center;
    margin-bottom: 32px;
    padding: 32px 0;
}

.services-hero h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.services-hero p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

.services-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.services-card-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.services-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    margin-bottom: 32px;
}

.service-card {
    background: var(--bg-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

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

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.service-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    font-size: 14px;
}

.service-features {
    list-style: none;
}

.service-features li {
    color: var(--text-secondary);
    padding: 6px 0;
    position: relative;
    padding-left: 24px;
    font-size: 13px;
}

.service-features li:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: var(--success-light);
    border-radius: 50%;
}

.service-features li:after {
    content: "✓";
    position: absolute;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--success);
    font-size: 10px;
    font-weight: bold;
}

/* Stats/metrics cards */
.stats-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 24px 0;
}

.stat-card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid var(--border);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

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

/* Feature section */
.feature-section {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.feature-section h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

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

.feature-item {
    padding: 12px 0;
}

.feature-item strong {
    color: var(--text-primary);
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.feature-item span {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.empty-state h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 14px;
}

/* Table styles */
.table-container {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--bg-gray);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-primary);
}

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

.table tr:hover td {
    background: var(--bg-gray);
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
        height: auto;
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
    }

    .nav-links {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-content {
        padding: 16px;
    }

    .form-container {
        padding: 24px;
        margin: 0;
    }

    .welcome-section {
        padding: 32px 20px;
    }

    .welcome-section h1 {
        font-size: 24px;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .dashboard-header h1 {
        font-size: 20px;
    }

    .services-hero h1 {
        font-size: 24px;
    }

    .services-columns {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }
}

/* Detail grid for employee/profile pages */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.detail-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.detail-item:nth-last-child(-n+2) {
    border-bottom: none;
}

.detail-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Responsive adjustments for detail grid */
@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    [style*="grid-template-columns: 2fr 1fr"],
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ==================== LANDING PAGE ==================== */

/* Hero */
.landing-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #064D4D 100%);
    border-radius: var(--radius-lg);
    padding: 72px 48px;
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.landing-hero::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
    border-radius: 50%;
}

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

.landing-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.95);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 24px;
    backdrop-filter: blur(4px);
}

.landing-hero h1 {
    font-size: 40px;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.landing-hero-sub {
    font-size: 17px;
    color: rgba(255,255,255,0.85);
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.btn-hero-primary {
    background: #FFFFFF;
    color: var(--primary);
    padding: 14px 32px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-hero-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    background: #FFFFFF;
}

.btn-hero-secondary {
    background: transparent;
    color: #FFFFFF;
    padding: 14px 32px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: border-color 0.15s ease, background 0.15s ease;
}

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

/* Problem / Solution */
.landing-problem-section {
    margin-bottom: 24px;
}

.landing-problem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.landing-problem-card,
.landing-solution-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}

.landing-problem-card {
    border-top: 3px solid var(--error);
}

.landing-solution-card {
    border-top: 3px solid var(--success);
}

.landing-problem-icon,
.landing-solution-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.landing-problem-icon {
    background: #FDECEA;
    color: var(--error);
}

.landing-solution-icon {
    background: var(--success-light);
    color: var(--success);
}

.landing-problem-card h3,
.landing-solution-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.landing-problem-list,
.landing-solution-list {
    list-style: none;
}

.landing-problem-list li,
.landing-solution-list li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.landing-problem-list li:last-child,
.landing-solution-list li:last-child {
    border-bottom: none;
}

.landing-problem-list li::before {
    content: "\2717";
    position: absolute;
    left: 0;
    color: var(--error);
    font-weight: 700;
    font-size: 14px;
}

.landing-solution-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
    font-size: 14px;
}

/* Pricing */
.landing-pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.landing-pricing-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.landing-pricing-free {
    border-top: 3px solid var(--primary);
}

.landing-pricing-support {
    border-top: 3px solid var(--secondary);
}

.landing-pricing-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
    align-self: flex-start;
}

.landing-pricing-badge-secondary {
    display: inline-block;
    background: #E8EAF6;
    color: var(--secondary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
    align-self: flex-start;
}

.landing-pricing-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.landing-pricing-period {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 500;
}

.landing-pricing-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.landing-pricing-features {
    list-style: none;
    margin-bottom: 24px;
    flex-grow: 1;
}

.landing-pricing-features li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.landing-pricing-features li:last-child {
    border-bottom: none;
}

.landing-pricing-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

@media (max-width: 1024px) {
    .landing-pricing {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .landing-pricing {
        grid-template-columns: 1fr;
    }
}

/* Section layout */
.landing-section {
    margin-bottom: 24px;
}

.landing-section-header {
    text-align: center;
    margin-bottom: 28px;
    padding-top: 16px;
}

.landing-section-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.landing-section-header p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Process grid on landing */
.landing-process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.landing-process-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
}

.landing-process-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.landing-process-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-process-card h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.landing-process-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Steps */
.landing-steps {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 16px;
    padding: 20px 0;
}

.landing-step {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: center;
    flex: 1;
    max-width: 280px;
    box-shadow: var(--shadow-sm);
}

.landing-step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    margin: 0 auto 16px;
}

.landing-step h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.landing-step p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.landing-step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    padding-top: 40px;
    flex-shrink: 0;
}

/* Value cards */
.landing-value-section {
    margin-bottom: 24px;
}

.landing-value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.landing-value-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.landing-value-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.landing-value-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.landing-value-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.landing-value-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Audience section */
.landing-audience-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}

.landing-audience-content h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.landing-audience-content > p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 640px;
}

.landing-audience-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.landing-audience-list li {
    padding: 20px;
    background: var(--bg-gray);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.landing-audience-list li strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.landing-audience-list li span {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* CTA section */
.landing-cta {
    background: linear-gradient(135deg, var(--primary) 0%, #064D4D 100%);
    border-radius: var(--radius-lg);
    padding: 56px 40px;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.landing-cta::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.landing-cta h2 {
    font-size: 28px;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    position: relative;
}

.landing-cta p {
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    margin-bottom: 28px;
    position: relative;
}

.landing-cta-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

/* Footer */
.landing-footer {
    text-align: center;
    padding: 24px 0 32px;
}

.landing-footer p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Landing responsive */
@media (max-width: 1024px) {
    .landing-process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .landing-audience-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .landing-hero {
        padding: 48px 24px;
    }

    .landing-hero h1 {
        font-size: 28px;
    }

    .landing-hero-sub {
        font-size: 15px;
    }

    .landing-problem-grid {
        grid-template-columns: 1fr;
    }

    .landing-process-grid {
        grid-template-columns: 1fr;
    }

    .landing-steps {
        flex-direction: column;
        align-items: center;
    }

    .landing-step {
        max-width: 100%;
        width: 100%;
    }

    .landing-step-arrow {
        transform: rotate(90deg);
        padding-top: 0;
    }

    .landing-value-grid {
        grid-template-columns: 1fr;
    }

    .landing-audience-card {
        padding: 24px;
    }

    .landing-cta {
        padding: 40px 24px;
    }

    .landing-cta h2 {
        font-size: 22px;
    }

    .landing-section-header h2 {
        font-size: 22px;
    }
}

/* ==================== HISTORY / TIMELINE ==================== */

/* Filter bar */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-white);
    border: 1px solid var(--border);
    transition: all 0.15s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn--active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
}

.filter-btn--active:hover {
    background: var(--primary-hover);
    color: #FFFFFF;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 16px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 3px solid var(--bg-page);
    z-index: 1;
}

.timeline-dot--created {
    background: var(--success);
}

.timeline-dot--edited {
    background: var(--secondary);
}

.timeline-dot--completed {
    background: #7B1FA2;
}

.timeline-dot--employer_signed,
.timeline-dot--employee_signed {
    background: var(--warning);
}

.timeline-content {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.timeline-date {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.timeline-body {
    margin-bottom: 6px;
    font-size: 14px;
}

.timeline-process-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.timeline-process-link:hover {
    text-decoration: underline;
}

.timeline-separator {
    color: var(--text-muted);
    margin: 0 6px;
}

.timeline-description {
    color: var(--text-secondary);
}

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

.timeline-meta strong {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Event badges */
.event-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.event-badge--created {
    background: var(--success-light);
    color: var(--success);
}

.event-badge--edited {
    background: #E8EAF6;
    color: var(--secondary);
}

.event-badge--completed {
    background: #F3E5F5;
    color: #7B1FA2;
}

.event-badge--employer_signed,
.event-badge--employee_signed {
    background: var(--warning-light);
    color: var(--warning);
}

/* Change details / diff */
.change-details {
    margin-top: 12px;
}

.change-details summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    padding: 4px 0;
}

.change-details summary:hover {
    text-decoration: underline;
}

.change-diff {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    font-size: 13px;
}

.change-diff th {
    background: var(--bg-gray);
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

.change-diff td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-light);
}

.change-diff tr:last-child td {
    border-bottom: none;
}

.change-field {
    font-weight: 600;
    color: var(--text-primary);
}

.change-old {
    color: var(--error);
    background: #FFF5F5;
}

.change-new {
    color: var(--success);
    background: #F0FFF0;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding: 16px 0;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.text-muted {
    color: var(--text-muted);
    font-size: 14px;
}

/* Responsive timeline */
@media (max-width: 768px) {
    .filter-bar {
        gap: 6px;
    }

    .filter-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .timeline {
        padding-left: 24px;
    }

    .timeline::before {
        left: 7px;
    }

    .timeline-dot {
        left: -24px;
        width: 16px;
        height: 16px;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .timeline-content {
        padding: 12px 16px;
    }
}

/* ==================== LOGIN PAGES ==================== */

/* Standard login wrapper */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 160px);
}

/* Branded subdomain login */
.login-branded-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-page);
    padding: 24px;
}

.login-branded-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 40px 36px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.login-branded-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .login-branded-wrapper {
        padding: 16px;
        min-height: calc(100vh - 120px);
    }

    .login-branded-card {
        padding: 28px 24px;
    }
}

/* Password requirements */
.password-requirements {
    list-style: none;
    margin-top: 8px;
    padding: 0;
}

.password-requirements .requirement {
    font-size: 13px;
    padding: 4px 0 4px 24px;
    position: relative;
    color: var(--error);
    transition: color 0.15s ease;
}

.password-requirements .requirement::before {
    content: "\2717";
    position: absolute;
    left: 4px;
    font-weight: 700;
    font-size: 12px;
}

.password-requirements .requirement.met {
    color: var(--success);
}

.password-requirements .requirement.met::before {
    content: "\2713";
}

.btn:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn:disabled:hover {
    background: var(--border);
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Selection color */
::selection {
    background: var(--primary-light);
    color: var(--text-primary);
}
