/* 
 * Kommunale Exzellenz - Shared Brand Styles
 * For all products and sites within the Kommunale Exzellenz Suite
 */

/* Local Inter Font Declarations */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300;
    font-display: swap;
    src: url('../fonts/Inter-Light.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('../fonts/Inter-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/Inter-Bold.woff2') format('woff2');
}

/* CSS Variables - Layout-specific */
:root {
    /* Layout Variables */
    --header-height: auto;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;

    /* Shadows */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    margin: 0;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: 700;
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-gray);
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.container-sm {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.card {
    background: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.header-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: var(--spacing-md) 0;
    text-align: center;
}

.header-section h1 {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.header-section p {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--font-size-lg);
}

/* Form Components */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.form-input {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 61, 131, 0.1);
}

.form-input::placeholder {
    color: var(--text-light);
}

/* Date Input Field */
.edit-form-field {
    margin-bottom: var(--spacing-md);
}

.date-input {
    max-width: 200px;
}

/* User Assignment Field */
.edit-form-user-assignment {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm) 0;
}

.field-help-text {
    color: var(--text-dark);
    font-size: var(--font-size-sm);
    margin: var(--spacing-xs) 0;
}

.user-assignment-display {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: flex-start; /* Prevent stretching */
}

.user-assignment-btn {
    margin-top: var(--spacing-xs);
    width: auto; /* Don't fill container */
    align-self: flex-start; /* Align to start, not stretch */
}

/* Button Components - REMOVED */
/* Buttons belong in content area CSS files (entwicklung.css, organisation.css, etc.) */
/* NOT in the site template CSS (basis.css) */

/* Alert Components */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.alert-error {
    background-color: #fed7d7;
    border: 1px solid #feb2b2;
    color: var(--error-red);
}

.alert-success {
    background-color: #c6f6d5;
    border: 1px solid #9ae6b4;
    color: var(--success-green);
}

.alert-info {
    background-color: #bee3f8;
    border: 1px solid #90cdf4;
    color: var(--primary-color);
}

/* Error List Styling */
.error-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-list li {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid #feb2b2;
}

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

/* Navigation */
.nav-brand {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-brand .accent {
    color: var(--accent-color);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-color);
}

.text-accent {
    color: var(--accent-color);
}

.text-success {
    color: var(--success-green);
}

.text-muted {
    color: var(--text-gray);
}

/* Font Size Utilities */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }

/* Grid Utilities */
.grid {
    display: grid;
}

.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.grid-auto-fill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

/* Hierarchical Display Components */

/* Margin Utilities */
.m-0 { margin: 0; }
.m-sm { margin: var(--spacing-sm); }
.m-md { margin: var(--spacing-md); }
.m-lg { margin: var(--spacing-lg); }
.m-xl { margin: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.ml-0 { margin-left: 0; }
.ml-sm { margin-left: var(--spacing-sm); }
.ml-md { margin-left: var(--spacing-md); }
.ml-lg { margin-left: var(--spacing-lg); }
.ml-xl { margin-left: var(--spacing-xl); }

.mr-0 { margin-right: 0; }
.mr-sm { margin-right: var(--spacing-sm); }
.mr-md { margin-right: var(--spacing-md); }
.mr-lg { margin-right: var(--spacing-lg); }
.mr-xl { margin-right: var(--spacing-xl); }

/* Display Utilities */
.inline { display: inline; }
.inline-block { display: inline-block; }
.block { display: block; }
.hidden { display: none; }

.bg-white {
    background-color: var(--background-white);
}

.bg-light {
    background-color: var(--background-light);
}

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

/* Professional German Municipal Aesthetic */
.municipal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: var(--spacing-md) 0;
    position: relative;
}

.municipal-header .nav-brand {
    color: white;
}

.municipal-header .nav-brand .accent {
    color: var(--accent-color);
}

.municipal-header h1, 
.municipal-header h2, 
.municipal-header h3, 
.municipal-header h4, 
.municipal-header h5, 
.municipal-header h6 {
    color: white;
}

.municipal-header p {
    color: white;
    opacity: 0.9;
}

.municipal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-color);
}

.municipal-card {
    background: var(--background-white);
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

/* Responsive Design */

/* ========================================
 * APP LAYOUT SYSTEM - Kommunale Exzellenz Suite
 * ======================================== */

/* Top Header */
.top-header {
    background: var(--primary-color);
    color: white;
    padding: var(--spacing-xs) var(--spacing-sm);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    grid-area: header;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: none;
    gap: var(--spacing-md);
}

/* Header Icon Actions */
.header-actions {
    display: none; /* Hidden on mobile by default */
    align-items: center;
    gap: var(--spacing-xs);
}

.header-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: var(--spacing-sm);
    color: white;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.header-icon-btn:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

.header-icon-btn svg {
    flex-shrink: 0;
}

/* Header notification badge - matches sidebar nav-badge styling */
.header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    font-size: 0.8125rem;
    font-weight: 700;
    background: white;
    color: var(--primary-color, #003D83);
    border: 1px solid var(--primary-color, #003D83);
    line-height: 1;
}

/* Circle badge for single/double digit numbers */
.header-badge-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    padding: 0;
}

/* Pill badge for longer text like "3 / 15" */
.header-badge-pill {
    padding: 3px 8px;
    border-radius: 12px;
}

.user-info-header {
    display: none; /* Hidden on mobile */
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.user-info-header .user-name {
    color: var(--accent-color);
    font-weight: 600;
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-xs);
}

.user-info-header .tenant-name {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-xs);
}

