
        .topnav-group {
            position: relative;
        }

        .topbar-heading {
            display: flex;
            flex: 0 0 auto;
            align-items: center;
            gap: 14px;
        }

        .topnav-toggle {
            display: none;
            align-items: center;
            justify-content: center;
            gap: 7px;
            min-height: 39px;
            padding: 0 12px;
            border: 1px solid #bfdbfe;
            border-radius: 10px;
            color: #1d4ed8;
            background: #eff6ff;
            font: inherit;
            font-size: 12px;
            font-weight: 850;
            cursor: pointer;
        }

        .topnav-toggle-icon {
            font-size: 18px;
            font-weight: 500;
            line-height: 1;
        }

        .topnav>a,
        .topnav-group>summary {
            min-height: 32px;
            padding: 7px 9px;
            border-radius: 9px;
        }

        .topnav>a:hover {
            background: #eff6ff;
        }

        .topnav-logout-form {
            display: inline-flex;
            margin: 0;
        }

        .topnav-logout-button {
            min-height: 32px;
            padding: 7px 9px;
            border: 0;
            border-radius: 9px;
            color: var(--gray);
            background: transparent;
            font: inherit;
            cursor: pointer;
        }

        .topnav-logout-button:hover {
            color: var(--primary);
            background: #eff6ff;
        }

        .topnav>a.active,
        .topnav-group.has-active>summary {
            background: #dbeafe;
            color: var(--primary-dark);
            font-weight: 800;
        }

        .topnav>a.topnav-notification-link {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .topnav-notification-badge {
            display: inline-flex;
            min-width: 19px;
            height: 19px;
            align-items: center;
            justify-content: center;
            padding: 0 5px;
            border-radius: 999px;
            color: #ffffff;
            background: #ef4444;
            font-size: 10px;
            font-weight: 900;
            line-height: 1;
        }

        .topnav-notification-badge[hidden] {
            display: none;
        }

        .topnav-group>summary {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            color: var(--gray);
            font-size: 14px;
            cursor: pointer;
            list-style: none;
            user-select: none;
        }

        .topnav-group>summary::-webkit-details-marker {
            display: none;
        }

        .topnav-group>summary::after {
            content: "▾";
            font-size: 10px;
        }

        .topnav-group[open]>summary,
        .topnav-group>summary:hover {
            background: #eff6ff;
            color: var(--primary);
        }

        .topnav-dropdown {
            position: absolute;
            z-index: 1000;
            top: calc(100% + 13px);
            right: 0;
            display: grid;
            width: 225px;
            padding: 8px;
            border: 1px solid var(--border);
            border-radius: 14px;
            background: var(--white);
            box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
        }

        .topnav .topnav-dropdown a {
            padding: 10px 11px;
            border-radius: 9px;
            color: #475569;
            font-size: 13px;
            white-space: nowrap;
        }

        .topnav .topnav-dropdown a:hover {
            background: #eff6ff;
            color: var(--primary);
        }

        .company-switcher,
        .company-context {
            display: flex;
            align-items: center;
            gap: 6px;
            min-height: 38px;
            margin: 0;
            padding: 4px;
            border: 1px solid #bfdbfe;
            border-radius: 11px;
            background: #eff6ff;
        }

        .company-switcher select {
            width: 170px;
            min-height: 30px;
            padding: 5px 8px;
            overflow: hidden;
            border: 0;
            border-radius: 7px;
            outline: none;
            color: #1e3a8a;
            background: transparent;
            font-size: 12px;
            font-weight: 750;
            text-overflow: ellipsis;
        }

        .company-switcher select:focus {
            box-shadow: 0 0 0 2px #93c5fd;
        }

        .company-switcher button {
            min-height: 30px;
            padding: 5px 9px;
            border: 0;
            border-radius: 7px;
            color: #ffffff;
            background: var(--primary);
            font-size: 12px;
            font-weight: 800;
            cursor: pointer;
        }

        .company-switcher button:hover {
            background: var(--primary-dark);
        }

        .company-context {
            display: grid;
            gap: 1px;
            min-width: 130px;
            padding: 5px 10px;
            line-height: 1.2;
        }

        .company-context span {
            color: #64748b;
            font-size: 9px;
            font-weight: 800;
            letter-spacing: .05em;
            text-transform: uppercase;
        }

        .company-context strong {
            max-width: 165px;
            overflow: hidden;
            color: #1e3a8a;
            font-size: 12px;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .viewer-mode-banner {
            margin: 12px 32px 0;
            padding: 11px 15px;
            border: 1px solid #bfdbfe;
            border-radius: 12px;
            color: #1e40af;
            background: #eff6ff;
            font-size: 13px;
            font-weight: 700;
            line-height: 1.5;
            text-align: center;
        }

        .viewer-readonly-form {
            opacity: .72;
        }

        .viewer-readonly-form [disabled] {
            cursor: not-allowed !important;
        }

        @media (max-width: 1180px) {
            .topbar {
                height: auto;
                min-height: 72px;
                gap: 18px;
                padding: 12px 24px;
            }

            .topnav {
                justify-content: flex-end;
                flex-wrap: wrap;
                gap: 12px 15px;
            }
        }

        @media (max-width: 760px) {
            .topbar {
                align-items: flex-start;
                flex-direction: column;
                padding: 14px 18px;
            }

            .topbar-heading {
                width: 100%;
                justify-content: space-between;
            }

            .topbar.mobile-navigation-ready .topnav-toggle {
                display: inline-flex;
            }

            .topnav {
                width: 100%;
                flex-direction: column;
                align-items: stretch;
                justify-content: flex-start;
                gap: 6px;
                padding-top: 4px;
            }

            .topbar.mobile-navigation-ready .topnav {
                display: none;
            }

            .topbar.mobile-navigation-ready .topnav.is-open {
                display: flex;
            }

            .topnav>a,
            .topnav-group>summary,
            .topnav-logout-button {
                display: flex;
                width: 100%;
                min-height: 40px;
                align-items: center;
                box-sizing: border-box;
            }

            .topnav-group>summary {
                justify-content: space-between;
            }

            .topnav-dropdown {
                position: static;
                width: auto;
                margin-top: 5px;
                border-radius: 11px;
                box-shadow: none;
            }

            .topnav-logout-form {
                display: flex;
                width: 100%;
            }

            .company-switcher {
                width: 100%;
                box-sizing: border-box;
            }

            .company-switcher select {
                flex: 1;
                width: auto;
            }

            .company-context {
                width: 100%;
                box-sizing: border-box;
            }

            .company-context strong {
                max-width: 100%;
            }

            .viewer-mode-banner {
                margin: 10px 18px 0;
            }
        }

        /* Yeni, daha dengeli ve modül dostu üst menü düzeni */
        .topbar {
            position: sticky;
            z-index: 1100;
            top: 0;
            height: 76px;
            min-height: 76px;
            justify-content: flex-start;
            gap: 22px;
            padding: 0 28px;
            border-bottom-color: #e2e8f0;
            background: rgba(255, 255, 255, .97);
            box-shadow: 0 4px 18px rgba(15, 23, 42, .045);
            backdrop-filter: blur(12px);
        }

        .topbar-heading {
            min-width: max-content;
        }

        .topbar .brand {
            flex: 0 0 auto;
            gap: 10px;
            white-space: nowrap;
        }

        .topbar .brand-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            box-shadow: 0 8px 20px rgba(31, 111, 235, .20);
        }

        .topbar .brand strong {
            color: #0f172a;
            font-size: 17px;
            letter-spacing: -.02em;
        }

        .topbar .brand span {
            margin-top: 1px;
            color: #64748b;
            font-size: 12px;
        }

        .topnav {
            display: flex;
            flex: 1 1 auto;
            min-width: 0;
            align-items: center;
            justify-content: flex-start;
            gap: 14px;
        }

        .topnav-company,
        .topnav-primary,
        .topnav-actions {
            display: flex;
            align-items: center;
        }

        .topnav-company {
            flex: 0 0 auto;
        }

        .topnav-primary {
            min-width: 0;
            margin-left: auto;
            gap: 3px;
        }

        .topnav-actions {
            flex: 0 0 auto;
            margin-left: auto;
            gap: 4px;
            padding-left: 12px;
            border-left: 1px solid #e2e8f0;
        }

        .topnav .topnav-link,
        .topnav .topnav-action,
        .topnav-group>summary,
        .topnav-logout-button {
            display: inline-flex;
            min-height: 38px;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
            color: #64748b;
            font-family: inherit;
            font-size: 13px;
            font-weight: 650;
            line-height: 1;
            white-space: nowrap;
            transition: color .18s ease,
                background-color .18s ease,
                box-shadow .18s ease,
                transform .18s ease;
        }

        .topnav .topnav-link {
            padding: 0 10px;
        }

        .topnav .topnav-action,
        .topnav-logout-button {
            width: 40px;
            padding: 0;
            border: 0;
            background: transparent;
        }

        .topnav .topnav-link:hover,
        .topnav .topnav-action:hover,
        .topnav-group>summary:hover,
        .topnav-group[open]>summary,
        .topnav-logout-button:hover {
            color: #1d4ed8;
            background: #eff6ff;
        }

        .topnav .topnav-link:focus-visible,
        .topnav .topnav-action:focus-visible,
        .topnav-group>summary:focus-visible,
        .topnav-logout-button:focus-visible,
        .topnav-toggle:focus-visible {
            outline: 3px solid rgba(59, 130, 246, .28);
            outline-offset: 2px;
        }

        .topnav .topnav-link.active,
        .topnav .topnav-action.active,
        .topnav-group.has-active>summary {
            color: #174ea6;
            background: #dbeafe;
            box-shadow: inset 0 0 0 1px #bfdbfe;
            font-weight: 800;
        }

        .topnav-icon {
            width: 18px;
            height: 18px;
            flex: 0 0 auto;
            fill: none;
            stroke: currentColor;
            stroke-linecap: round;
            stroke-linejoin: round;
            stroke-width: 1.8;
        }

        .topnav-action-label,
        .topnav-logout-label {
            display: none;
        }

        .topnav .topnav-notification-link {
            position: relative;
            gap: 8px;
        }

        .topnav-notification-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            min-width: 18px;
            height: 18px;
            padding: 0 4px;
            border: 2px solid #ffffff;
            box-shadow: 0 2px 5px rgba(239, 68, 68, .25);
        }

        .topnav-group>summary {
            gap: 7px;
            min-height: 38px;
            padding: 0 10px;
            font-size: 13px;
            font-weight: 700;
        }

        .topnav-group>summary::after {
            margin-left: 1px;
            transition: transform .18s ease;
        }

        .topnav-group[open]>summary::after {
            transform: rotate(180deg);
        }

        .topnav-dropdown {
            top: calc(100% + 10px);
            width: 232px;
            padding: 7px;
            border-color: #e2e8f0;
            box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
        }

        .topnav .topnav-dropdown a {
            min-height: 39px;
            padding: 10px 11px;
            font-size: 13px;
            font-weight: 600;
        }

        .topnav .topnav-dropdown a.active {
            color: #174ea6;
            background: #dbeafe;
            font-weight: 800;
        }

        .company-switcher,
        .company-context {
            min-height: 44px;
            border-color: #bfdbfe;
            border-radius: 12px;
            background: linear-gradient(135deg, #eff6ff, #f8fbff);
            box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65);
        }

        .company-context {
            min-width: 128px;
            padding: 6px 10px;
        }

        .company-context span {
            color: #64748b;
            font-size: 9px;
            letter-spacing: .07em;
        }

        .company-context strong {
            max-width: 150px;
            color: #1e3a8a;
            font-size: 12px;
        }

        .company-switcher select {
            width: 160px;
        }

        .topnav-toggle {
            min-width: 42px;
            min-height: 42px;
            padding: 0 12px;
            border-radius: 11px;
        }

        @media (max-width: 1390px) {
            .topbar {
                gap: 16px;
                padding: 0 18px;
            }

            .topnav {
                gap: 9px;
            }

            .topnav-primary {
                gap: 1px;
            }

            .topnav .topnav-link {
                padding: 0 8px;
                font-size: 12.5px;
            }

            .topnav-actions {
                padding-left: 9px;
            }

            .company-context {
                min-width: 120px;
            }

            .company-context strong {
                max-width: 135px;
            }
        }

        @media (max-width: 1180px) {
            .topbar {
                position: sticky;
                height: 68px;
                min-height: 68px;
                align-items: center;
                flex-direction: row;
                gap: 0;
                padding: 0 20px;
            }

            .topbar-heading {
                width: 100%;
                justify-content: space-between;
            }

            .topbar.mobile-navigation-ready .topnav-toggle {
                display: inline-flex;
            }

            .topnav {
                position: absolute;
                z-index: 1200;
                top: calc(100% + 8px);
                right: 20px;
                left: 20px;
                display: flex;
                width: auto;
                max-width: none;
                max-height: calc(100vh - 96px);
                align-items: stretch;
                flex-direction: column;
                flex-wrap: nowrap;
                justify-content: flex-start;
                gap: 10px;
                padding: 12px;
                overflow-x: hidden;
                overflow-y: auto;
                overscroll-behavior: contain;
                border: 1px solid #dbe3ee;
                border-radius: 16px;
                background: #ffffff;
                box-shadow: 0 22px 55px rgba(15, 23, 42, .18);
            }

            .topbar.mobile-navigation-ready .topnav {
                display: none;
            }

            .topbar.mobile-navigation-ready .topnav.is-open {
                display: flex;
            }

            .topnav-company,
            .topnav-primary,
            .topnav-actions {
                width: 100%;
                min-width: 0;
                max-width: 100%;
                flex: 0 0 auto;
                margin-left: 0;
                align-items: stretch;
                flex-direction: column;
            }

            .topnav-primary {
                gap: 4px;
            }

            .topnav-actions {
                gap: 4px;
                padding: 10px 0 0;
                border-top: 1px solid #e2e8f0;
                border-left: 0;
            }

            .topnav .topnav-link,
            .topnav .topnav-action,
            .topnav-group>summary,
            .topnav-logout-button {
                width: 100%;
                min-height: 42px;
                justify-content: flex-start;
                gap: 10px;
                padding: 0 12px;
                box-sizing: border-box;
                font-size: 13px;
            }

            .topnav-action-label,
            .topnav-logout-label {
                display: inline;
            }

            .topnav .topnav-notification-link {
                position: static;
            }

            .topnav-notification-badge {
                position: static;
                margin-left: auto;
                border-width: 0;
            }

            .topnav-group,
            .topnav-logout-form {
                width: 100%;
            }

            .topnav-group>summary {
                justify-content: flex-start;
            }

            .topnav-group>summary::after {
                margin-left: auto;
            }

            .topnav-dropdown {
                position: static;
                width: auto;
                margin-top: 5px;
                border-radius: 11px;
                box-shadow: none;
            }

            .company-switcher,
            .company-context {
                width: 100%;
                box-sizing: border-box;
            }

            .company-switcher select {
                flex: 1;
                width: auto;
                min-width: 0;
            }

            .company-context strong {
                max-width: 100%;
            }
        }

        @media (max-width: 520px) {
            .topbar {
                padding: 0 14px;
            }

            .topbar .brand strong {
                font-size: 16px;
            }

            .topbar .brand-icon {
                width: 38px;
                height: 38px;
            }

            .topnav {
                right: 12px;
                left: 12px;
            }

            .topnav-toggle {
                padding: 0 10px;
            }

            .viewer-mode-banner {
                margin: 10px 14px 0;
            }
        }
    