@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

.bold {
    font-weight:bold;
}

/* Glassmorphism Background Overlay */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    z-index: -1;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 280px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: left;
    padding-left: 25px;
}

.logo-icon img {
    width:120px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 24px;
    font-weight: 300;
    font-family: 'Roboto', sans-serif;
    color: white;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 6px;
    background: rgba(74, 112, 175, 0.1);
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 12px;
}

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.profile-image img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.icon-button {
    width: 42px;
    height: 42px;
    border: none;
    background: rgba(74, 112, 175, 0.1);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-bar .icon-button:last-child {
    margin-right: 20px;
}

.icon-button:hover {
    color: rgb(74, 112, 175);
    background: #fff;
    box-shadow: 0 8px 25px rgba(74, 112, 175, 0.4);
}

/* Left Sidebar */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 280px;
    height: calc(100vh - 70px - 40px);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.1);
    z-index: 99;
    overflow-y: auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: none;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.menu-item {
    margin: 0 15px 8px 15px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 15px;
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 12px;
    border-radius: 3px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.menu-link:hover::before {
    left: 100%;
}

.menu-link:hover {
    background: rgba(74, 112, 175, 0.1);
    color: #4a70af;
    box-shadow: 0 4px 15px rgba(74, 112, 175, 0.2);
}

.menu-link.active {
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(74, 112, 175, 0.4);
}

.menu-link.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background: #677eea;
    border-radius: 2px;
}

.menu-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Main Content Area */
.main-content {
    margin-left: 280px;
    margin-top: 70px;
    margin-bottom: 60px;
    min-height: calc(100vh - 130px);
    font-size: 13px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.01em;
}

.tools-bar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    height: 65px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 98;
    position: relative;
}

.tools-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
    color: #333;
}

.tools-right {
    display: flex;
    gap: 12px;
}

.tool-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.tool-btn.primary {
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 112, 175, 0.3);
}

.tool-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 112, 175, 0.4);
}

.tool-btn.secondary {
    background: rgba(74, 112, 175, 0.1);
    color: #4a70af;
    border: 1px solid rgba(74, 112, 175, 0.2);
}

.tool-btn.secondary:hover {
    background: rgba(74, 112, 175, 0.2);
}

.content-area {
    background: white;
    min-height: calc(100vh);
    padding:30px;
    z-index: 97;
    position: relative;
}
/* Bottom Bar */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    font-size: 12px;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.1);
    z-index: 99;
}

.copyright {
    color: #666;
    font-weight: 500;
}

.status-indicators {
    display: flex;
    align-items: center;
    gap: 20px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #27ae60;
    animation: pulse 2s infinite;
}

.status-text {
    color: #666;
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    font-weight: 600;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    .main-content {
        margin-left: 250px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .main-content {
        margin-left: 0;
    }
    .logo-subtitle {
        display: none;
    }
}

.state-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #5274aa 0%, #36508c 50%, #7190c3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.state-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 60px 50px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 500px;
    min-width: 400px;
    animation: fadeInUp 0.6s ease-out;
}

.state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 30px;
}

.state-icon.loading {
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    color: white;
}

.state-icon.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

.state-icon.permission {
    background: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
    color: white;
}

.state-title {
    font-size: 20px;
    font-weight: 300;
    color: #666;
    margin-bottom: 15px;
    font-family: 'Roboto', sans-serif;
}

.state-message {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 35px;
}

.state-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.state-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.state-btn.primary {
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(74, 112, 175, 0.3);
}

.state-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(74, 112, 175, 0.4);
}

.state-btn.secondary {
    background: rgba(74, 112, 175, 0.1);
    color: #4a70af;
    border: 2px solid rgba(74, 112, 175, 0.2);
}

.state-btn.secondary:hover {
    background: rgba(74, 112, 175, 0.2);
    border-color: rgba(74, 112, 175, 0.3);
}

/* Loading Animation */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Loading Logo Styles */
.logo-loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    height: 100px;
}

.loading-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 4px 15px rgba(74, 112, 175, 0.3));
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulsing animation for loading */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 0 10px 30px rgba(0, 0, 0, 0.12);
    border: none;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(30px) scale(0.95);
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 16px 24px;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 16px;
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    flex-shrink: 0;
}

.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.01em;
    font-family: 'Roboto', sans-serif;
}

.modal-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: rotate(90deg);
}

.modal-content {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.modal-actions {
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
    background: #f8fafc;
}

/* Settings Modal Specific Styles */
.settings-field {
    margin-bottom: 25px;
}

.settings-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-value {
    display: block;
    padding: 5px 10px;
    background: rgba(74, 112, 175, 0.05);
    border: 1px solid rgba(74, 112, 175, 0.1);
    border-radius: 10px;
    color: #555;
    font-size: 12px;
    font-weight: 500;
}

.settings-dropdown {
    width: 100%;
    padding: 12px 45px 12px 12px;
    background: rgba(74, 112, 175, 0.05);
    border: 2px solid rgba(74, 112, 175, 0.1);
    border-radius: 10px;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDEyIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xIDFMNiA2TDExIDEiIHN0cm9rZT0iIzRhNzBhZiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+');
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 50px;
}

.settings-dropdown:focus {
    border-color: #4a70af;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 112, 175, 0.1);
}

.settings-dropdown:hover {
    border-color: rgba(74, 112, 175, 0.3);
}

.modal-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.modal-btn.primary {
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 112, 175, 0.3);
}

.modal-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 112, 175, 0.4);
}

.modal-btn.secondary {
    background: rgba(74, 112, 175, 0.1);
    color: #4a70af;
    border: 1px solid rgba(74, 112, 175, 0.2);
}

.modal-btn.secondary:hover {
    background: rgba(74, 112, 175, 0.2);
}

.modal-btn.danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.modal-btn.danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.settings-actions {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Settings Link Buttons */
.settings-link-btn {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid rgba(74, 112, 175, 0.1);
    background: rgba(74, 112, 175, 0.05);
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #4a70af;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
}

.settings-link-btn:hover {
    background: rgba(74, 112, 175, 0.1);
    border-color: rgba(74, 112, 175, 0.3);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(74, 112, 175, 0.2);
}

.settings-link-btn:active {
    transform: translateX(3px);
}

.settings-link-btn i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

/* Danger variant for remove buttons */
.settings-link-btn.danger {
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.1);
    background: rgba(231, 76, 60, 0.05);
}

.settings-link-btn.danger:hover {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

/* Settings Input Fields */
.settings-input {
    width: 100%;
    padding: 15px 15px;
    background: rgba(74, 112, 175, 0.05);
    border: 2px solid rgba(74, 112, 175, 0.1);
    border-radius: 10px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.settings-input:focus {
    border-color: #4a70af;
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 112, 175, 0.1);
    background: rgba(74, 112, 175, 0.08);
}

.settings-input:hover {
    border-color: rgba(74, 112, 175, 0.3);
}

.settings-input::placeholder {
    color: #999;
    font-style: italic;
}

/* Profile Image Preview */
.profile-image-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(74, 112, 175, 0.05);
    border-radius: 12px;
    margin-bottom: 20px;
}