/* Menu Toggle Button (was sidebar-toggle) */
.menu-toggle {
    background: none;
    border: none;
    color: white;
    padding: var(--spacing-md);
    min-height: 44px;
    min-width: 44px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.menu-toggle:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

/* Classic Hamburger Menu */
.hamburger {
    width: 24px;
    height: 18px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: white;
    border-radius: 1px;
    transition: all 0.3s ease;
}

/* Perfect X Animation */
.menu-toggle.active .hamburger span:nth-child(1) {
    transform: rotate(45deg);
    position: absolute;
    top: 50%;
    margin-top: -1px;
}

.menu-toggle.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    position: absolute;
    top: 50%;
    margin-top: -1px;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.brand {
    font-weight: 700;
    font-size: var(--font-size-sm);
    letter-spacing: 0.5px;
    color: var(--accent-color);
    text-decoration: none;
}

.brand:hover {
    color: var(--accent-color);
    opacity: 0.9;
}

.tenant-separator {
    margin: 0 var(--spacing-xs);
    opacity: 0.6;
    font-weight: 400;
    color: var(--accent-color);
}

.tenant-name {
    font-weight: 400;
    font-size: var(--font-size-xs);
    opacity: 0.9;
    color: var(--accent-color);
    text-decoration: none;
}

.tenant-name:hover {
    opacity: 1;
    text-decoration: underline;
}

.page-title {
    font-weight: 500;
    font-size: var(--font-size-base);
    color: var(--accent-color);
}

.user-actions {
    display: flex;
    align-items: center;
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-menu-toggle {
    background: none;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background-color 0.2s;
    width: 32px;
    height: 32px;
}

.user-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    color: var(--text-dark);
    min-width: 220px;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-gray);
    z-index: 1001;
}

.dropdown-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-gray);
    background: var(--background-light);
}

.user-info {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xs);
}

.tenant-info {
    font-size: var(--font-size-sm);
    color: var(--text-gray);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-gray);
    margin: var(--spacing-xs) 0;
}

.user-dropdown.hidden {
    display: none;
}

.dropdown-item {
    display: block;
    padding: var(--spacing-md);
    text-decoration: none;
    color: var(--text-dark);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background: var(--background-light);
}

.dropdown-form {
    margin: 0;
}

/* Mobile Menu Toggle - Removed (mobile-only layout) */

/* CSS Grid App Layout - Mobile First (0-599px) */
.app-layout {
    display: grid;
    grid-template-areas: 
        "header"
        "main"
        "footer";
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

/* When hamburger is clicked, show sidebar only */
.app-layout.menu-open {
    grid-template-areas: 
        "header"
        "sidebar"
        "main"
        "footer";
    grid-template-rows: auto auto 1fr auto;
}

/* Profile section removed - merged into sidebar */

/* Reduce spacing between nav-sections in profile */
.profile-section .nav-section {
    margin-bottom: var(--spacing-sm); /* Minimal gap */
}

.profile-section .nav-section:not(:first-child) {
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-gray);
}

.profile-section.open {
    display: block; /* Show when menu clicked */
}

/* User Display Section - Non-clickable info display */
.profile-section .nav-user-info .nav-item.user-display {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--spacing-sm);
    background: none;
    cursor: default;
    margin-bottom: 0;
}

.profile-section .nav-user-info .nav-item.user-display:hover {
    background: none; /* No hover effect for info display */
}

.profile-section .nav-user-info .user-name {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.profile-section .nav-user-info .tenant-name {
    color: var(--text-gray);
    font-size: var(--font-size-sm);
}

/* Logout button styling to match nav-item */
.profile-section .logout-form {
    margin: 0;
    width: 100%;
}

.profile-section .logout-btn {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    text-align: left;
}

/* Sidebar - Simple Grid Item */
.sidebar {
    display: none; /* Hidden by default */
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
        "dashboard"
        "products"
        "profile"
        "spacer";
    gap: var(--spacing-sm);
    background: var(--background-light);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    margin: var(--spacing-sm);
    grid-area: sidebar;
    overflow-y: auto;
}

.sidebar.open {
    display: grid; /* Show as grid when hamburger clicked */
}

/* Sidebar Overlay - Not needed with grid approach */

.nav-section {
    padding: 4px;
    background: var(--background-white);
    border: 1px solid var(--border-gray);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Grid area assignments for each section */
.nav-dashboard {
    grid-area: dashboard;
}

.nav-products {
    grid-area: products;
}

.nav-profile {
    grid-area: profile;
}

/* Grid gap handles spacing, no margin needed */

.nav-section:not(:first-child) {
    /* Border already handled by individual container styling */
}


/* Navigation Items */
.nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-sm);
    min-height: 44px;
    width: 100%;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

/* Button-specific overrides for toggle buttons */
button.nav-item {
    background: none;
    border: none;
    cursor: pointer;
    justify-content: space-between;
    font-size: var(--font-size-base);
}

/* Single line product names in navigation - clean and professional */
.sidebar .nav-product .nav-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    white-space: nowrap; /* Prevent any line breaking */
    text-align: left;
}

