* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

.container {
    display: flex;
    height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(45deg, #ff6600 0%, #2c2c2c 50%, #00a3e0 100%);
    color: white;
    padding: 20px;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 300;
}

.header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
}

.sidebar {
    width: 280px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    margin-top: 120px;
    overflow-y: auto;
    height: calc(100vh - 120px);
}

.nav-section {
    margin-bottom: 20px;
}

.nav-category {
    padding: 15px 20px;
    font-weight: 600;
    color: #495057;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-category:hover {
    background: #dee2e6;
}

.nav-category.active {
    background: #2c2c2c;
    color: white;
}

.nav-items {
    display: none;
}

.nav-items.active {
    display: block;
}

.nav-item {
    padding: 12px 30px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #6c757d;
}

.nav-item:hover {
    background: #f1f3f4;
    color: #495057;
}

.nav-item.active {
    background: #f5f5f5;
    color: #2c2c2c;
    border-left: 3px solid #2c2c2c;
}

.main-content {
    flex: 1;
    margin-top: 120px;
    padding: 0;
    overflow-y: auto;
    height: calc(100vh - 120px);
}

.search-box {
    margin: 20px 30px;
    padding: 12px;
    width: calc(100% - 60px);
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-section {
    display: none;
    padding: 20px 30px 40px 30px;
}

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

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e9ecef;
}

.settings-list {
    display: block;
}

.setting-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 12px 15px;
    margin-bottom: 6px;
    transition: all 0.3s ease;
}

.setting-item:hover {
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    background: #ffffff;
}

.setting-content {
    width: 100%;
}

.setting-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.setting-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    flex: 1;
    line-height: 1.3;
}

.setting-flag {
    font-family: 'Courier New', monospace;
    color: #6c757d;
    font-size: 12px;
    background: #e9ecef;
    padding: 3px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

.setting-type {
    font-size: 11px;
    color: #868e96;
    background: #fff3cd;
    padding: 3px 6px;
    border-radius: 3px;
    flex-shrink: 0;
    line-height: 1.2;
}

.setting-description {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
    margin-top: 4px;
}

.badge {
    display: inline-block;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    margin-left: 4px;
}

.badge-approval {
    background: #fff3cd;
    color: #856404;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        margin-top: 140px;
        position: fixed;
        z-index: 999;
        background: white;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        max-height: 200px;
        overflow-y: auto;
    }

    .main-content {
        margin-top: 340px;
        height: auto;
    }

    .setting-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .setting-label, .setting-flag {
        min-width: auto;
    }
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 100px;
    left: 20px;
    z-index: 1001;
    background: #667eea;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar.mobile-hidden {
        display: none;
    }
}

