        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #3B82F6;
            --primary-dark: #2563EB;
            --primary-light: #60A5FA;
            --bg: #F8FAFC;
            --surface: #FFFFFF;
            --text: #1E293B;
            --text-light: #64748B;
            --success: #22C55E;
            --error: #EF4444;
            --border: #E2E8F0;
            --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
        }

        body {
          background: url("../img/background.jpg") no-repeat top right/cover;
          position: relative;
          font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
          color: var(--text);
          line-height: 1.6;
          min-height: 100vh;
          display: flex;
          align-items: center;
          justify-content: center;
          padding: 20px;
        }

        @media (max-width: 640px) {
            body {
                background-position: calc(100% + 60px) top;
            }
        }

        .container {
            width: 100%;
            max-width: 600px;
            background: var(--surface);
            border-radius: 20px;
            box-shadow: var(--shadow-lg);
            padding: 40px;
            position: relative;
            overflow: hidden;
        }

        .logo {
            text-align: center;
            margin-bottom: 40px;
        }

        .logo img {
            max-width: 200px;
        }

        .logo h1 {
            font-size: 32px;
            font-weight: 700;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .logo p {
            color: var(--text-light);
            margin-top: 8px;
            font-size: 16px;
        }

        .progress-bar {
            height: 4px;
            background: var(--border);
            border-radius: 2px;
            margin-bottom: 40px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
            width: 0%;
            transition: width 0.5s ease;
        }

        .form-section {
            display: none;
            animation: fadeIn 0.5s ease;
        }

        .form-section.active {
            display: block;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        @keyframes fadeInNotif {
            from {
                opacity: 0;
                transform: translateY(-8px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        @keyframes fadeOutNotif {
            from { opacity: 1; }
            to   { opacity: 0; }
        }
        .fadeOut {
            animation: fadeOutNotif 0.3s forwards;
        }

        .save-indicator {
            position: absolute;
            right: 16px;
            top: 42px;
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            font-weight: 500;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

        .save-indicator.saving {
            color: var(--primary);
        }

        .save-indicator.saved {
            color: var(--success);
        }

        .save-indicator svg.spin {
            animation: spin 1s linear infinite;
        }

        .field-group {
            margin-bottom: 24px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 500;
            color: var(--text);
            font-size: 14px;
        }

        input, select, textarea {
            width: 100%;
            padding: 12px 16px;
            border: 2px solid var(--border);
            border-radius: 12px;
            font-size: 16px;
            transition: all 0.3s ease;
            background: var(--surface);
        }

        input:focus, select:focus, textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        input.prefilled {
            background: #F0F9FF;
            border-color: var(--primary-light);
        }

        .button {
            padding: 14px 28px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: var(--shadow);
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

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

        .button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }

        .button-secondary {
            background: var(--surface);
            color: var(--primary);
            border: 2px solid var(--primary);
        }

        .button-group {
            display: flex;
            gap: 12px;
            margin-top: 32px;
        }

        .suggestion {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: #F0F9FF;
            border: 1px solid var(--primary-light);
            border-radius: 8px;
            margin-top: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 14px;
        }

        .suggestion:hover {
            background: #E0F2FE;
        }

        #brregInfo {
            margin-bottom: 16px;
        }

        #companyAddressSuggestion {
            margin-bottom: 16px;
        }

        .machine-card {
            background: var(--bg);
            border-radius: 12px;
            padding: 20px;
            margin-bottom: 16px;
            border: 2px solid var(--border);
            transition: all 0.3s ease;
            position: relative;
        }
        .machine-card:hover {
            border-color: var(--primary-light);
            box-shadow: var(--shadow);
        }

        .remove-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            background: transparent;
            color: var(--error);
            border: none;
            font-size: 14px;
            cursor: pointer;
        }
        .remove-btn:hover {
            color: #c1272d;
        }

        .status-message {
            padding: 12px 16px;
            border-radius: 8px;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
        }

        .status-success {
            background: #D1FAE5;
            color: #065F46;
        }

        .status-info {
            background: #DBEAFE;
            color: #1E40AF;
        }

        .loading-spinner {
            display: inline-block;
            width: 20px;
            height: 20px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: white;
            animation: spin 1s ease-in-out infinite;
        }

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

        .ai-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 8px;
            background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
            color: white;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
        }

        /* ===== AI Suggestion Container ===== */
        .ai-suggestion-container {
          display: flex;
          align-items: center;
          justify-content: space-between;
          background-color: #EFF6FF;       /* very light blue */
          border: 1px solid #BFDBFE;       /* subtle border */
          border-radius: 8px;
          padding: 8px 12px;
          margin-bottom: 16px;
          font-size: 14px;
        }

        /* Left side: badge + text */
        .ai-suggestion-container .suggestion-left {
          display: flex;
          align-items: center;
          gap: 8px;
        }

        /* “AI” badge (small purple pill) */
        .ai-suggestion-container .ai-badge {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
          color: white;
          border-radius: 4px;
          font-size: 12px;
          font-weight: 600;
          padding: 2px 6px;
        }

        /* The main suggestion text */
        .ai-suggestion-container .suggestion-text {
          color: #1E3A8A;  /* dark indigo text */
          line-height: 1.4;
        }

        /* The actual suggested value, in its own highlighted pill */
        .ai-suggestion-container .suggested-value {
          background-color: #DBEAFE;  /* very light blue highlight */
          color: #1E3A8A;
          padding: 2px 6px;
          border-radius: 4px;
          font-weight: 600;
          margin: 0 4px;
        }

        /* “Use this” button on the right */
        .ai-suggestion-container button.use-btn {
          background-color: #3B82F6;    /* primary */
          color: #FFFFFF;
          border: none;
          padding: 6px 12px;
          border-radius: 6px;
          font-size: 14px;
          font-weight: 500;
          cursor: pointer;
          transition: background-color 0.2s ease;
        }
        .ai-suggestion-container button.use-btn:hover {
          background-color: #2563EB;    /* darker primary on hover */
        }

        /* ===== Capacity‐AI Suggestion Styles ===== */
        .capacity-ai-container {
          display: flex;
          align-items: center;
          justify-content: space-between;
          background-color: #FEF3C7;     /* very light gold (just to differentiate from name/company) */
          border: 1px solid #FCD34D;     /* golden border */
          border-radius: 8px;
          padding: 8px 12px;
          margin-bottom: 16px;
          font-size: 14px;
        }

        .capacity-ai-container .suggestion-left {
          display: flex;
          align-items: center;
          gap: 8px;
        }

        .capacity-ai-container .ai-badge {
          /* re‐use the existing .ai-badge styling */
        }

        .capacity-ai-container .suggestion-text {
          color: #92400E;   /* a dark amber/brown for contrast */
          line-height: 1.4;
        }

        .capacity-ai-container .suggested-value {
          background-color: #FEEBC8;     /* very light orange highlight */
          color: #92400E;
          padding: 2px 6px;
          border-radius: 4px;
          font-weight: 600;
          margin: 0 4px;
        }

        .capacity-ai-container button.use-btn {
          background-color: #D97706;  /* amber/orange */
          color: #FFFFFF;
          border: none;
          padding: 6px 12px;
          border-radius: 6px;
          font-size: 14px;
          font-weight: 500;
          cursor: pointer;
          transition: background-color 0.2s ease;
        }
        .capacity-ai-container button.use-btn:hover {
          background-color: #B45309;  /* darker amber */
        }

        /* ===== In‐Page Notification Styles ===== */
        .notification {
          position: relative;
          width: 100%;
          padding: 12px 16px;
          border-radius: 8px;
          margin-bottom: 16px;
          font-size: 14px;
          display: flex;
          align-items: center;
          gap: 12px;
          box-shadow: var(--shadow);
          animation: fadeInNotif 0.3s ease;
        }

        .notification-error {
          background-color: #FEE2E2; /* light red */
          color: #B91C1C;            /* dark red */
          border: 1px solid #FCA5A5; /* border red */
        }

        .notification-info {
          background-color: #DBEAFE; /* light blue */
          color: #1E40AF;            /* dark blue */
          border: 1px solid #93C5FD; /* border blue */
        }

        .notification svg {
          flex-shrink: 0;
        }

        @media (max-width: 640px) {
            .container {
                padding: 24px;
            }

            .logo h1 {
                font-size: 28px;
            }
        }

        .completion-message {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            padding: 32px;
            background: none;
            box-shadow: none;
            color: var(--text);
        }
        .completion-icon {
            width: 48px;
            height: 48px;
            margin-bottom: 16px;
            color: var(--primary);
        }
        .completion-message h2 {
            font-size: 28px;
            font-weight: 700;
            color: var(--primary-dark);
            margin-bottom: 8px;
        }
        .completion-message p {
            font-size: 16px;
            margin-bottom: 24px;
            color: var(--text-light);
        }
        .go-dashboard {
            background: var(--primary);
            color: white;
            padding: 12px 24px;
            font-size: 16px;
            border-radius: 8px;
            transition: all 0.3s ease;
        }
        .go-dashboard:hover {
            background: white;
            color: var(--primary-dark);
            border: 2px solid var(--primary-dark);
        }

        .pricing-cards {
            display: flex;
            justify-content: space-between;
            gap: 16px;
            flex-wrap: wrap;
        }
        .pricing-card {
            position: relative;
            flex: 1 1 30%;
            /* Updated to a deep blue gradient */
            background: linear-gradient(145deg, #0f1e3a, #1a356b);
            border-radius: 12px;
            /* Slightly heavier shadow for depth */
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
            padding: 24px;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .pricing-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
        }
        .pricing-card input[type="radio"] {
            display: none;
        }
        .pricing-card label {
            display: block;
            color: #fff;
            font-weight: 500;
            cursor: pointer;
        }
        .pricing-card .plan-name {
            font-size: 1.2rem;
            margin-bottom: 8px;
            /* Light, cool color to stand out on dark background */
            color: #e0e7ff;
        }
        .pricing-card .plan-cost {
            font-size: 1rem;
            margin-bottom: 4px;
            color: #cfd8e3;
            /* Prevent wrapping on short strings like “0 NOK/month” */
            white-space: nowrap;
        }
        .pricing-card .plan-commission {
            font-size: 0.9rem;
            color: #aab7c2;
            white-space: nowrap;
        }
        .pricing-card .radio-indicator {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 20px;
            height: 20px;
            border: 2px solid #3e8ef7;
            border-radius: 50%;
            transition: background 0.2s, border-color 0.2s;
        }
        .pricing-card input[type="radio"]:checked + .radio-indicator {
            /* Brighter blue when selected */
            background: #62a0ff;
            border-color: #62a0ff;
        }
        @media (max-width: 600px) {
            .pricing-cards {
                flex-direction: column;
            }
            .pricing-card {
                flex: 1 1 100%;
            }
        }

        /* ===== Terms and Conditions Container – no extra box, just inherit the parent form styling ===== */
        #termsSection {
            background: transparent;
            box-shadow: none;
            padding: 32px 0 0 0;
            color: #1E293B;
            font-family: 'Courier New', Courier, monospace;
        }

        /* Heading stays the same color as your brand text */
        #termsSection h2 {
            color: #3B82F6;
            font-size: 24px;
            margin-bottom: 16px;
            text-align: center;
            letter-spacing: 0.5px;
        }

        /* Remove any border/background from the content area; allow horizontal scroll for long lines */
        #termsContent {
            max-height: 460px;
            overflow-y: auto;
            overflow-x: auto;
            background: transparent;
            border: none;
            padding: 0;
            white-space: pre;
            font-size: 13px;
            line-height: 1.4;
            box-shadow: none;
        }

        /* Scrollbar styling (WebKit) */
        #termsContent::-webkit-scrollbar {
            height: 8px;
            width: 8px;
        }
        #termsContent::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 4px;
        }
        #termsContent::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 4px;
        }

        /* Scrollbar styling (Firefox) */
        #termsContent {
            scrollbar-width: thin;
            scrollbar-color: #cbd5e1 #f1f1f1;
        }

        /* Container for checkbox + label */
        .checkbox-container {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 16px;
            position: relative;
        }

        /* Hide the native checkbox input */
        .checkbox-container input[type="checkbox"] {
            opacity: 0;
            position: absolute;
            left: 0;
            top: 0;
            width: 20px;
            height: 20px;
            cursor: pointer;
        }

        /* Style the label text (dark on white) */
        .checkbox-container label {
            position: relative;
            padding-left: 32px;
            cursor: pointer;
            user-select: none;
            font-size: 14px;
            color: #1E293B; /* dark text */
        }

        /* Outer box (light background, gray border) */
        .checkbox-container label::before {
            content: "";
            position: absolute;
            left: 0;
            top: 2px;
            width: 20px;
            height: 20px;
            background: #FFFFFF;          /* white box */
            border: 2px solid #A0AEC0;   /* medium-gray border */
            border-radius: 4px;
            transition: background 0.2s, border-color 0.2s;
        }

        /* Checkmark (hidden until checked) */
        .checkbox-container input[type="checkbox"] + label::after {
            content: "";
            position: absolute;
            left: 4px;
            top: 6px;
            width: 8px;
            height: 5px;
            border-left: 3px solid #3B82F6;   /* blue checkmark */
            border-bottom: 3px solid #3B82F6;
            transform: rotate(-45deg) scale(0);
            transition: transform 0.2s ease-in-out;
        }

        /* When checked, fill box and show checkmark */
        .checkbox-container input[type="checkbox"]:checked + label::before {
            background: #E0F2FE;          /* very light blue fill */
            border-color: #3B82F6;       /* primary blue border */
        }

        .checkbox-container input[type="checkbox"]:checked + label::after {
            transform: rotate(-45deg) scale(1);
        }

        select {
            -webkit-appearance: none;
            -moz-appearance: none;
            appearance: none;
            width: 100%;
            padding: 12px 16px; /* keep 16px left/right padding */
            border: 2px solid var(--border);
            border-radius: 12px;
            font-size: 16px;
            background: var(--surface) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" stroke="%2364784B" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 6l4 4 4-4"/></svg>')
                        no-repeat calc(100% - 16px) center; /* arrow placed 16px from right */
            background-size: 16px;
        }
select:focus, select:hover {
    border-color: var(--primary);
}

/* ===== Futuristic toggle switch for useCompanyAddress ===== */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text);
}

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

.toggle-switch {
    position: relative;
    width: 48px;
    height: 26px;
    background: var(--surface);
    border: 2px solid var(--primary-light);
    border-radius: 26px;
    transition: background 0.3s, border-color 0.3s;
}

.toggle-switch::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--primary);
    border-radius: 50%;
    transform: translate(0, -50%);
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
    transition: transform 0.3s, background 0.3s;
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch {
    background: var(--primary-light);
    border-color: var(--primary);
}

.toggle-label input[type="checkbox"]:checked + .toggle-switch::after {
    transform: translate(24px, -50%);
    background: var(--primary);
}

.toggle-text {
    margin-left: 4px;
}

/* ===== Address fields collapse animation ===== */
#machineAddressFields.address-fields {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

#machineAddressFields.address-fields.visible {
    max-height: 500px;
    opacity: 1;
}

/* Login Link Container - shown only on first email screen */
.login-link-container {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.login-link-container .login-text {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 12px;
}

.login-link-container .login-button {
    width: 100%;
}