/* Navigation notification badge */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 700;
    background: white;
    color: var(--primary-color, #003D83);
    border: 1px solid var(--primary-color, #003D83);
    line-height: 1;
}

/* Circle badge for single/double digit numbers */
.nav-badge-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    padding: 0;
}

/* Pill badge for longer text like "3 / 15" */
.nav-badge-pill {
    padding: 3px 8px;
    border-radius: 12px;
}

.nav-item:hover .nav-badge,
.nav-item:focus .nav-badge,
.nav-item.active .nav-badge {
    background: white;
    color: var(--primary-color, #003D83);
    border-color: var(--primary-color, #003D83);
}


.nav-item:hover {
    background: #003D83;
    color: white;
    transition: all 0.15s ease-out;
}

.nav-item:focus {
    background: #003D83;
    color: white;
    outline: none;
}

.nav-item.active {
    background: #003D83;
    color: white;
}

/* Ensure text and icons are white on hover and active states */
.sidebar .nav-item:hover .nav-text,
.sidebar .nav-item:hover .nav-icon,
.sidebar .nav-item:focus .nav-text,
.sidebar .nav-item:focus .nav-icon,
.sidebar .nav-item.active .nav-text,
.sidebar .nav-item.active .nav-icon {
    color: white;
}

/* User & Tenant Info styling */
.nav-item.nav-info {
    cursor: default;
    color: var(--text-gray);
    height: 80px; /* Fixed height for perfect alignment with main content headers */
}

.nav-item.nav-info:hover {
    background: none;
    color: var(--text-gray);
}

/* User & Tenant Info inner structure */
.user-tenant-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.user-tenant-info .user-name {
    font-weight: 500;
    color: var(--text-dark);
}

.user-tenant-info .tenant-name {
    font-size: var(--font-size-sm);
    color: var(--text-gray);
}

.nav-icon {
    font-size: var(--font-size-lg);
    width: 24px;
    text-align: center;
}

/* Product Navigation */
.nav-product:not(:last-child) {
    margin-bottom: 3px;
}

button.nav-item:hover {
    background: #003D83;
    color: white;
}

/* ✅ FIX: Only show blue background on keyboard focus (tab), not on mouse click */
button.nav-item:focus {
    outline: none;  /* Remove default outline */
}

button.nav-item:focus-visible {
    background: #003D83;
    color: white;
    outline: 2px solid white;  /* Visual indicator for keyboard navigation */
    outline-offset: -2px;
}

/* Ensure text is white on hover and keyboard focus for toggle buttons */
.sidebar button.nav-item:hover .nav-text,
.sidebar button.nav-item:focus-visible .nav-text {
    color: white;
}

button.nav-item .nav-text {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.expand-icon {
    transition: transform 0.2s;
    width: 16px;
    height: 16px;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.expand-icon.rotated {
    transform: rotate(90deg);
}

/* Submenu */
.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-left: var(--spacing-xl);
    margin-top: var(--spacing-xs);
}

.nav-submenu.expanded {
    max-height: fit-content;
}

.nav-subitem {
    display: block;
    padding: var(--spacing-sm);
    min-height: 44px;
    display: flex;
    align-items: center;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    font-size: var(--font-size-sm);
}

.nav-subitem:not(:last-child) {
    margin-bottom: var(--spacing-xs);
}

.nav-subitem:hover {
    background: #003D83;
    color: white;
}

.nav-subitem:focus {
    background: #003D83;
    color: white;
    outline: none;
}

.nav-subitem.active {
    background: #003D83;
    color: white;
}

/* Ensure text is white on hover, focus and active for subitems */
.sidebar .nav-subitem:hover .nav-text,
.sidebar .nav-subitem:focus .nav-text,
.sidebar .nav-subitem.active .nav-text {
    color: white;
}


.external-icon {
    width: 16px;
    height: 16px;
}

/* Main Content */
.main-content {
    background: var(--background-light);
    margin: var(--spacing-sm);
    grid-area: main;
}

/* Footer */
.app-footer {
    background: var(--background-white);
    border-top: 1px solid var(--border-gray);
    padding: var(--spacing-sm) var(--spacing-md);
    grid-area: footer;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.footer-brand {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.footer-version {
    font-size: var(--font-size-xs);
    color: var(--text-gray);
    background: var(--background-light);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
}

.footer-right {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary-color);
}

/* ============================================
 * BREAKPOINT 1: SMALL TABLET (600px+) 
 * ============================================ */
@media (min-width: 600px) {
    /* Future: Enhanced layout for small tablets */
    /* Currently: Keep mobile layout for all sizes */
}

/* Mobile sticky sidebar when opened */
@media (max-width: 899px) {
    .sidebar {
        position: sticky;
        top: 58px;
    }
}

/* ============================================
 * BREAKPOINT 2: DESKTOP (900px+)
 * ============================================ */
@media (min-width: 900px) {
    /* 2-column grid layout */
    .app-layout {
        display: grid;
        grid-template-columns: 300px 1fr;
        grid-template-areas:
            "header header"
            "sidebar main"
            "footer footer";
        grid-template-rows: auto 1fr auto;
        min-height: 100vh;
    }

    /* Hide hamburger button - everything visible */
    .menu-toggle {
        display: none;
    }

    /* Show header icon actions on desktop */
    .header-actions {
        display: flex;
    }

    /* Show sidebar permanently as grid */
    .sidebar {
        display: grid;
    }

    /* Reset any menu-open specific styling */
    .app-layout.menu-open {
        grid-template-areas: 
            "header header"
            "sidebar main"
            "footer footer";
        grid-template-rows: auto 1fr auto;
    }

    /* Footer spans both columns */
    .app-footer {
        grid-area: footer;
    }
}

/* Template Development Page - Only for /basis/template */
.template-dev-content-area {
    background-color: #e3f2fd;
    border: 2px dashed #1976d2;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.template-dev-title {
    color: #1976d2;
    margin-bottom: 1rem;
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.template-dev-text {
    color: #1976d2;
    margin: 0;
    font-size: var(--font-size-base);
}

/* Print Styles */
/* ============================================
 * PRINT STYLES - Basic print optimization
 * TODO: Needs rework for better municipal document printing
 * ============================================ */
@media print {
    .top-header,
    .sidebar,
    .app-footer {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        padding: 0;
        background: white;
    }
    
    .btn, .form-input {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--border-gray);
    }
}

/* ========================================
   Utility Classes
   ======================================== */

/* Visibility utilities - used across all products */
.hidden {
    display: none;
}

.visible {
    display: block;
}

.flex-visible {
    display: flex;
}

/* Empty State Component - used when no data available */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-gray);
}

/* Base Animations - used across products */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* ========================================
   Modal Component - Generic across products
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--background-white);
    margin: 2% auto;
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-gray);
    background: var(--background-light);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-gray);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-gray);
    background: var(--background-light);
}