/* Horizontal layout for setting items */
.setting-content-horizontal {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.setting-control-left {
    flex-shrink: 0;
    width: 180px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-info-right {
    flex: 1;
    min-width: 0;
}

.setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.setting-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

/* Compact current value display */
.current-value-compact {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 4px;
    text-align: center;
    padding: 2px 4px;
    background-color: #f8f9fa;
    border-radius: 3px;
    position: relative;
}

.current-value-compact.changed {
    color: #6c757d;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    font-style: italic;
}

.current-value-compact.changed:before {
    content: "Original: ";
    font-weight: 500;
    color: #856404;
}

/* Read-only value display */
.current-value-readonly {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 4px;
    text-align: center;
    padding: 2px 4px;
    background-color: #e9ecef;
    border-radius: 3px;
    position: relative;
    border: 1px solid #ced4da;
}

.current-value-readonly .readonly-label {
    color: #495057;
    font-weight: 500;
}

/* Highlight changed input controls */
.form-control-changed {
    border: 2px solid #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    background-color: #e7f1ff !important;
}

.toggle-switch-compact.changed .toggle-slider-compact {
    border: 2px solid #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

@keyframes changeHighlight {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Changes indicator in header */
.changes-indicator {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.changes-count {
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
}

.reset-changes-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.reset-changes-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Compact form controls */
.form-text-compact, .form-number-compact {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

.form-text-compact.readonly, .form-number-compact.readonly {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

.form-select-compact {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    background-color: #fff;
}

.form-select-compact.readonly {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Read-only indicator */
.readonly-indicator {
    font-size: 10px;
    color: #6c757d;
    text-align: center;
    margin-top: 2px;
    padding: 1px 4px;
    background-color: #f8f9fa;
    border-radius: 2px;
    border: 1px solid #dee2e6;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Compact toggle switch */
.toggle-switch-compact {
    position: relative;
    display: block;
    width: 40px;
    height: 20px;
    margin: 0 auto;
}

.toggle-switch-compact.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.toggle-switch-compact input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch-compact input:disabled {
    cursor: not-allowed;
}

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

.toggle-switch-compact.disabled .toggle-slider-compact {
    cursor: not-allowed;
    background-color: #e9ecef;
}

.toggle-slider-compact:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.2s;
    border-radius: 50%;
}

input:checked + .toggle-slider-compact {
    background-color: #28a745;
}

input:disabled:checked + .toggle-slider-compact {
    background-color: #94d3a2;
}

input:checked + .toggle-slider-compact:before {
    transform: translateX(20px);
}

/* Responsive design */
@media (max-width: 768px) {
    .setting-content-horizontal {
        flex-direction: column;
        gap: 8px;
    }
    
    .setting-control-left {
        width: 100%;
        max-width: 200px;
    }
    
    .tenant-name-main {
        font-size: 22px;
        padding: 6px 12px;
        margin-bottom: 10px;
        letter-spacing: 0.5px;
    }
    
    .tenant-info-grid-secondary {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .header {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .tenant-name-main {
        font-size: 18px;
        padding: 4px 8px;
        word-break: break-all;
    }
    
    .header {
        padding: 10px 12px;
    }
}

/* Header styling */
.header {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    position: relative;
    z-index: 10;
}

/* Header containers */
.header-logo-container {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
}

.header-content-container {
    flex: 1;
    text-align: center;
    min-width: 0;
}

/* Arcas logo positioning */
.netskope-logo {
    position: relative;
    z-index: 20;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 160px;
    width: auto;
    opacity: 0.8;
}

.arcas-text-img {
    height: 144px;
    width: auto;
    opacity: 0.9;
}

.netskope-logo:hover .logo-img,
.netskope-logo:hover .arcas-text-img {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-logo-container {
        align-self: flex-start;
    }
    
    .header-content-container {
        text-align: center;
    }
    
    .netskope-logo {
        text-align: left;
        gap: 10px;
    }
    
    .logo-img {
        height: 120px;
    }
    
    .arcas-text-img {
        height: 144px;
    }
}

.tenant-name-main {
    font-family: 'Courier New', Monaco, monospace;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tenant-name-text {
    color: white
}

.tenant-url-text {
    color: orange
}

.tenant-info-secondary {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    margin: 0 auto;
    max-width: 1200px;
}

.tenant-info-grid-secondary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    text-align: left;
}

/* Override external CSS to eliminate gaps */
.header {
    position: relative !important;
    margin: 0 !important;
    padding: 16px 20px !important;
    box-shadow: none !important;
}

.container {
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    height: auto !important;
    display: flex !important;
    max-width: none !important;
}

.sidebar {
    margin-top: 0 !important;
    height: auto !important;
}

.main-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Mobile menu button positioning */
.mobile-menu-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
}

.tenant-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tenant-info-item label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    font-weight: 500;
}

.tenant-info-item span {
    font-size: 14px;
    font-weight: 500;
}

.tenant-name {
    font-family: 'Courier New', monospace !important;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px !important;
}

.account-tier {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px !important;
    text-align: center;
    display: inline-block;
}

/* Feature Groups Styling */
.feature-group-section {
    padding: 20px;
}

.feature-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.feature-group-title h2 {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 24px;
    font-weight: 600;
}

.feature-group-description {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
}

.feature-group-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.enable-all-btn, .disable-all-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.enable-all-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.enable-all-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.disable-all-btn {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    color: white;
}

.disable-all-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #e8590c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.nav-item.feature-group-item {
    background: linear-gradient(45deg, #ff6600 0%, #2c2c2c 50%, #00a3e0 100%);
    color: white;
    margin: 2px 0;
    border-radius: 4px;
}

.nav-item.feature-group-item:hover {
    background: linear-gradient(45deg, #ff8533 0%, #404040 50%, #33b3f0 100%);
    transform: translateX(3px);
}

.nav-item.feature-group-item.active {
    background: linear-gradient(45deg, #cc5200 0%, #1a1a1a 50%, #0080b3 100%);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.3);
}

/* Notification styles */
.feature-notification {
    position: fixed;
    top: 150px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: opacity 0.3s ease;
}

.notification-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.notification-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: #212529;
}

.notification-info {
    background: linear-gradient(135deg, #17a2b8 0%, #007bff 100%);
    color: white;
}

/* Feature group specific setting styling */
.setting-item[data-flag] {
    border-left: 3px solid transparent;
    transition: border-color 0.2s ease;
}

.feature-group-section .setting-item {
    border-left-color: #667eea;
}

.feature-group-section .setting-item:hover {
    border-left-color: #5a6fd8;
    background-color: rgba(102, 126, 234, 0.05);
}

/* Tooltip icon styles */
.tooltip-icon-wrapper {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    position: relative;
}

.tooltip-icon {
    font-size: 14px;
    cursor: help;
    transition: transform 0.2s ease, filter 0.2s ease;
    display: inline-block;
    line-height: 1;
}

.tooltip-icon:hover {
    transform: scale(1.2);
}

/* Tooltip icon color states using filters for emoji */
.tooltip-icon.infoState {
    filter: hue-rotate(200deg) saturate(1.2);
}

.tooltip-icon.warningState {
    /* Warning icons (⚠️) are already yellow, so minimal filtering */
    filter: saturate(1.3) brightness(1.1);
}

.tooltip-icon.errorState {
    filter: hue-rotate(0deg) saturate(1.5);
}

.tooltip-icon.successState {
    filter: hue-rotate(120deg) saturate(1.2);
}

/* Tooltip content styling */
.tooltip-icon-wrapper {
    position: relative;
}

.tooltip-icon[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(33, 37, 41, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    max-width: 350px;
    width: max-content;
    white-space: normal;
    word-wrap: break-word;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: normal;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    line-height: 1.4;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.tooltip-icon[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(33, 37, 41, 0.95);
    z-index: 1001;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tooltip-icon:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.tooltip-icon:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

/* Improve tooltip positioning for screen edges */
.tooltip-icon[data-tooltip]:hover::after {
    min-width: 200px;
    max-width: 400px;
}

/* ========== TENANT SEARCH STYLES ========== */
.tenant-search-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(45deg, #ff6600 0%, #2c2c2c 50%, #00a3e0 100%);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.search-header {
    text-align: center;
    margin-bottom: 3rem;
}
.search-header .logo-img {
    height: 160px;
    margin-bottom: 1rem;
}
.search-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin: 0;
}
.search-form-container {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 600px;
}
.search-form h2 {
    margin: 0 0 1.5rem 0;
    text-align: center;
}
.search-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}
.search-input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}
.search-button {
    padding: 12px 24px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
}
.search-button:hover {
    background: #218838;
}
.search-results {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 5px;
    max-height: 300px;
    overflow-y: auto;
}
.results-header {
    padding: 10px 15px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
}
.results-list {
    color: #333;
}
.result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}
.result-item:hover {
    background-color: #f8f9fa;
}
.result-item:last-child {
    border-bottom: none;
}

/* Tenant sections side-by-side layout */
.tenant-sections-container {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: none;
}

.recent-tenants {
    flex: 1;
    min-width: 350px;
    max-width: 500px;
    text-align: center;
}

.recent-tenants h3 {
    margin-bottom: 1rem;
    font-weight: 400;
}
.recent-tenants-list {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}
.related-tenants-list {
    max-width: none;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
}
.tenant-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.tenant-list-item:last-child {
    border-bottom: none;
}
.tenant-list-item:hover {
    background: rgba(255, 255, 255, 0.1);
}
.tenant-card {
    background: linear-gradient(45deg, rgba(255, 102, 0, 0.1) 0%, rgba(44, 44, 44, 0.1) 50%, rgba(0, 163, 224, 0.1) 100%);
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
    text-align: center;
}
.tenant-card:hover {
    background: linear-gradient(45deg, rgba(255, 102, 0, 0.2) 0%, rgba(44, 44, 44, 0.2) 50%, rgba(0, 163, 224, 0.2) 100%);
    transform: translateY(-2px);
}
.tenant-name {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}
.tenant-list-item .tenant-name {
    display: inline;
    font-weight: 500;
    margin-bottom: 0;
}
.tenant-id {
    display: block;
    font-size: 0.9rem;
    opacity: 0.8;
}
.tenant-list-item .tenant-id {
    display: inline;
    font-size: 0.8rem;
    opacity: 0.6;
    margin-left: 10px;
}
.no-tenants-message {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    padding: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 10px 0;
}
.tenant-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}
.tenant-status {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 500;
}
.status-active {
    background: rgba(40, 167, 69, 0.2);
    color: #28a745;
}
.status-inactive {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

/* ========== TENANT NOT FOUND STYLES ========== */
.tenant-not-found-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(45deg, #ff6600 0%, #2c2c2c 50%, #00a3e0 100%);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center;
    padding: 2rem;
}
.not-found-header {
    margin-bottom: 2rem;
}
.not-found-header .logo-img {
    height: 160px;
}
.not-found-content {
    max-width: 600px;
    background: rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}
.not-found-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}
.not-found-content h2 {
    font-size: 2.5rem;
    margin: 0 0 1rem 0;
    font-weight: 300;
}
.tenant-url {
    font-family: monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    margin: 1rem 0;
    font-size: 1.1rem;
}
.not-found-message {
    font-size: 1.1rem;
    margin: 1.5rem 0;
    line-height: 1.5;
    opacity: 0.9;
}
.not-found-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.back-to-search-btn, .try-again-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.back-to-search-btn {
    background: #28a745;
    color: white;
}
.back-to-search-btn:hover {
    background: #218838;
    transform: translateY(-1px);
}
.try-again-btn {
    background: #17a2b8;
    color: white;
}
.try-again-btn:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* ========== TENANT CONFIGURATION STYLES ========== */
.change-tenant-btn {
    margin-left: 20px;
    padding: 8px 16px;
    background: #00a3e0;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}
.change-tenant-btn:hover {
    background: #0080b3;
}

/* Permission Banner Styles */
.permission-banner {
    margin: 0 20px 20px 20px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.permission-banner.permission-edit {
    background: linear-gradient(45deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.3);
}
.permission-banner.permission-readonly {
    background: linear-gradient(45deg, rgba(220, 53, 69, 0.1) 0%, rgba(253, 126, 20, 0.1) 100%);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.3);
}
.permission-banner.permission-checking {
    background: linear-gradient(45deg, rgba(255, 193, 7, 0.1) 0%, rgba(253, 126, 20, 0.1) 100%);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.3);
}
.permission-icon {
    font-size: 16px;
}

/* Permission reason styling */
.permission-reason {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(220, 53, 69, 0.15);
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.3;
}
.permission-reason strong {
    color: #5a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
}

/* Different colors for readonly states */
.current-value-readonly.no-permission .permission-text-small {
    color: #dc3545; /* Red for no permission */
}

.current-value-readonly.readonly-field .permission-text-small {
    color: #6c757d; /* Gray for read-only fields */
}

.current-value-readonly.readonly-general .permission-text-small {
    color: #6c757d; /* Gray for general read-only */
}

/* Permission Badge Styles */
.permission-badge {
    margin-left: 15px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.permission-badge-edit {
    background: #28a745;
    color: white;
}
.permission-badge-readonly {
    background: #dc3545;
    color: white;
}
.permission-badge-checking {
    background: #ffc107;
    color: #212529;
}

/* Read-only styling enhancements */
.readonly-label {
    opacity: 0.8;
}

/* Permission indicator styles for form controls */
.permission-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    border-left: 3px solid #6c757d;
    background: rgba(108, 117, 125, 0.1); /* Default gray background */
}

/* No permission styling - keep red */
.current-value-readonly.no-permission .permission-indicator {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
}

/* Read-only field styling - use darker background with lighter text */
.current-value-readonly.readonly-field .permission-indicator {
    background: rgba(52, 58, 64, 0.8);
    border-left-color: #6c757d;
}

.current-value-readonly.readonly-field .permission-text-small {
    color: #adb5bd; /* Lighter gray text */
}

/* General read-only styling - use darker background with lighter text */
.current-value-readonly.readonly-general .permission-indicator {
    background: rgba(52, 58, 64, 0.8);
    border-left-color: #6c757d;
}

.current-value-readonly.readonly-general .permission-text-small {
    color: #adb5bd; /* Lighter gray text */
}
.permission-icon-small {
    font-size: 10px;
}
.permission-text-small {
    font-size: 10px;
    font-weight: 500;
    color: #721c24;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.readonly-value {
    margin-top: 2px;
}
.current-value-readonly {
    opacity: 0.8;
}

/* Loading Screen Styles */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff6600 0%, #2c2c2c 50%, #00a3e0 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.loading-screen.loading-hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
.loading-screen.loading-hidden * {
    display: none !important;
}
.loading-content {
    text-align: center;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}
.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: loadingSpinner 1s linear infinite;
    margin: 0 auto 1.5rem;
}
@keyframes loadingSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.loading-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 300;
}
.loading-text p {
    margin: 0;
    opacity: 0.8;
    font-size: 1rem;
}

/* Apply Changes Button */
.apply-changes-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-right: 8px;
}
.apply-changes-btn:hover {
    background: #218838;
}
.apply-changes-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}
.modal-header h3 {
    margin: 0;
    color: #333;
}
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover {
    color: #333;
}
.modal-body {
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
}
.changes-list {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    max-height: 300px;
    overflow-y: auto;
}
.change-item {
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}
.change-item:last-child {
    border-bottom: none;
}
.change-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}
.change-flag {
    font-family: monospace;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    color: #6c757d;
    margin-left: 8px;
}
.change-values {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.change-from {
    color: #dc3545;
    text-decoration: line-through;
}
.change-to {
    color: #28a745;
    font-weight: 500;
}
.change-arrow {
    color: #6c757d;
}
.modal-warning {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}
.warning-icon {
    font-size: 18px;
    margin-top: 2px;
}
.warning-text {
    flex: 1;
    color: #856404;
}
.warning-text strong {
    color: #533f03;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}
.modal-btn-cancel {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}
.modal-btn-cancel:hover {
    background: #5a6268;
}
.modal-btn-apply {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}
.modal-btn-apply:hover {
    background: #218838;
}
.modal-btn-apply:disabled {
    background: #6c757d;
    cursor: not-allowed;
}
.applying-state {
    opacity: 0.6;
}

/* Validation Error Styles */
.validation-error {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    outline: none !important;
}

/* Ensure validation error styling works on all input types with higher specificity */
.setting-item input.validation-error,
.setting-item select.validation-error,
.setting-item textarea.validation-error,
input.form-number-compact.validation-error,
input.form-text-compact.validation-error,
input.form-select-compact.validation-error {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    border-color: #dc3545 !important;
}

/* Focus state for validation errors */
.setting-item input.validation-error:focus,
.setting-item select.validation-error:focus,
.setting-item textarea.validation-error:focus,
input.form-number-compact.validation-error:focus,
input.form-text-compact.validation-error:focus,
input.form-select-compact.validation-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.5) !important;
    background-color: #fff5f5 !important;
}

.validation-tooltip {
    position: absolute;
    background: #dc3545;
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    white-space: nowrap;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.validation-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #dc3545;
}

