        /* ── CSS VARIABLER (LJUST TEMA) ── */
        :root {
            --bg-color: #f8fafc;
            --surface-color: #ffffff;
            --card-bg: #ffffff;
            --card-hover: #f1f5f9;
            --card-border: #e2e8f0;
            --card-border-focus: #059669;
            --text-primary: #0f172a;
            --text-secondary: #475569;
            --text-muted: #64748b;
            --accent-color: #059669;
            --accent-hover: #047857;
            --accent-glow: rgba(5, 150, 105, 0.12);
            --cyan-accent: #0284c7;
            --amber-accent: #d97706;
            --purple-accent: #7c3aed;
            --error-color: #dc2626;
            --input-bg: #ffffff;
            --input-border: #cbd5e1;
            --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            --font-heading: 'Oswald', 'Inter', sans-serif;
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 16px;
            --radius-full: 9999px;
            --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.04);
            --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
            --shadow-glow: 0 0 16px rgba(5, 150, 105, 0.14);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-primary);
            font-family: var(--font-main);
            min-height: 100vh;
            line-height: 1.6;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
        }

        /* ── HEADER ── */
        .app-header {
            background: #ffffff;
            border-bottom: 1px solid var(--card-border);
            position: sticky;
            top: 0;
            z-index: 1000;
            padding: 0.9rem 1.5rem;
            box-shadow: var(--shadow-sm);
        }

        .header-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .brand-block {
            display: flex;
            align-items: center;
            gap: 0.9rem;
            text-decoration: none;
            color: inherit;
        }

        .brand-icon {
            width: 44px;
            height: 44px;
            background: linear-gradient(135deg, #059669 0%, #0284c7 100%);
            border-radius: var(--radius-md);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.35rem;
            color: #ffffff;
            box-shadow: 0 3px 10px rgba(5, 150, 105, 0.25);
        }

        .brand-text h1 {
            font-size: 1.15rem;
            font-weight: 800;
            letter-spacing: -0.02em;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .brand-badge {
            font-size: 0.65rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            background: rgba(5, 150, 105, 0.1);
            color: var(--accent-color);
            padding: 2px 8px;
            border-radius: var(--radius-full);
            border: 1px solid rgba(5, 150, 105, 0.25);
        }

        .brand-text p {
            font-size: 0.8rem;
            color: var(--text-secondary);
            font-weight: 500;
        }

        /* Nav Tabs */
        .nav-tabs {
            display: flex;
            gap: 0.4rem;
            background: #f1f5f9;
            padding: 4px;
            border-radius: var(--radius-md);
            border: 1px solid var(--card-border);
        }

        .tab-btn {
            background: transparent;
            border: none;
            color: var(--text-secondary);
            font-family: inherit;
            font-size: 0.88rem;
            font-weight: 600;
            padding: 8px 16px;
            border-radius: var(--radius-sm);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 7px;
            transition: all 0.2s ease;
            min-height: 40px;
        }

        .tab-btn:hover {
            color: var(--text-primary);
            background: #e2e8f0;
        }

        .tab-btn.active {
            background: var(--accent-color);
            color: #ffffff;
            font-weight: 700;
            box-shadow: 0 2px 6px rgba(5, 150, 105, 0.3);
        }

        /* Status Pill */
        .header-meta {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .status-pill {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 12px;
            border-radius: var(--radius-full);
            font-size: 0.75rem;
            font-weight: 600;
            background: rgba(5, 150, 105, 0.08);
            color: #047857;
            border: 1px solid rgba(5, 150, 105, 0.2);
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #059669;
        }

        /* ── MAIN CONTAINER ── */
        .main-wrapper {
            max-width: 1200px;
            margin: 0 auto;
            padding: 2rem 1.25rem 4rem;
            width: 100%;
            flex: 1;
        }

        /* ── HERO BANNER ── */
        .hero-banner {
            background: #ffffff;
            border: 1px solid var(--card-border);
            border-radius: var(--radius-lg);
            padding: 2.25rem;
            margin-bottom: 2rem;
            box-shadow: var(--shadow-sm);
            position: relative;
            overflow: hidden;
        }

        .hero-banner::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: linear-gradient(90deg, var(--accent-color) 0%, var(--cyan-accent) 100%);
        }

        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--cyan-accent);
            background: rgba(2, 132, 199, 0.08);
            padding: 4px 12px;
            border-radius: var(--radius-full);
            border: 1px solid rgba(2, 132, 199, 0.2);
            margin-bottom: 1rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .hero-title {
            font-family: var(--font-heading);
            font-size: 2.1rem;
            font-weight: 700;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            color: var(--text-primary);
            line-height: 1.2;
            margin-bottom: 0.75rem;
        }

        .hero-title span {
            color: var(--accent-color);
        }

        .hero-lead {
            font-size: 1.05rem;
            color: var(--text-secondary);
            max-width: 820px;
            margin-bottom: 1.5rem;
            line-height: 1.6;
        }

        /* KPI Quick Counters */
        .hero-kpis {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 1rem;
            margin-top: 1.25rem;
        }

        .kpi-card {
            background: #f8fafc;
            border: 1px solid var(--card-border);
            border-radius: var(--radius-md);
            padding: 1.1rem 1.25rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            transition: all 0.2s ease;
        }

        .kpi-card:hover {
            border-color: #cbd5e1;
            background: #ffffff;
            box-shadow: var(--shadow-sm);
        }

        .kpi-icon {
            width: 44px;
            height: 44px;
            border-radius: var(--radius-sm);
            background: rgba(5, 150, 105, 0.1);
            color: var(--accent-color);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
        }

        .kpi-icon.blue {
            background: rgba(2, 132, 199, 0.1);
            color: var(--cyan-accent);
        }

        .kpi-icon.purple {
            background: rgba(124, 58, 237, 0.1);
            color: var(--purple-accent);
        }

        .kpi-icon.amber {
            background: rgba(217, 119, 6, 0.1);
            color: var(--amber-accent);
        }

        .kpi-num {
            font-size: 1.7rem;
            font-weight: 800;
            color: var(--text-primary);
            line-height: 1;
        }

        .kpi-label {
            font-size: 0.75rem;
            color: var(--text-secondary);
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            margin-top: 3px;
        }

        /* ── SECTION VIEWS ── */
        .view-section {
            display: none;
            animation: fadeIn 0.2s ease-out forwards;
        }

        .view-section.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(4px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ── SECTION HEADINGS ── */
        .section-header {
            margin-bottom: 1.5rem;
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .section-header h2 {
            font-family: var(--font-heading);
            font-size: 1.6rem;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }

        .section-header p {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-top: 4px;
        }

        /* ── PERIOD SELECTION CARDS ── */
        .period-selection-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 1.25rem;
            margin-bottom: 2rem;
        }

        .period-card {
            background: #ffffff;
            border: 2px solid var(--card-border);
            border-radius: var(--radius-md);
            padding: 1.35rem;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
            box-shadow: var(--shadow-sm);
        }

        .period-card:hover {
            border-color: #94a3b8;
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .period-card.selected {
            border-color: var(--accent-color);
            background: rgba(5, 150, 105, 0.02);
            box-shadow: 0 0 0 1px var(--accent-color), var(--shadow-sm);
        }

        .period-badge-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
        }

        .grade-badge {
            font-size: 0.75rem;
            font-weight: 700;
            padding: 3px 10px;
            border-radius: var(--radius-full);
            letter-spacing: 0.04em;
        }

        .grade-ak1 { background: rgba(2, 132, 199, 0.1); color: #0369a1; border: 1px solid rgba(2, 132, 199, 0.25); }
        .grade-ak2 { background: rgba(124, 58, 237, 0.1); color: #6d28d9; border: 1px solid rgba(124, 58, 237, 0.25); }
        .grade-ak3 { background: rgba(5, 150, 105, 0.1); color: #047857; border: 1px solid rgba(5, 150, 105, 0.25); }
        .period-badge-left { display: inline-flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
        .branch-focus-badge { font-size: 0.78rem; font-weight: 700; padding: 3px 11px; border-radius: var(--radius-full); display: inline-flex; align-items: center; gap: 5px; background: rgba(2, 132, 199, 0.1); color: #0369a1; border: 1px solid rgba(2, 132, 199, 0.28); letter-spacing: 0.01em; }

        .period-weeks-pill {
            font-size: 0.8rem;
            font-weight: 600;
            background: #f1f5f9;
            color: var(--text-secondary);
            padding: 3px 10px;
            border-radius: var(--radius-full);
            display: flex;
            align-items: center;
            gap: 5px;
            border: 1px solid var(--card-border);
        }

        .period-card h3 {
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 0.4rem;
        }

        .period-desc {
            font-size: 0.88rem;
            color: var(--text-secondary);
            margin-bottom: 0.85rem;
            line-height: 1.5;
        }

        .period-meta {
            font-size: 0.8rem;
            color: var(--text-muted);
            border-top: 1px solid var(--card-border);
            padding-top: 0.75rem;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .period-meta i {
            width: 16px;
            color: var(--text-secondary);
        }

        .period-selected-indicator {
            position: absolute;
            top: 12px;
            right: 12px;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: #e2e8f0;
            color: transparent;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            transition: all 0.2s;
        }

        .period-card.selected .period-selected-indicator {
            background: var(--accent-color);
            color: #ffffff;
        }

        /* ── FORM CONTAINER & CARDS ── */
        .form-card {
            background: #ffffff;
            border: 1px solid var(--card-border);
            border-radius: var(--radius-md);
            padding: 1.75rem;
            margin-bottom: 1.5rem;
            box-shadow: var(--shadow-sm);
        }

        .form-card-title {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 1.25rem;
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid var(--card-border);
        }

        .form-card-title i {
            color: var(--accent-color);
            font-size: 1.15rem;
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 1.25rem;
        }

        .form-group {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }

        .form-group.full-width {
            grid-column: 1 / -1;
        }

        label {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .req-star {
            color: var(--error-color);
        }

        .label-hint {
            font-size: 0.75rem;
            color: var(--text-muted);
            font-weight: normal;
        }

        input[type="text"],
        input[type="email"],
        input[type="tel"],
        input[type="number"],
        input[type="date"],
        input[type="password"],
        select,
        textarea {
            width: 100%;
            background: var(--input-bg);
            border: 1px solid var(--input-border);
            border-radius: var(--radius-sm);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.95rem;
            padding: 0.75rem 1rem;
            outline: none;
            transition: all 0.2s ease;
            min-height: 48px;
        }

        textarea {
            min-height: 90px;
            resize: vertical;
        }

        input:focus,
        select:focus,
        textarea:focus {
            border-color: var(--accent-color);
            box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
        }

        /* Stepper input */
        .stepper-container {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            max-width: 240px;
        }

        .stepper-btn {
            width: 48px;
            height: 48px;
            border-radius: var(--radius-sm);
            background: #f1f5f9;
            border: 1px solid var(--input-border);
            color: var(--text-primary);
            font-size: 1.3rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .stepper-btn:hover {
            background: var(--accent-color);
            color: #ffffff;
            border-color: var(--accent-color);
        }

        .stepper-input {
            text-align: center;
            font-size: 1.25rem !important;
            font-weight: 700;
            max-width: 90px;
        }

        /* Checkbox styling */
        .custom-checkbox-label {
            display: flex;
            align-items: flex-start;
            gap: 0.65rem;
            cursor: pointer;
            font-size: 0.9rem;
            color: var(--text-primary);
            user-select: none;
            padding: 6px 0;
        }

        .custom-checkbox-label input[type="checkbox"] {
            width: 20px;
            height: 20px;
            accent-color: var(--accent-color);
            margin-top: 2px;
            cursor: pointer;
        }

        /* Week Chips Container */
        .week-chips-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }

        .week-chip {
            background: #f8fafc;
            border: 1px solid var(--input-border);
            padding: 8px 14px;
            border-radius: var(--radius-full);
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s ease;
            user-select: none;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .week-chip:hover {
            border-color: var(--accent-color);
            color: var(--text-primary);
        }

        .week-chip.selected {
            background: rgba(5, 150, 105, 0.1);
            border-color: var(--accent-color);
            color: #047857;
            font-weight: 700;
        }

        /* Radio Pill Group */
        .radio-pill-group {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 0.75rem;
            margin-top: 0.4rem;
        }

        .radio-pill {
            background: #f8fafc;
            border: 1px solid var(--input-border);
            padding: 12px 16px;
            border-radius: var(--radius-sm);
            cursor: pointer;
            transition: all 0.15s ease;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.88rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .radio-pill:hover {
            border-color: #94a3b8;
            background: #ffffff;
        }

        .radio-pill.selected {
            background: rgba(5, 150, 105, 0.08);
            border-color: var(--accent-color);
            color: #047857;
        }

        .radio-pill input {
            display: none;
        }

        /* ── BUTTONS ── */
        .btn-primary {
            background: var(--accent-color);
            color: #ffffff;
            font-family: inherit;
            font-size: 1.05rem;
            font-weight: 700;
            padding: 1rem 2rem;
            border: none;
            border-radius: var(--radius-sm);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            transition: all 0.2s ease;
            box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
            min-height: 48px;
        }

        .btn-primary:hover {
            transform: translateY(-1px);
            background: var(--accent-hover);
            box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
        }

        .btn-primary:active {
            transform: translateY(0);
        }

        .btn-secondary {
            background: #ffffff;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.95rem;
            font-weight: 600;
            padding: 0.75rem 1.5rem;
            border: 1px solid var(--card-border);
            border-radius: var(--radius-sm);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            transition: all 0.2s ease;
            min-height: 44px;
        }

        .btn-secondary:hover {
            background: #f1f5f9;
            border-color: #cbd5e1;
        }

        .btn-danger {
            background: rgba(220, 38, 38, 0.08);
            color: #b91c1c;
            border: 1px solid rgba(220, 38, 38, 0.25);
        }

        .btn-danger:hover {
            background: rgba(220, 38, 38, 0.16);
            border-color: #dc2626;
        }

        /* ── CONFIRMATION / SUCCESS VIEW ── */
        .success-box {
            text-align: center;
            background: #ffffff;
            border: 2px solid var(--accent-color);
            border-radius: var(--radius-lg);
            padding: 3rem 2rem;
            box-shadow: var(--shadow-md);
            max-width: 680px;
            margin: 2rem auto;
            animation: scaleIn 0.3s ease-out;
        }

        @keyframes scaleIn {
            from { transform: scale(0.97); opacity: 0; }
            to { transform: scale(1); opacity: 1; }
        }

        .success-icon {
            width: 72px;
            height: 72px;
            border-radius: 50%;
            background: rgba(5, 150, 105, 0.1);
            color: var(--accent-color);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2.2rem;
            margin: 0 auto 1.5rem;
            border: 2px solid var(--accent-color);
        }

        .success-box h3 {
            font-size: 1.8rem;
            font-weight: 800;
            color: var(--text-primary);
            margin-bottom: 0.75rem;
        }

        .success-summary {
            background: #f8fafc;
            border: 1px solid var(--card-border);
            border-radius: var(--radius-md);
            padding: 1.25rem;
            text-align: left;
            margin: 1.5rem 0;
            font-size: 0.9rem;
            line-height: 1.7;
        }