/* ========================================
   Toggle Switch Component - Used by template-list and generic UI
   ======================================== */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: background-color 0.3s ease;
    border-radius: 12px;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: transform 0.3s ease;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

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

.toggle-switch input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(26px);
}

.toggle-text {
    font-size: var(--font-size-sm);
    color: var(--text-dark);
    font-weight: 500;
}

.toggle-badge {
    margin-left: var(--spacing-xs);
    color: var(--text-gray);
    font-weight: 400;
    font-size: var(--font-size-sm);
}
/* ==============================================
   API Token Management Styles
   ============================================== */

/* Token List Container */
.api-token-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

/* Token Card (similar to hierarchical item but simpler) */
.api-token-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.api-token-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Token Card Header */
.api-token-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    margin-bottom: 12px;
}

.api-token-name {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
}

.api-token-description {
    font-size: 14px;
    color: #6B7280;
    margin: 4px 0 0 0;
}

/* Token String Display */
.api-token-display {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 10px 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    margin-top: 12px;
}

.api-token-masked {
    color: #374151;
    flex: 1;
}

.api-token-copy-btn {
    background: #3B82F6;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.api-token-copy-btn:hover {
    background: #2563EB;
}

/* Token Metadata */
.api-token-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #E5E7EB;
}

.api-token-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.api-token-meta-label {
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
}

.api-token-meta-value {
    font-size: 14px;
    color: #1F2937;
}

/* Status Badge */
.api-status-active {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #DEF7EC;
    color: #03543F;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.api-status-active::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #03543F;
    border-radius: 50%;
}

.api-status-disabled {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #FDE8E8;
    color: #9B1C1C;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.api-status-disabled::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #9B1C1C;
    border-radius: 50%;
}

.api-status-expired {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #FEF3C7;
    color: #92400E;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Scope Badges */
.api-scope-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #E0E7FF;
    color: #3730A3;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

/* Token Actions */
.api-token-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* CORS Whitelist Section */
.api-cors-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

.api-cors-header {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
}

.api-cors-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.api-cors-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 8px 12px;
}

.api-cors-url {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #374151;
}

.api-cors-remove-btn {
    background: #EF4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.2s;
}

.api-cors-remove-btn:hover {
    background: #DC2626;
}

/* CORS Add Form */
.api-cors-add-form {
    display: flex;
    gap: 8px;
}

.api-cors-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 14px;
}

.api-cors-input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Empty State */
.api-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6B7280;
}

.api-empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.api-empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
}

.api-empty-state-text {
    font-size: 14px;
    margin-bottom: 24px;
}

/* Statistics Cards */
.api-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.api-stat-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
}

.api-stat-label {
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
    margin-bottom: 8px;
}

.api-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
}

.api-stat-change {
    font-size: 12px;
    color: #6B7280;
    margin-top: 4px;
}

/* Modal Styles - Removed duplicate (primary definition at line 1212) */

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group small {
    display: block;
    font-size: 12px;
    color: #6B7280;
    margin-top: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .api-token-meta {
        grid-template-columns: 1fr;
    }

    .api-stats-grid {
        grid-template-columns: 1fr;
    }

    .api-cors-add-form {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        max-width: none;
    }
}

/* ==============================================
   API Monitoring Section (Collapsible)
   ============================================== */

.api-monitoring-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

.api-monitoring-toggle {
    width: 100%;
    padding: 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
}

.api-monitoring-toggle:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.api-monitoring-toggle-icon {
    font-size: 12px;
    color: #6B7280;
}

.api-monitoring-toggle-text {
    flex: 1;
}

.api-monitoring-content {
    margin-top: 16px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: 6px;
}

.api-monitoring-loading {
    text-align: center;
    padding: 24px;
    color: #6B7280;
    font-size: 14px;
}

/* Statistics Cards Grid */
.api-monitoring-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.api-monitoring-stat-card {
    background: white;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
}

.api-monitoring-stat-label {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 8px;
}