.current-profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(74, 112, 175, 0.2);
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(74, 112, 175, 0.2);
    transition: all 0.3s ease;
}

.current-profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px rgba(74, 112, 175, 0.3);
}

/* Profile Image Actions */
.profile-image-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.profile-image-actions .settings-link-btn {
    flex: 1;
    justify-content: center;
    text-align: center;
}

/* When there's only one button (no remove button), center it */
.profile-image-actions .settings-link-btn:only-child {
    max-width: 300px;
    margin: 0 auto;
}

/* Enhanced Settings Field Spacing */
.settings-field {
    margin-bottom: 25px;
}

.settings-field:last-of-type {
    margin-bottom: 0;
}

/* Password Strength Indicator (optional enhancement) */
.password-strength {
    margin-top: 8px;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength-bar.weak {
    width: 33%;
    background: #e74c3c;
}

.password-strength-bar.medium {
    width: 66%;
    background: #f39c12;
}

.password-strength-bar.strong {
    width: 100%;
    background: #27ae60;
}

/* Form Validation Messages */
.validation-message {
    display: block;
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.validation-message.success {
    color: #27ae60;
}

/* Enhanced Modal Animation for Different Views */
.modal-container {
    min-height: 200px;
}

/* Message Areas */
.message-area {
    margin-top: 20px;
    margin-bottom: 10px;
    min-height: 20px;
}

.success-message,
.error-message {
    padding: 15px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: messageSlideIn 0.3s ease-out;
}

.success-message {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.error-message {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.success-message i,
.error-message i {
    font-size: 16px;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Loading States */
.button-spinner {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.modal-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.menu-group-header {
    padding: 15px 25px;
    border-bottom: none;
}

.menu-group-title {
    color: #999;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.hide {
    display:none !important;
}

/* ========================================
   Rollen Management Modul - CSS Erweiterung
   ======================================== */

/* Search Container */
.search-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 300px;
    flex: 1;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 40px;
    border: 2px solid rgba(74, 112, 175, 0.1);
    border-radius: 10px;
    background: rgba(74, 112, 175, 0.05);
    font-size: 12px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
}

.search-box input:focus {
    border-color: #4a70af;
    box-shadow: 0 0 0 3px rgba(74, 112, 175, 0.1);
    background: rgba(74, 112, 175, 0.08);
}

.search-box input::placeholder {
    color: #999;
    font-style: italic;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
    z-index: 1;
}

.clear-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.clear-search:hover {
    color: #4a70af;
    transform: translateY(-50%) scale(1.1);
}

/* Button Styles */
.btn {
    height: 40px;
    padding: 0 20px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(74, 112, 175, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 112, 175, 0.4);
}

.btn-secondary {
    background: rgba(74, 112, 175, 0.1);
    color: #4a70af;
    border: 1px solid rgba(74, 112, 175, 0.2);
}

.btn-secondary:hover {
    background: rgba(74, 112, 175, 0.2);
    border-color: rgba(74, 112, 175, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

/* Rollen Tabelle */
.table-container {
    overflow-x: auto;
    border-radius: 3px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(74, 112, 175, 0.1);
    background: white;
}

table {
    font-size:12px;
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    background: white;
}

table thead {
    background: linear-gradient(135deg, #eef2fa 0%, #f2f4fa 100%);
}

table thead th {
    padding: 10px;
    text-align: left;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

table tbody tr {
    border-bottom: 1px solid rgba(74, 112, 175, 0.1);
    transition: all 0.3s ease;
}

table tbody tr:hover {
    background: rgba(74, 112, 175, 0.03);
    transform: scale(1.005);
    box-shadow: 0 4px 15px rgba(74, 112, 175, 0.1);
}

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

table td {
    padding: 10px;
    color: #000;
    font-size: 12px;
    vertical-align: middle;
    border: none;
    white-space: nowrap;
}

.col-id {
    width: 80px;
}

.col-name {
    min-width: 200px;
}

.col-actions {
    width: 120px;
}

.role-name-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-action {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    text-decoration: none;
}

.btn-action.btn-fm {
    width: auto;
    padding: 0 12px;
    gap: 6px;
}

.btn-edit {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.btn-edit:hover {
    background: rgba(52, 152, 219, 0.2);
    color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-delete {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.btn-delete:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.btn-fm {
    background: rgba(74, 112, 175, 0.1);
    color: #4a70af;
    border: 1px solid rgba(74, 112, 175, 0.2);
}

.btn-fm:hover {
    background: rgba(74, 112, 175, 0.2);
    color: #4a70af;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 112, 175, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    color: #666;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background: rgba(74, 112, 175, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #4a70af;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-family: 'Roboto', sans-serif;
}

.empty-state p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Rollen Summary */
.table-summary {
    padding: 20px;
    border-top: 1px solid rgba(74, 112, 175, 0.1);
    font-size: 12px;
    color: #666;
    text-align: center;
    font-weight: 500;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 12px;
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 4px;
}

.form-control {
    width: 100%;
    padding: 15px 15px;
    background: rgba(74, 112, 175, 0.05);
    border: 2px solid rgba(74, 112, 175, 0.1);
    border-radius: 10px;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: #4a70af;
    box-shadow: 0 0 0 3px rgba(74, 112, 175, 0.1);
    background: rgba(74, 112, 175, 0.08);
}

.form-control:hover {
    border-color: rgba(74, 112, 175, 0.3);
}

.form-control::placeholder {
    color: #999;
    font-style: italic;
}

.form-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-error::before {
    content: "⚠";
    font-size: 14px;
}

/* Delete Confirmation Modal */
.delete-confirmation {
    text-align: center;
    padding: 20px 0;
}

.warning-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    animation: shake 0.6s ease-in-out;
}

.delete-confirmation p {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.role-info {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: 10px;
    padding: 15px 20px;
    margin: 20px 0;
    color: #c0392b;
    font-weight: 600;
}

.warning-text {
    font-size: 14px;
    color: #e74c3c;
    font-weight: 600;
    margin-top: 15px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-box {
        min-width: 250px;
    }
    
    table td,
    table th {
        padding: 12px 15px;
    }
    
    .col-id {
        width: 60px;
    }
    
    .col-actions {
        width: 100px;
    }
    
    .btn-action {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .action-buttons {
        gap: 6px;
    }
    
    .empty-state {
        padding: 60px 20px;
    }
    
    .empty-state h3 {
        font-size: 20px;
    }
    
    .empty-state p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .search-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .search-box {
        min-width: auto;
    }
    
    .tools-right {
        justify-content: stretch;
    }
    
    .btn {
        justify-content: center;
    }
    
    table th:first-child,
    table td:first-child {
        display: none;
    }
    
    .col-name {
        min-width: auto;
    }
}

.modules-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    font-size: 12px;
}

/* Module Container */
.modules-container {
    border: 2px solid rgba(74, 112, 175, 0.1);
    border-radius: 12px;
    background: rgba(74, 112, 175, 0.02);
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.modules-container:focus-within {
    border-color: #4a70af;
    box-shadow: 0 0 0 3px rgba(74, 112, 175, 0.1);
}

/* Module Actions */
.module-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(74, 112, 175, 0.1);
}

.btn-module-action {
    padding: 8px 15px;
    border: 1px solid rgba(74, 112, 175, 0.2);
    border-radius: 6px;
    background: rgba(74, 112, 175, 0.05);
    color: #4a70af;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-module-action:hover {
    background: rgba(74, 112, 175, 0.1);
    border-color: rgba(74, 112, 175, 0.3);
    transform: translateY(-1px);
}

.btn-module-action:active {
    transform: translateY(0);
}

/* Modules List */
.modules-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

/* Module Item */
.module-item {
    background: white;
    border: 1px solid rgba(74, 112, 175, 0.1);
    border-radius: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.module-item:hover {
    border-color: rgba(74, 112, 175, 0.3);
    box-shadow: 0 4px 15px rgba(74, 112, 175, 0.1);
    transform: translateY(-2px);
}

.module-checkbox-container {
    position: relative;
    display: flex;
    align-items: flex-start;
    padding: 16px;
    cursor: pointer;
}

/* Checkbox Styling */
.module-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.module-checkbox + .module-label {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    width: 100%;
    padding-left: 30px;
}

.module-checkbox + .module-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(74, 112, 175, 0.3);
    border-radius: 4px;
    background: white;
    transition: all 0.3s ease;
}

.module-checkbox:checked + .module-label::before {
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    border-color: #4a70af;
}

.module-checkbox:checked + .module-label::after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 0px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.module-checkbox:focus + .module-label::before {
    box-shadow: 0 0 0 3px rgba(74, 112, 175, 0.2);
}

/* Module Icon */
.module-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(74, 112, 175, 0.1) 0%, rgba(103, 126, 234, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #4a70af;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.module-checkbox:checked + .module-label .module-icon {
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    color: white;
    transform: scale(1.1);
}

/* Module Info */
.module-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.module-name {
    font-weight: 600;
    color: #333;
    font-size: 12px;
    line-height: 1.3;
}

.module-checkbox:checked + .module-label .module-name {
    color: #4a70af;
}

.module-description {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    margin-top: 2px;
}

.module-checkbox:checked + .module-label .module-description {
    color: #555;
}

/* No Modules Message */
.no-modules-message {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.no-modules-message i {
    display: block;
    font-size: 32px;
    margin-bottom: 15px;
    color: #4a70af;
}

/* Selected State Animation */
.module-item.selected {
    border-color: #4a70af;
    background: rgba(74, 112, 175, 0.02);
    box-shadow: 0 4px 20px rgba(74, 112, 175, 0.15);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .modules-list {
        grid-template-columns: 1fr;
    }
    
    .module-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-module-action {
        justify-content: center;
    }
    
    .modules-container {
        max-height: 300px;
        padding: 15px;
    }
    
    .module-checkbox-container {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .module-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .module-name {
        font-size: 12px;
    }
    
    .module-description {
        font-size: 11px;
    }
    
    .module-checkbox + .module-label {
        gap: 10px;
    }
}

/* Animation for newly added items */
@keyframes moduleSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.module-item {
    animation: moduleSlideIn 0.3s ease-out;
}

/* Focus styles for accessibility */
.module-checkbox:focus + .module-label {
    outline: 2px solid rgba(74, 112, 175, 0.5);
    outline-offset: 2px;
}

/* Hover effects */
.module-checkbox-container:hover .module-icon {
    transform: scale(1.05);
}

.module-checkbox:checked + .module-label:hover .module-icon {
    transform: scale(1.15);
}

.password-reset-form {
    text-align: left;
}

.password-reset-form .warning-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #f39c12 0%, #d35400 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.password-requirements {
    font-style: italic;
    line-height: 1.4;
}

.form-group .required {
    color: #e74c3c;
}

/* SUPPLIER */ 

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: inline-block;
}

.status-badge.active {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-badge.inactive {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Country Flag Styling */
.country-flag {
    font-size: 16px;
    margin-right: 8px;
    display: inline-block;
}

/* Supplier Name Container */
.supplier-name-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legal-entity {
    color: #666;
    font-style: italic;
    font-size: 12px;
}

/* Column Widths for Supplier Table */
.col-country {
    width: 100px;
}

.col-active {
    width: 80px;
}

/* Tab Bar Styling for Supplier Form */
.supplier-form-tabs {
    margin: -24px -24px 0 -24px;
    padding: 0;
}

.tab-bar {
    background: rgba(74, 112, 175, 0.05);
    border-bottom: 1px solid rgba(74, 112, 175, 0.1);
    padding: 0;
    margin: 0;
    display: flex;
}

.tab {
    padding: 15px 25px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 12px;
    position: relative;
}

.tab:hover {
    background: rgba(74, 112, 175, 0.08);
    color: #4a70af;
}

.tab.active {
    background: white;
    color: #4a70af;
    border-bottom-color: #4a70af;
}

.tab-content {
    padding: 30px;
    background: white;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* Form Row Styling */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.form-group.col-md-4 {
    flex: 0 0 33.333333%;
}

.form-group.col-md-6 {
    flex: 0 0 50%;
}

.form-group.col-md-8 {
    flex: 0 0 66.666667%;
}

/* Modal Width Override */
.modal-container.supplier-modal {
    max-width: 90%;
    width: 90%;
}

/* Enhanced Form Controls for Supplier Form */
.form-control {
    border: 2px solid rgba(74, 112, 175, 0.1);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 12px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #4a70af;
    box-shadow: 0 0 0 3px rgba(74, 112, 175, 0.1);
}

/* Select Styling */
select.form-control {
    appearance: none;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDEyIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xIDFMNiA2TDExIDEiIHN0cm9rZT0iIzRhNzBhZiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px 8px;
    padding-right: 40px;
    cursor: pointer;
}

/* Responsive Design for Supplier Form */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 20px;
    }
    
    .tab-bar {
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .supplier-form-tabs {
        margin: -20px -20px 0 -20px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .modal-container.supplier-modal {
        width: 95%;
        max-width: 95%;
    }
}

@media (max-width: 480px) {
    .col-country {
        width: 80px;
    }
    
    .country-flag {
        font-size: 14px;
        margin-right: 4px;
    }
    
    .status-badge {
        padding: 2px 8px;
        font-size: 10px;
    }
    
    .legal-entity {
        font-size: 10px;
    }
    
    /* Hide country column on very small screens */
    table th:nth-child(2),
    table td:nth-child(2) {
        display: none;
    }
}

/* Enhanced Empty State for Suppliers */
.empty-state .empty-icon {
    background: rgba(74, 112, 175, 0.1);
}

/* Loading States */
.supplier-form-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #666;
}

.supplier-form-loading i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

/* Form Validation Enhancement */
.form-group.has-error .form-control {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group.has-success .form-control {
    border-color: #27ae60;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
}

.supplier-row:hover .country-flag,
.supplier-row:hover .fi {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Tab Content Animation */
.tab-pane {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Required Field Indicator */
.required {
    color: #e74c3c;
    font-weight: bold;
}

/* Form Helper Text */
.form-helper {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Custom Checkbox/Radio for Future Use */
.custom-control {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding-left: 1.5rem;
}

.custom-control-input {
    position: absolute;
    z-index: -1;
    opacity: 0;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    vertical-align: top;
}

/* Success/Error Message Styling */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border-color: rgba(39, 174, 96, 0.2);
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.2);
}

.alert i {
    font-size: 16px;
}


/* Pipeline Modal - Fullscreen Dark Style */
.modal-overlay.modal-pipeline {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal-overlay.modal-pipeline .modal-container {
    max-width: none !important;
    width: 100% !important;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    transform: none;
    border: none;
    box-shadow: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.modal-overlay.modal-pipeline.show .modal-container {
    transform: none;
}

.modal-overlay.modal-pipeline .modal-header {
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    padding: 12px 20px;
    margin-bottom: 0;
    border-bottom: none;
    border-radius: 0;
    flex-shrink: 0;
}

.modal-overlay.modal-pipeline .modal-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-overlay.modal-pipeline .modal-title .font-semibold {
    color: #94a3b8;
    font-weight: 500;
}

.modal-overlay.modal-pipeline .modal-close {
    color: #94a3b8;
    width: 28px;
    height: 28px;
    font-size: 16px;
}

.modal-overlay.modal-pipeline .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: none;
}

.modal-overlay.modal-pipeline .modal-content {
    flex: 1;
    overflow: hidden;
    padding: 0;
    background: #f1f5f9;
}

/* Pipeline Modal Tabs */
.modal-overlay.modal-pipeline .pipeline-modal-tab {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.modal-overlay.modal-pipeline .pipeline-modal-tab:hover {
    color: #e2e8f0;
}

.modal-overlay.modal-pipeline .pipeline-modal-tab.active {
    color: #ffffff;
    border-bottom-color: #60a5fa;
    background: rgba(255, 255, 255, 0.05);
}

/* Pipeline Download Button in Header */
.modal-overlay.modal-pipeline .pipeline-download-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.modal-overlay.modal-pipeline .pipeline-download-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Status Badge in Pipeline Modal Header */
.modal-overlay.modal-pipeline .modal-title .inline-flex {
    font-size: 11px;
    padding: 3px 8px;
}

/* Pipeline Modal Header Layout - Tabs in Header */
.modal-overlay.modal-pipeline .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.modal-overlay.modal-pipeline .pipeline-header-tabs {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-left: auto;
}

.modal-overlay.modal-pipeline .pipeline-header-tabs .pipeline-modal-tab {
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 12px;
    padding: 10px 20px;
    border-radius: 6px 6px 0 0;
}

.modal-overlay.modal-pipeline .pipeline-header-tabs .pipeline-modal-tab.active {
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 3px solid #60a5fa;
}

.modal-overlay.modal-pipeline .pipeline-header-tabs .pipeline-modal-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05);
}

/* Pipeline Modal Content Area */
.modal-overlay.modal-pipeline .pipeline-modal-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-overlay.modal-pipeline .pipeline-modal-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.modal-overlay.modal-pipeline .pipeline-tab-pane {
    animation: fadeIn 0.2s ease;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
}

.modal-overlay.modal-pipeline .pipeline-tab-pane[data-pane="ocr"] {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-overlay.modal-pipeline .pipeline-tab-pane[data-pane="ocr"].hidden {
    display: none;
}

.modal-overlay.modal-pipeline .pipeline-tab-pane.hidden {
    display: none;
}

/* Solve Tab - no scroll on tab pane, scroll inside content */
.modal-overlay.modal-pipeline .pipeline-tab-pane[data-pane="solve"] {
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.modal-overlay.modal-pipeline .pipeline-tab-pane[data-pane="solve"] .solve-tab-container,
.modal-overlay.modal-pipeline .pipeline-tab-pane[data-pane="solve"] .solve-tab-content,
.modal-overlay.modal-pipeline .pipeline-tab-pane[data-pane="solve"] .human-solver-intervention {
    height: 100%;
    overflow: hidden;
}

/* Details-Tab: Dokumentspalte (Inline-Viewer) */
.modal-overlay.modal-pipeline .pipeline-doc-panel {
    flex: 0 0 34%;
    width: 34%;
    position: sticky;
    top: 0;
    height: calc(100vh - 120px);
    transition: flex-basis 0.2s ease, width 0.2s ease;
}

.modal-overlay.modal-pipeline .pipeline-doc-panel.collapsed {
    flex: 0 0 38px;
    width: 38px;
    height: auto;
}

.modal-overlay.modal-pipeline .pipeline-doc-panel.collapsed .pipeline-doc-body,
.modal-overlay.modal-pipeline .pipeline-doc-panel.collapsed .pipeline-doc-name,
.modal-overlay.modal-pipeline .pipeline-doc-panel.collapsed .pipeline-doc-open {
    display: none;
}

.modal-overlay.modal-pipeline .pipeline-doc-panel.collapsed .pipeline-doc-toggle i {
    transform: rotate(180deg);
}

/* Schmale Fenster: Dokument ueber die volle Breite, nicht mitscrollend */
@media (max-width: 1279px) {
    .modal-overlay.modal-pipeline .pipeline-details-layout {
        flex-wrap: wrap;
    }

    .modal-overlay.modal-pipeline .pipeline-doc-panel {
        flex: 1 1 100%;
        width: 100%;
        position: static;
        height: 60vh;
    }
}

/* Solver Split View Layout */
.modal-overlay.modal-pipeline .human-solver-domain,
.modal-overlay.modal-pipeline .human-solver-classify {
    height: calc(100vh - 150px);
}

.modal-overlay.modal-pipeline .human-solver-domain iframe,
.modal-overlay.modal-pipeline .human-solver-classify iframe {
    height: 100%;
    min-height: 400px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Logistics Tab Specific Styles */
.logistics-content {
    min-height: 400px;
}

.logistics-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(74, 112, 175, 0.1);
}

.logistics-settings-container {
    max-height: 500px;
    overflow-y: auto;
}

/* Logistics Setting Item */
.logistics-setting-item {
    background: rgba(74, 112, 175, 0.02);
    border: 1px solid rgba(74, 112, 175, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.logistics-setting-item:hover {
    border-color: rgba(74, 112, 175, 0.3);
    box-shadow: 0 4px 15px rgba(74, 112, 175, 0.1);
}

/* Setting Header */
.setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.client-selector {
    flex: 1;
}

.client-dropdown {
    max-width: 300px;
}

/* Services Table */
.services-table-container {
    overflow-x: auto;
}

.services-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.services-table thead {
    background: rgba(74, 112, 175, 0.05);
}

.services-table thead th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(74, 112, 175, 0.1);
}

.services-table tbody tr {
    border-bottom: 1px solid rgba(74, 112, 175, 0.05);
    transition: background-color 0.2s ease;
}

.services-table tbody tr:hover {
    background: rgba(74, 112, 175, 0.02);
}

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

.services-table td {
    padding: 12px 15px;
    vertical-align: middle;
    font-size: 12px;
}

.services-table .service-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #4a70af;
}

.services-table .form-control-sm {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
}

.services-table .form-control-sm:disabled {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #999;
}

/* Empty Message for Logistics */
.logistics-settings-container .empty-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.logistics-settings-container .empty-message i {
    font-size: 48px;
    color: #4a70af;
    margin-bottom: 20px;
    display: block;
}

.logistics-settings-container .empty-message p {
    font-size: 16px;
    margin: 0;
    font-style: italic;
}

/* Button Size Variations */
.btn-sm {
    padding: 8px 15px;
    font-size: 11px;
    border-radius: 6px;
}

/* Remove Button Styling */
.remove-setting-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design for Logistics */
@media (max-width: 768px) {
    .setting-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .client-selector {
        margin-bottom: 10px;
    }
    
    .client-dropdown {
        max-width: none;
    }
    
    .logistics-setting-item {
        padding: 15px;
    }
    
    .services-table {
        font-size: 12px;
    }
    
    .services-table thead th,
    .services-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .services-table thead th:last-child,
    .services-table td:last-child {
        min-width: 150px;
    }
    
    .services-table .form-control-sm {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .logistics-settings-container .empty-message {
        padding: 40px 15px;
    }
    
    .logistics-settings-container .empty-message i {
        font-size: 36px;
    }
    
    .logistics-settings-container .empty-message p {
        font-size: 14px;
    }
}


/* ========================================
   Logistics Order Management Module - CSS
   ======================================== */

/* Toolbar Filters */
.toolbar-filters {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    flex: 1;
}

.toolbar-filters.logistics {
    width: 100%;
}

.toolbar-select {
    width: 110px;
    height: 40px;
    padding: 0 40px 0 12px;
    border: 2px solid rgba(74, 112, 175, 0.1);
    border-radius: 8px;
    background: rgba(74, 112, 175, 0.05);
    font-size: 12px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iOCIgdmlld0JveD0iMCAwIDEyIDgiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0xIDFMNiA2TDExIDEiIHN0cm9rZT0iIzRhNzBhZiIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPC9zdmc+');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px 8px;
    box-sizing: border-box;
    cursor: pointer;
}

.toolbar-filters.logistics .toolbar-select {
    flex: 1;
    width: auto;
    min-width: 110px;
    max-width: none;
}

.tools-row {
    flex:1;
}

.toolbar-select:focus {
    border-color: #4a70af;
    box-shadow: 0 0 0 3px rgba(74, 112, 175, 0.1);
    background: rgba(74, 112, 175, 0.08);
}

.toolbar-select:hover {
    border-color: rgba(74, 112, 175, 0.3);
}

.toolbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Status Filter Bar */
.status-filter-bar {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    overflow-x: auto;
    white-space: nowrap;
}

.status-badge-btn {
    padding: 8px 16px;
    border: 2px solid rgba(74, 112, 175, 0.2);
    border-radius: 20px;
    background: rgba(74, 112, 175, 0.05);
    color: #4a70af;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-badge-btn:hover {
    background: rgba(74, 112, 175, 0.1);
    border-color: rgba(74, 112, 175, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 112, 175, 0.2);
}

.status-badge-btn.active {
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
    color: white;
    border-color: #4a70af;
    box-shadow: 0 4px 15px rgba(74, 112, 175, 0.3);
}

.status-badge-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 112, 175, 0.4);
}

/* Orders Content Container */
.orders-content {
    position: relative;
}

/* Status Badge in Table */
.status-badge.status-pending {
    background: rgba(243, 156, 18, 0.15);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.status-badge.status-proposal {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.status-badge.status-confirmed {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.status-badge.status-waiting {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.3);
}

.status-badge.status-approved {
    background: rgba(39, 174, 96, 0.15);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-badge.status-active {
    background: rgba(46, 204, 113, 0.2);
    color: #1e8449;
    border: 1px solid rgba(46, 204, 113, 0.5);
    font-weight: 600;
}

.status-badge.status-completed {
    background: rgba(52, 73, 94, 0.15);
    color: #2c3e50;
    border: 1px solid rgba(52, 73, 94, 0.3);
}

.status-badge.status-denied {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.status-badge.status-canceled {
    background: rgba(149, 165, 166, 0.15);
    color: #95a5a6;
    border: 1px solid rgba(149, 165, 166, 0.3);
}

.status-badge.status-default {
    background: rgba(74, 112, 175, 0.15);
    color: #4a70af;
    border: 1px solid rgba(74, 112, 175, 0.3);
}

/* Order Row Hover Effect */
.order-row {
    transition: all 0.3s ease;
}

.order-row:hover {
    background: rgba(74, 112, 175, 0.03);
    box-shadow: 0 2px 10px rgba(74, 112, 175, 0.1);
}

/* Empty State Specific for Logistics */
.empty-state .empty-icon i.fa-truck {
    color: #4a70af;
}

/* Search Box in Toolbar Context */
.toolbar-filters .search-box {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 280px;
    flex: 1;
}

.toolbar-filters .search-box input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 35px;
    border: 2px solid rgba(74, 112, 175, 0.1);
    border-radius: 8px;
    background: rgba(74, 112, 175, 0.05);
    font-size: 12px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.toolbar-filters .search-box input:focus {
    border-color: #4a70af;
    box-shadow: 0 0 0 3px rgba(74, 112, 175, 0.1);
    background: rgba(74, 112, 175, 0.08);
}

.toolbar-filters .search-box input::placeholder {
    color: #999;
    font-style: italic;
}

.toolbar-filters .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    z-index: 1;
}

.toolbar-filters .clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.toolbar-filters .clear-search:hover {
    color: #4a70af;
    transform: translateY(-50%) scale(1.1);
}

/* Responsive Design for Logistics Module */
@media (max-width: 1200px) {
    .toolbar-filters {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .toolbar-select {
        min-width: 160px;
        max-width: 180px;
    }
    
    .toolbar-filters .search-box {
        min-width: 250px;
    }
}

@media (max-width: 992px) {
    .status-filter-bar {
        padding: 15px 0;
        gap: 6px;
    }
    
    .status-badge-btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .col-pickup-location {
        min-width: 120px;
    }
    
    .col-model {
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .toolbar-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .toolbar-select {
        min-width: auto;
        max-width: none;
    }
    
    .toolbar-filters .search-box {
        min-width: auto;
    }
    
    .toolbar-actions {
        justify-content: stretch;
        margin-top: 10px;
    }
    
    .toolbar-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .status-filter-bar {
        justify-content: flex-start;
        padding-bottom: 10px;
        margin-bottom: 20px;
    }
    
    /* Hide some columns on tablet */
    .col-domain,
    .col-make {
        display: none;
    }
    
    table th:nth-child(2),
    table td:nth-child(2),
    table th:nth-child(6),
    table td:nth-child(6) {
        display: none;
    }
}

@media (max-width: 480px) {
    .status-filter-bar {
        gap: 4px;
        padding: 10px 0;
    }
    
    .status-badge-btn {
        padding: 4px 8px;
        font-size: 10px;
        border-radius: 15px;
    }
    
    .toolbar-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Hide more columns on mobile */
    .col-model,
    .col-pickup-location {
        display: none;
    }
    
    table th:nth-child(7),
    table td:nth-child(7),
    table th:nth-child(9),
    table td:nth-child(9) {
        display: none;
    }
    
    /* Adjust remaining columns for mobile */
    .col-id {
        width: 60px;
    }
    
    .col-status {
        width: 120px;
    }
    
    .col-pickup-date {
        min-width: 80px;
    }
    
    .col-actions {
        width: 80px;
    }
}

/* Loading States for Logistics Module */
.logistics-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #666;
}

.logistics-loading i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

/* Enhanced Table Row Animation */
.order-row {
    animation: orderSlideIn 0.3s ease-out;
}

@keyframes orderSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tooltip for Status Badges */
.status-badge {
    position: relative;
    cursor: help;
}

.status-badge:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

/* Filter Reset Button */
.filter-reset {
    padding: 8px 15px;
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 6px;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.filter-reset:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.5);
}

/* Search Highlight */
.search-highlight {
    background: rgba(255, 235, 59, 0.3);
    padding: 1px 2px;
    border-radius: 2px;
}

/* Refresh Button Animation */
.refreshing {
    animation: spin 1s linear infinite;
}

/* Download Button States */
.btn-downloading {
    background: rgba(74, 112, 175, 0.7);
    cursor: not-allowed;
}

.btn-downloading i {
    animation: pulse 1s infinite;
}

/* Enhanced Empty State */
.empty-state.logistics-empty {
    background: rgba(74, 112, 175, 0.02);
    border: 2px dashed rgba(74, 112, 175, 0.2);
    border-radius: 12px;
    margin: 20px 0;
}

/* Focus Management */
.toolbar-select:focus,
.toolbar-filters .search-box input:focus {
    outline: 2px solid rgba(74, 112, 175, 0.5);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .status-filter-bar,
    .toolbar-filters,
    .toolbar-actions,
    .col-actions {
        display: none;
    }
    
    .table-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .order-row:hover {
        background: transparent;
        transform: none;
        box-shadow: none;
    }
}

/* Accessibility Enhancements */
.status-badge-btn:focus {
    outline: 2px solid rgba(74, 112, 175, 0.7);
    outline-offset: 2px;
}

.order-row:focus-within {
    outline: 2px solid rgba(74, 112, 175, 0.5);
    outline-offset: -2px;
}


/* Logistics Order Details Modal */
.order-row {
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.order-row:hover {
    background-color: rgba(74, 112, 175, 0.05);
}

.order-row:active {
    transform: scale(0.995);
}

/* Wide Modal Override for Logistics Details */
.modal-overlay.modal-wide {
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.modal-overlay.modal-wide .modal-container {
    max-width: 1100px;
    width: 92%;
    background: #ffffff;
    border: none;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2), 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #1e293b;
}

.modal-overlay.modal-wide .modal-header {
    padding: 16px 24px;
    margin-bottom: 0;
    padding-bottom: 16px;
    border-bottom: none;
    flex-shrink: 0;
    background: linear-gradient(135deg, #4a70af 0%, #677eea 100%);
}

.modal-overlay.modal-wide .modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.01em;
}

.modal-overlay.modal-wide .modal-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

.modal-overlay.modal-wide .modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: rotate(90deg);
}

.modal-overlay.modal-wide .modal-content {
    color: #1e293b;
    background: #e9edf3;
    padding: 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Scrollbar styling */
.modal-overlay.modal-wide .modal-content::-webkit-scrollbar {
    width: 5px;
}

.modal-overlay.modal-wide .modal-content::-webkit-scrollbar-track {
    background: transparent;
}

.modal-overlay.modal-wide .modal-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.modal-overlay.modal-wide .modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* Wide modal - action buttons footer */
.modal-overlay.modal-wide .modal-actions {
    flex-shrink: 0;
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #f8fafc;
}

/* Wide modal - supplier form tabs fix (no negative margins needed with 0 content padding) */
.modal-overlay.modal-wide .supplier-form-tabs {
    margin: 0;
}

/* Fixed footer */
.lgf-modal-footer {
    flex-shrink: 0;
    padding: 12px 24px 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #f8fafc;
}

/* History Timeline */
.lgf-timeline {
    position: relative;
    padding-left: 28px;
}

.lgf-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(102, 126, 234, 0.4), rgba(102, 126, 234, 0.05));
    border-radius: 1px;
}

.lgf-timeline-dot {
    position: absolute;
    left: -24px;
    top: 6px;
    width: 10px;
    height: 10px;
    background: #e9edf3;
    border: 2px solid rgba(99, 102, 241, 0.4);
    border-radius: 50%;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-overlay.modal-wide .modal-container {
        width: 95%;
        max-width: none;
    }
}

/* ===========================================
   PIPELINE STATUS ICONS
   =========================================== */
.status-icon-processed {
    color: #27ae60; /* green */
    font-size: 12px;
}

.status-icon-human {
    color: #e74c3c; /* red */
    font-size: 12px;
}

.status-icon-pending {
    color: #95a5a6; /* gray */
    font-size: 12px;
}

.status-icon-rejected {
    color: #3498db; /* blue */
    font-size: 12px;
}

.status-icon-processing {
    color: #f39c12; /* orange */
    font-size: 12px;
}

.col-status {
    width: 40px;
    text-align: center;
}

.col-country {
    width: 40px;
    text-align: center;
}

/* Pipeline action column */
.col-action {
    width: 90px;
    text-align: center;
    vertical-align: middle;
}

/* ==========================================================================
   PRP Module (Prompt Management)
   ========================================================================== */

.prompt-editor {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.prompt-textarea {
    flex: 1;
    width: 100%;
    padding: 20px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    border: none;
    background: transparent;
    resize: none;
}

.prompt-textarea:focus {
    outline: none;
}

.prompt-textarea::placeholder {
    color: #999;
    font-style: italic;
}

/* Form hint for modals */
.form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #888;
}

/* =========================================================================
   MAPPING EDITOR (PMA Module)
   ========================================================================= */

.mapping-editor {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.mapping-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f0f0f0;
    border-bottom: 1px solid #e0e0e0;
}

.mapping-actions-left {
    display: flex;
    gap: 10px;
}

.mapping-actions {
    display: flex;
    gap: 10px;
}

.mapping-table-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

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

.mapping-table thead {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 1;
}

.mapping-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #555;
    border-bottom: 2px solid #e9ecef;
}

.mapping-table td {
    padding: 8px 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.mapping-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

.mapping-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.mapping-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.mapping-input::placeholder {
    color: #aaa;
    font-style: italic;
}

.mapping-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.mapping-count {
    font-size: 13px;
    color: #666;
}

.empty-table-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #999;
}

.empty-table-message i {
    font-size: 32px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.empty-table-message span {
    font-size: 14px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 12px;
}

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

.search-box-inline {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 12px;
    margin-right: 10px;
}

.search-box-inline i {
    color: #999;
    margin-right: 8px;
}

.search-box-inline input {
    border: none;
    outline: none;
    padding: 8px 0;
    font-size: 14px;
    width: 180px;
    background: transparent;
}

.search-box-inline input::placeholder {
    color: #aaa;
}

/* =========================================================================
   ETENDERING MODULE
   ========================================================================= */

/* Sidebar */
.etd-sidebar {
    position: fixed;
    left: 260px;
    top: 70px;
    bottom: 0;
    width: 250px;
    background: rgba(255, 255, 255, 0.95);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    padding: 20px 0;
    overflow-y: auto;
    z-index: 10;
}

.etd-sidebar h3 {
    padding: 0 20px 15px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
}

.etd-sidebar h3 i {
    margin-right: 8px;
    color: #667eea;
}

.etd-status-list {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.etd-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.etd-status-item:hover {
    background: rgba(102, 126, 234, 0.08);
}

.etd-status-item.active {
    background: rgba(102, 126, 234, 0.12);
    font-weight: 600;
}

.etd-status-item .status-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
}

.etd-status-item .status-label i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.etd-status-item .status-count {
    background: #f0f0f0;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.etd-status-item.active .status-count {
    background: #667eea;
    color: white;
}

/* Content area with sidebar */
.content-area.with-sidebar {
    margin-left: 250px;
}

/* eTendering Winner Row */
tr.etd-winner {
    background: rgba(39, 174, 96, 0.05);
}

tr.etd-winner:hover {
    background: rgba(39, 174, 96, 0.1) !important;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.status-badge i {
    font-size: 10px;
}

/* Detail Button */
.btn-detail {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    color: #667eea;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-detail i {
    color: #999;
    font-size: 12px;
    transition: color 0.2s ease;
}

.btn-detail:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.btn-detail:hover i {
    color: white;
}

/* Refresh Button */
.btn-refresh {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.btn-refresh:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* Export Button */
.btn-export {
    background: #27ae60;
    border: 1px solid #27ae60;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    color: white;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-export:hover {
    background: #219a52;
    border-color: #219a52;
}

.btn-export:disabled {
    background: #95a5a6;
    border-color: #95a5a6;
    cursor: not-allowed;
}

.btn-export i {
    font-size: 14px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-page {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.btn-page:hover:not(:disabled) {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.btn-page:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    padding: 0 10px;
    font-size: 13px;
    color: #666;
}

.result-count {
    font-size: 13px;
    color: #666;
}

/* No Data */
.etd-no-data {
    padding: 60px 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* View Toggle (List/Dashboard) - styled via Tailwind in JS */

/* eTendering Dashboard */
.etd-dashboard {
    padding: 24px;
    background: #f8f9fa;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-loading,
.dashboard-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    color: #999;
}

.dashboard-loading i,
.dashboard-error i {
    font-size: 32px;
    margin-bottom: 15px;
}

.dashboard-error i {
    color: #e74c3c;
}

/* Dashboard Alert Banner */
.dashboard-alert {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 1px solid #f0c36d;
}

.dashboard-alert .alert-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f39c12;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dashboard-alert .alert-icon i {
    color: white;
    font-size: 18px;
}

.dashboard-alert .alert-content {
    flex: 1;
}

.dashboard-alert .alert-title {
    font-size: 15px;
    font-weight: 600;
    color: #856404;
    margin-bottom: 2px;
}

.dashboard-alert .alert-subtitle {
    font-size: 12px;
    color: #997a00;
}

.dashboard-alert .alert-items {
    display: flex;
    gap: 8px;
}

.dashboard-alert .urgent-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.7);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-alert .urgent-item:hover {
    background: white;
    transform: translateY(-1px);
}

.dashboard-alert .urgent-time {
    font-weight: 700;
    color: #e74c3c;
    font-size: 13px;
}

.dashboard-alert .urgent-info {
    font-size: 12px;
    color: #666;
}

/* KPI Cards Row */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.kpi-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.kpi-card.kpi-primary::before { background: linear-gradient(90deg, #667eea, #764ba2); }
.kpi-card.kpi-success::before { background: linear-gradient(90deg, #27ae60, #2ecc71); }
.kpi-card.kpi-info::before { background: linear-gradient(90deg, #3498db, #5dade2); }
.kpi-card.kpi-warning::before { background: linear-gradient(90deg, #f39c12, #f1c40f); }

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.1;
    margin-bottom: 6px;
}

.kpi-label {
    font-size: 13px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.kpi-detail {
    font-size: 12px;
    color: #95a5a6;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.dashboard-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0; /* Prevents grid blowout */
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #eee;
    overflow: hidden;
}

.dashboard-card .card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.dashboard-card .card-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.dashboard-card .card-body {
    padding: 20px;
}

.dashboard-card .card-body-table {
    padding: 0;
    overflow: hidden;
}

/* Donut Chart */
.donut-container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.donut-chart {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.donut-hole {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donut-value {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.donut-label {
    font-size: 11px;
    color: #95a5a6;
    text-transform: uppercase;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-label {
    font-size: 13px;
    color: #666;
    flex: 1;
}

.legend-value {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

/* Trend Chart */
.trend-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 120px;
    gap: 8px;
    padding-bottom: 25px;
    position: relative;
}

.trend-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    position: relative;
    cursor: pointer;
}

.trend-bar-container {
    flex: 1;
    width: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
}

.trend-bar {
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    border-radius: 4px 4px 0 0;
    transition: height 0.3s ease;
}

.trend-bar-total {
    background: #e0e0e0;
}

.trend-bar-won {
    background: #27ae60;
}

.trend-label {
    font-size: 10px;
    color: #999;
    margin-top: 8px;
    text-align: center;
}

.trend-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.trend-legend .legend-item {
    font-size: 12px;
    color: #666;
}

.trend-legend .legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

/* Dashboard Table */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.dashboard-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.dashboard-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: #2c3e50;
    border-bottom: 1px solid #f5f5f5;
}

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

.dashboard-table .client-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-table .text-center {
    text-align: center;
}

.dashboard-table .text-right {
    text-align: right;
}

.win-rate-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.win-rate-badge.good {
    background: #d4edda;
    color: #155724;
}

.win-rate-badge.medium {
    background: #fff3cd;
    color: #856404;
}

.win-rate-badge.low {
    background: #f8d7da;
    color: #721c24;
}

/* Top Makes */
.makes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.make-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.make-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.make-name {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.make-stats {
    font-size: 12px;
    color: #7f8c8d;
}

.make-bar-container {
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    overflow: hidden;
}

.make-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Trend Bar Tooltips */
.trend-bar-group[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: #fff;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    margin-bottom: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.trend-bar-group[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2c3e50;
    z-index: 10;
    pointer-events: none;
}

/* Make Competitiveness - Horizontal Stacked Bars */
.make-comp-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.make-comp-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.make-comp-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.make-comp-name {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.make-comp-stats {
    font-size: 11px;
    color: #7f8c8d;
    white-space: nowrap;
    flex-shrink: 0;
}

.make-comp-bar-track {
    height: 8px;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.make-comp-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
    position: relative;
    overflow: hidden;
}

.make-comp-bar-strong {
    background: #e0e0e0;
}

.make-comp-bar-weak {
    background: #e0e0e0;
}

.make-comp-bar-won {
    height: 100%;
    border-radius: 4px;
}

.make-comp-bar-strong .make-comp-bar-won {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.make-comp-bar-weak .make-comp-bar-won {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

.make-comp-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 12px;
}

.make-comp-footnote {
    font-size: 10px;
    color: #bdc3c7;
    text-align: right;
    margin-top: 8px;
    font-style: italic;
}

/* Client Performance (card-style rows) */
.cp-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cp-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cp-row:last-child {
    border-bottom: none;
}

.cp-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.cp-name {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.cp-top-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cp-info-text {
    font-size: 11px;
    color: #7f8c8d;
    white-space: nowrap;
}

.cp-bar-track {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.cp-bar-fill {
    height: 100%;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: width 0.3s ease;
}

.cp-bar-won {
    height: 100%;
    background: #27ae60;
    border-radius: 4px;
}

.cp-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 10px;
    white-space: nowrap;
}

.cp-badge-high {
    background: #eafaf1;
    color: #1e8449;
}

.cp-badge-mid {
    background: #fef9e7;
    color: #b7950b;
}

.cp-badge-low {
    background: #fdedec;
    color: #c0392b;
}

.cp-info-text {
    font-size: 11px;
    color: #555;
    white-space: nowrap;
}

/* Average Rank Card */
.rank-kpi-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 16px;
}

.rank-kpi-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rank-kpi-number {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.rank-kpi-label {
    font-size: 12px;
    color: #95a5a6;
}

.rank-trend-indicator {
    font-size: 14px;
    font-weight: 600;
}

.rank-trend-up {
    color: #27ae60;
}

.rank-trend-down {
    color: #e74c3c;
}

.rank-trend-flat {
    color: #f39c12;
}

.rank-trend-svg {
    width: 100%;
    height: auto;
    max-height: 120px;
}

.rank-chart-label {
    font-size: 9px;
    fill: #95a5a6;
    font-family: inherit;
}

/* Rank chart HTML tooltip overlay */
.rank-chart-wrapper {
    position: relative;
}

.rank-dots-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.rank-dot-overlay {
    position: absolute;
    width: 18px;
    height: 18px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: all;
    cursor: pointer;
}

.rank-dot-overlay:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #2c3e50;
    color: #fff;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.rank-dot-overlay:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #2c3e50;
    z-index: 10;
}

.rank-chart-note {
    font-size: 10px;
    color: #bdc3c7;
    text-align: center;
    margin-top: 6px;
    font-style: italic;
}

/* Trend chart with Y-axis */
.trend-chart-with-axis {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.trend-y-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 25px;
    min-width: 24px;
}

.trend-y-label {
    font-size: 10px;
    color: #95a5a6;
    line-height: 1;
}

/* Dashboard Load Animations */
@keyframes etd-fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes etd-countUp {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes etd-barGrow {
    from { width: 0; }
}

@keyframes etd-donutSpin {
    from { opacity: 0; transform: rotate(-90deg); }
    to   { opacity: 1; transform: rotate(0deg); }
}

.etd-dashboard .kpi-card {
    opacity: 0;
    animation: etd-fadeInUp 0.4s ease-out forwards;
}
.etd-dashboard .kpi-card:nth-child(1) { animation-delay: 0.05s; }
.etd-dashboard .kpi-card:nth-child(2) { animation-delay: 0.1s; }
.etd-dashboard .kpi-card:nth-child(3) { animation-delay: 0.15s; }
.etd-dashboard .kpi-card:nth-child(4) { animation-delay: 0.2s; }

.etd-dashboard .kpi-card .kpi-value {
    opacity: 0;
    animation: etd-countUp 0.35s ease-out forwards;
    animation-delay: 0.3s;
}

.etd-dashboard .dashboard-card {
    opacity: 0;
    animation: etd-fadeInUp 0.4s ease-out forwards;
    animation-delay: 0.15s;
}

.etd-dashboard .dashboard-grid:nth-child(3) .dashboard-card { animation-delay: 0.2s; }
.etd-dashboard .dashboard-grid:nth-child(4) .dashboard-card { animation-delay: 0.25s; }
.etd-dashboard .dashboard-grid:nth-child(5) .dashboard-card { animation-delay: 0.3s; }

.etd-dashboard .donut-chart {
    opacity: 0;
    animation: etd-donutSpin 0.5s ease-out forwards;
    animation-delay: 0.3s;
}

.etd-dashboard .cp-bar-fill {
    animation: etd-barGrow 0.5s ease-out forwards;
    animation-delay: 0.3s;
}

.etd-dashboard .make-comp-bar-fill {
    animation: etd-barGrow 0.5s ease-out forwards;
    animation-delay: 0.25s;
}

.etd-dashboard .trend-bar {
    transition: height 0.3s ease-out;
}

.etd-dashboard .dashboard-alert {
    opacity: 0;
    animation: etd-fadeInUp 0.35s ease-out forwards;
}

/* Responsive */
@media (max-width: 1200px) {
    .kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .dashboard-alert .alert-items {
        display: none;
    }
}

/* eTendering Filters */
.toolbar-filters.etendering {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.toolbar-filters.etendering .filter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toolbar-filters.etendering .filter-item label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.toolbar-filters.etendering .filter-select,
.toolbar-filters.etendering .filter-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 180px;
    background: white;
}

.toolbar-filters.etendering .filter-select:focus,
.toolbar-filters.etendering .filter-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Menu Badge Styles */
.menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    margin-left: auto;
    font-size: 11px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #e53935 0%, #c62828 100%);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.4);
    animation: badge-pulse 2s ease-in-out infinite;
}

.menu-link.active .menu-badge {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}