.api-monitoring-stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
}

/* Section Titles */
.api-monitoring-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

/* Recent Requests Table */
.api-monitoring-table {
    background: white;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

.api-monitoring-table th {
    background: #F9FAFB;
    padding: 10px 12px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    border-bottom: 1px solid #E5E7EB;
}

.api-monitoring-table td {
    padding: 10px 12px;
    font-size: 13px;
    color: #374151;
    border-bottom: 1px solid #F3F4F6;
}

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

.api-monitoring-table code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #6366F1;
    background: #EEF2FF;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Method Badge */
.api-method-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    background: #DBEAFE;
    color: #1E40AF;
}

/* Status Badge */
.api-status-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
}

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

.api-status-badge.status-error {
    background: #FEE2E2;
    color: #991B1B;
}

/* Top Endpoints List */
.api-endpoint-list {
    background: white;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
    padding: 12px;
}

.api-endpoint-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #F3F4F6;
}

.api-endpoint-item:last-child {
    border-bottom: none;
}

.api-endpoint-item code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #6366F1;
    background: #EEF2FF;
    padding: 4px 8px;
    border-radius: 3px;
}

.api-endpoint-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.api-endpoint-count {
    font-size: 13px;
    color: #6B7280;
}

.api-endpoint-percentage {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

/* ==============================================
   Statistics Cards - Hierarchical Features
   ============================================== */

/* Statistics Cards */
.statistics-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: var(--spacing-sm);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--background-white);
    border-radius: var(--radius-md);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.stat-icon {
    font-size: var(--font-size-lg);
    flex-shrink: 0;
}

.stat-content {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--spacing-sm);
    flex-grow: 1;
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-gray);
    font-weight: 500;
    text-transform: uppercase;
}

.stat-value {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-dark);
    margin-left: auto;
}

/* Responsive: 4 columns at 1200px+ */
@media (min-width: 1200px) {
    .statistics-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Responsive: Single column at 1500px+ (sidebar layout) */
@media (min-width: 1500px) {
    .statistics-cards {
        grid-template-columns: 1fr;
    }
}

/* =================================================================
   EXPORT MODAL
   ================================================================= */

/* Modal container */
.modal {
    display: flex; /* Changed from 'none' - visibility controlled by modal-hidden class */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

/* Modal hidden state */
.modal-hidden {
    display: none;
}

/* Modal overlay background */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* Modal dialog wrapper */
.modal-dialog {
    position: relative;
    z-index: 10001;
    width: 90%;
    max-width: 500px;
}

/* Modal content box */
.modal-content {
    background: var(--background-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Modal header */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-bottom: 1px solid var(--border-light);
}

.modal-header h2 {
    margin: 0;
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-dark);
}

/* Modal close button */
.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--background-gray-light);
    color: var(--text-dark);
}

/* Modal body */
.modal-body {
    padding: var(--spacing-xl);
}

.modal-body p {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--text-gray);
}

/* Form group */
.form-group {
    margin-bottom: var(--spacing-md);
}

/* Checkbox label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    user-select: none;
}

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

.checkbox-label span {
    color: var(--text-dark);
    font-size: var(--font-size-base);
}

/* Export info box */
.export-info {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--background-gray-light);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
}

.export-info p {
    margin: 4px 0;
    font-size: var(--font-size-sm);
    color: var(--text-gray);
}

.export-info strong {
    color: var(--text-dark);
}

/* Modal footer */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border-top: 1px solid var(--border-light);
}

/* Responsive: Mobile/Tablet adjustments */
@media (max-width: 600px) {
    .modal-dialog {
        width: 95%;
        margin: 20px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: var(--spacing-md);
    }
}

/* ===================================================================
   PROFILE PAGE STYLES
   ===================================================================
   Profile page (Startseite) styling - clean, social-media-inspired layout
   Created: October 11, 2025
   =================================================================== */

/* Profile Header */
.profile-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl);
    background: white;
    border-radius: 8px;
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--border-gray);
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.profile-title h1 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.75rem;
}

.profile-subtitle {
    margin: 0.25rem 0 0 0;
    color: var(--text-gray);
    font-size: 1rem;
}

/* Profile Cards */
.profile-card {
    background: white;
    border-radius: 8px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-gray);
}

.profile-card h2 {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Profile Info Grid */
.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.info-label {
    font-size: 0.875rem;
    color: var(--text-gray);
    font-weight: 500;
}

.info-value {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 400;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Placeholder Cards */
.placeholder-card {
    background: white;
    border-color: #dee2e6;
}

.placeholder-content {
    padding: var(--spacing-md) 0;
}

.placeholder-text {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin: 0 0 var(--spacing-md) 0;
    font-style: italic;
}

.placeholder-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.placeholder-item {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--color-gray-light);
    border: 1px dashed var(--border-gray);
    border-radius: 4px;
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-md);
    }

    .avatar-circle {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .profile-title h1 {
        font-size: 1.5rem;
    }

    .profile-card {
        padding: var(--spacing-md);
    }

    .profile-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   HIERARCHICAL ITEM COMPONENT STYLES
   Issue #11 Fix - Migrated from inline styles
   =================================================================== */

/* Selection indicator - prevents text selection during click interactions */
.selection-indicator {
    user-select: none;
}

/* Actions error message - displayed when actions slot is missing */
.actions-error {
    color: red;
}

/* Expiration warning badge - shown for tokens expiring within 30 days */
.expiration-warning-badge {
    display: inline-block;
    margin-left: var(--spacing-sm);
    padding: 2px 8px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    white-space: nowrap;
    vertical-align: middle;
}

.expiration-warning-badge:hover {
    background-color: #ffecb5;
    border-color: #ffd93d;
}

.password-setup-status-badge {
    display: inline-block;
    margin-left: var(--spacing-sm);
    padding: 2px 8px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 12px;
    white-space: nowrap;
    vertical-align: middle;
}

.password-setup-status-badge:hover {
    background-color: #ffecb5;
    border-color: #ffd93d;
}

/* ===================================================================
   EMPLOYEE & USER STATUS BADGES
   ===================================================================
   Badge styling for employee management system
   Created: October 26, 2025
   =================================================================== */

/* Employee User Account Badge (Base) */
.employee-user-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
    vertical-align: middle;
}

/* Employee User Linked Badge (Success/Green) */
.employee-user-linked {
    color: #03543F;
    background-color: #DEF7EC;
    border: 1px solid #84E1BC;
}

.employee-user-linked:hover {
    background-color: #C3FAE8;
}

/* Employee User Missing Badge (Warning/Orange) */
.employee-user-missing {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
}

.employee-user-missing:hover {
    background-color: #ffecb5;
}

/* Employee Position Badge (Info/Blue) */
.employee-position-badge {
    display: inline-block;
    padding: 4px 10px;
    margin-right: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: #1E40AF;
    background-color: #DBEAFE;
    border: 1px solid #93C5FD;
    border-radius: 12px;
    white-space: nowrap;
    vertical-align: middle;
}

.employee-position-badge:hover {
    background-color: #BFDBFE;
}

/* Employee Meta Information (Birth date, Phone) */
.employee-meta {
    color: var(--text-gray);
    font-size: var(--font-size-sm);
}

/* User Status Badge (Base) */
.user-status-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    border-radius: 12px;
    white-space: nowrap;
    vertical-align: middle;
}

/* User Status Inactive Badge (Warning/Red) */
.user-status-inactive {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.user-status-inactive:hover {
    background-color: #f1b0b7;
}

/* Inactive user item styles (similar to archived items) */
.hierarchical-item.inactive {
    opacity: 0.6;
    background: #fafafa;
    border-left: 4px solid #9ca3af !important; /* Gray border for inactive */
}

.hierarchical-item.inactive .item-name {
    color: var(--text-gray);
}

.hierarchical-item.inactive .item-description {
    color: var(--text-gray);
}

.hierarchical-item.inactive .item-level-badge {
    background-color: #6b7280;
    color: white;
}

/* User without employee assignment - light red background */
/* Only apply to Level 1 users (not departments) and not to inactive users */
.hierarchical-item.level-1.user-without-employee:not(.inactive) {
    background: #fff5f5; /* Very light red background */
}

/* Badge Container Spacing */
.hierarchical-item .employee-user-badge,
.hierarchical-item .user-status-badge {
    margin-top: 4px;
}

/* ===================================================================
   LOGIN PAGE STYLES
   ===================================================================
   Marketing link on login page
   Created: October 24, 2025
   =================================================================== */

.login-marketing-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s ease;
}

.login-marketing-link:visited {
    color: var(--primary-color);
    text-decoration: none;
}

.login-marketing-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ===================================================================
   EMPLOYEE MANAGEMENT - HIERARCHICAL BORDERS
   ===================================================================
   Color-coded borders for employee management hierarchy
   - Level 0 (Departments): Orange border (matches Position Catalog)
   - Level 1 (Employees): Purple border (main purple - #9C27B0)
   Created: October 25, 2025
   Updated: October 26, 2025 - Employees use main purple
   =================================================================== */

.content-type-employees .hierarchical-item[data-level="0"] {
    border-left: 6px solid var(--color-departments-100);
}

.content-type-employees .hierarchical-item[data-level="1"] {
    border-left: 6px solid var(--color-employees-100);
}

/* Employee Selector Overlay - Orange for departments, Purple for employees */
body[data-content-type="employees"] .hierarchical-item[data-level="0"],
.selector-mode-container[data-content-type="employees"] .hierarchical-item[data-level="0"] {
    border-left: 6px solid var(--color-departments-100) !important;
}

body[data-content-type="employees"] .hierarchical-item[data-level="1"],
.selector-mode-container[data-content-type="employees"] .hierarchical-item[data-level="1"] {
    border-left: 6px solid var(--color-employees-100) !important;
}

/* ===================================================================
   USER MANAGEMENT - HIERARCHICAL BORDERS
   ===================================================================
   Color-coded borders for user management hierarchy

   Normal mode (list view):
   - Level 0 (Departments): Orange border (organizational context)
   - Level 1 (Users): Light Purple border (IT/technical accounts - #BA68C8)

   Selector mode (overlay - flat list):
   - Level 0 (Users): Light Purple border (users displayed as top-level items)

   Created: October 25, 2025
   Updated: October 26, 2025 - Users use light purple variation for IT context
   =================================================================== */

/* Normal mode: Department wrapper */
body:not(.selector-mode) .content-type-users .hierarchical-item[data-level="0"] {
    border-left: 6px solid var(--color-departments-100);
}

/* Normal mode: Users under department */
body:not(.selector-mode) .content-type-users .hierarchical-item[data-level="1"] {
    border-left: 6px solid var(--color-users-100);
}

/* Selector mode: Users as top-level items (flat list) */
body.selector-mode .content-type-users .hierarchical-item[data-level="0"],
.selector-mode-container[data-content-type="users"] .hierarchical-item[data-level="0"] {
    border-left: 6px solid var(--color-users-100);
}

/* ===================================================================
   HELP PAGE - CONTACT FORM & FAQ STYLES
   ===================================================================
   Styling for contact form and collapsible FAQ section on Hilfe page
   Created: October 29, 2025
   =================================================================== */

/* Contact Form */
.support-contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.support-contact-form .form-control {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    transition: border-color 0.2s ease;
}

.support-contact-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 61, 131, 0.1);
}

.support-contact-form .form-control[readonly] {
    background-color: var(--background-light);
    color: var(--text-gray);
    cursor: not-allowed;
}

.support-contact-form textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.form-info-note {
    padding: var(--spacing-sm);
    background: var(--background-light);
    border-radius: var(--radius-sm);
    margin-top: var(--spacing-xs);
}

.form-info-note small {
    color: var(--text-gray);
    font-size: var(--font-size-sm);
}

/* FAQ Section */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.faq-item {
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-md);
    background: var(--background-white);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--background-white);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.faq-question:hover {
    background: var(--background-light);
}

.faq-item.active .faq-question {
    border-bottom-color: var(--border-gray);
}

.faq-question span:first-child {
    font-weight: 500;
    color: var(--text-dark);
    flex: 1;
}

.faq-toggle {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
    margin-left: var(--spacing-md);
    font-weight: bold;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: var(--spacing-md);
    background: var(--background-light);
    color: var(--text-gray);
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    display: block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .faq-question {
        padding: var(--spacing-sm);
    }

    .faq-item.active .faq-answer {
        padding: var(--spacing-sm);
    }
}

/* Help Navigation Card */
.help-navigation-card {
    background: var(--background-white);
}

.help-navigation-card h2 {
    color: var(--primary-color);
}

.help-navigation-card .profile-subtitle {
    color: var(--text-gray);
}

.help-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.help-nav-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--background-white);
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

.help-nav-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.help-nav-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.help-nav-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.help-nav-content h3 {
    margin: 0;
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-dark);
}

.help-nav-content p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-gray);
    line-height: 1.4;
}

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

    .help-nav-item {
        padding: var(--spacing-md);
    }

    .help-nav-icon {
        font-size: 2rem;
    }
}

/* Help Resources Section */
.help-resources {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.help-category {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.help-category-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--border-gray);
}

.help-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.help-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background: var(--background-white);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
    gap: var(--spacing-md);
}

.help-item:hover {
    background: var(--background-light);
    box-shadow: var(--shadow-sm);
    border-color: var(--primary-color);
}

.help-item-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    flex: 1;
}

.help-item-title {
    font-weight: 500;
    color: var(--text-dark);
    font-size: var(--font-size-base);
}

.help-item-meta {
    font-size: var(--font-size-sm);
    color: var(--text-gray);
}

.help-item-description {
    font-size: var(--font-size-sm);
    color: var(--text-gray);
    line-height: 1.5;
    margin-top: var(--spacing-xs);
}

.help-item-action {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--primary-color);
    white-space: nowrap;
    flex-shrink: 0;
}

.help-item:hover .help-item-action {
    color: var(--primary-hover);
}

/* Training Contact Note */
.training-contact-note {
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--background-light);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-tasks-100);
}

.training-contact-note p {
    margin: 0;
    color: var(--text-gray);
    line-height: 1.6;
}

/* Mobile Responsive for Help Sections */
@media (max-width: 768px) {
    .help-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .help-item-action {
        align-self: flex-end;
    }

    .help-category-title {
        font-size: var(--font-size-base);
    }
}

/* ============================================
   SEARCH FUNCTIONALITY STYLES
   ============================================ */

/* Search Form */
.search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    gap: var(--spacing-md);
    align-items: stretch;
}

.search-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-gray);
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 61, 131, 0.1);
}

.search-button {
    padding: 14px 32px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-button:hover {
    background: var(--primary-color-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 61, 131, 0.2);
}

/* Search Summary */
.search-summary {
    margin-top: var(--spacing-xl);
    padding: 20px 24px;
    background: white;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.search-summary-text {
    font-size: 16px;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.6;
}

.search-summary-text strong {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 18px;
}

.archived-info {
    color: var(--text-gray);
    font-size: 14px;
    margin-left: 8px;
}

/* Search Toggle */
.search-toggle {
    margin-top: var(--spacing-md);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    user-select: none;
}

.toggle-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.toggle-text {
    font-size: var(--font-size-sm);
    color: var(--text-gray);
}

/* Search Results Container */
.search-results {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Search Category */
.search-category {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.search-category-header {
    padding: 16px 20px;
    background: linear-gradient(to right, rgba(0, 61, 131, 0.03), rgba(0, 61, 131, 0.01));
    border-left: 5px solid var(--primary-color);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.search-category-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-category-icon {
    font-size: 24px;
    line-height: 1;
}

.search-category-count {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-gray);
    margin-left: 4px;
}

.search-category-results {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Search Result Card */
.search-result-card {
    display: block;
    padding: 16px 20px;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.search-result-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    background: rgba(0, 61, 131, 0.01);
}

/* Archived Result Card */
.search-result-card.archived {
    opacity: 0.6;
    background: var(--background-light);
}

.search-result-card.archived:hover {
    opacity: 0.8;
}

/* Search Result Header */
.search-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-xs);
}

.search-result-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    line-height: 1.5;
}

.user-employee-name {
    color: var(--text-gray);
    font-weight: 400;
    font-size: 15px;
}

/* Search Result Meta */
.search-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}

.meta-item {
    font-size: 14px;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-item::before {
    content: '•';
    font-size: 12px;
    color: rgba(0, 0, 0, 0.3);
}

.meta-item:first-child::before {
    content: '';
}

/* Search Result Snippet */
.search-result-snippet {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* Badge Archived */
.badge-archived {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: rgba(156, 163, 175, 0.15);
    color: #6B7280;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

/* Show More Button */
.show-more-button {
    width: 100%;
    padding: 12px 20px;
    background: rgba(0, 61, 131, 0.03);
    border: 1px dashed rgba(0, 61, 131, 0.2);
    border-radius: var(--radius-md);
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.show-more-button:hover {
    background: rgba(0, 61, 131, 0.08);
    border-color: var(--primary-color);
    border-style: solid;
    transform: translateY(-1px);
}

/* Mobile Responsive for Search */
@media (max-width: 768px) {
    .search-input-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .search-input {
        padding: 12px 16px;
    }

    .search-button {
        width: 100%;
        padding: 12px 24px;
        justify-content: center;
    }

    .search-summary {
        padding: 16px;
    }

    .search-summary-text strong {
        font-size: 16px;
    }

    .search-category-header {
        padding: 12px 16px;
    }

    .search-category-title {
        font-size: 16px;
    }

    .search-category-icon {
        font-size: 20px;
    }

    .search-category-results {
        padding: 12px;
    }

    .search-result-card {
        padding: 12px 16px;
    }

    .search-result-meta {
        flex-direction: column;
        gap: 6px;
    }

    .meta-item::before {
        content: '';
    }
}

/* ===================================================================
   PAGE SUBTITLE STYLES
   Subtitle for page headers showing organization info
   =================================================================== */
.page-subtitle {
    margin: 0.5rem 0 0 0;
    color: var(--text-gray);
    font-size: 0.9375rem;
    font-weight: 400;
}

/* ===================================================================
   FEEDBACK SYSTEM STYLES
   Simple feedback button and modal (November 2025)
   TODO: Replace email workflow with internal feedback system
   =================================================================== */

/* Feedback Button - Fixed Bottom-Right */
.feedback-button {
    position: fixed;
    bottom: 12px;
    right: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all 0.2s ease;
    z-index: 999;
}

.feedback-button:hover {
    background: var(--cta-end);
    box-shadow: 0 12px 20px -5px rgba(255, 165, 0, 0.3);
    transform: translateY(-2px);
}

.feedback-button:active {
    transform: translateY(0);
}

/* Feedback Modal */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.feedback-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.feedback-modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-light);
}

.feedback-modal-header h2 {
    margin: 0;
    font-size: var(--font-size-xl);
    color: var(--primary-color);
}

.feedback-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-gray);
    transition: color 0.2s ease;
}

.feedback-modal-close:hover {
    color: var(--text-dark);
}

.feedback-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.feedback-modal-description {
    margin: 0 0 24px 0;
    color: var(--text-gray);
    font-size: 0.9375rem;
    line-height: 1.6;
}

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

.feedback-modal-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.feedback-modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.feedback-modal-body textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.form-help-text {
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--text-gray);
}

.feedback-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.feedback-modal-actions .btn-secondary,
.feedback-modal-actions .btn-primary {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.feedback-modal-actions .btn-secondary {
    background: var(--background-light);
    color: var(--text-dark);
}

.feedback-modal-actions .btn-secondary:hover {
    background: var(--cta-end);
    color: white;
}

.feedback-modal-actions .btn-primary {
    background: var(--primary-color);
    color: white;
}

.feedback-modal-actions .btn-primary:hover {
    background: var(--cta-end);
}

.feedback-modal-actions .btn-primary:disabled {
    background: var(--text-gray);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Success Message */
.feedback-success-message {
    text-align: center;
    padding: 40px 20px;
}

.feedback-success-message svg {
    margin-bottom: 20px;
}

.feedback-success-message h3 {
    margin: 0 0 12px 0;
    font-size: var(--font-size-xl);
    color: #10B981;
}

.feedback-success-message p {
    margin: 0;
    color: var(--text-gray);
    font-size: 0.9375rem;
}

.feedback-success-message .btn-primary {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: var(--primary-color);
    color: white;
}

.feedback-success-message .btn-primary:hover {
    background: var(--cta-end);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .feedback-button {
        bottom: 12px;
        right: 12px;
        padding: 10px 20px;
        font-size: 0.875rem;
    }

    .feedback-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .feedback-modal-header {
        padding: 20px;
    }

    .feedback-modal-header h2 {
        font-size: var(--font-size-lg);
    }

    .feedback-modal-body {
        padding: 20px;
    }

    .feedback-modal-actions {
        flex-direction: column;
    }

    .feedback-modal-actions .btn-secondary,
    .feedback-modal-actions .btn-primary {
        width: 100%;
    }
}
