/* Elthree MCP Server - Styles */
:root {
    --aws-orange: #ff9900;
    --aws-dark: #232f3e;
    --aws-darker: #1a242f;
    --aws-light: #f5f5f5;
    --success: #00a86b;
    --error: #d13212;
    --warning: #f0ad4e;
    --text-primary: #16191f;
    --text-secondary: #687078;
    --border-color: #d5dbdb;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--aws-dark) 0%, var(--aws-darker) 100%);
    min-height: 100vh;
    color: var(--text-primary);
}

/* Auth Container */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 420px;
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    color: var(--aws-orange);
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.15);
}

.form-group input.error {
    border-color: var(--error);
}

.form-group .hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background: var(--aws-orange);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #ec8b00;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-secondary {
    background: transparent;
    color: var(--aws-orange);
    border: 1px solid var(--aws-orange);
}

.btn-secondary:hover {
    background: rgba(255, 153, 0, 0.1);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #b02a0c;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Links */
.auth-links {
    margin-top: 24px;
    text-align: center;
}

.auth-links a {
    color: var(--aws-orange);
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-links .separator {
    margin: 0 12px;
    color: var(--border-color);
}

/* Messages */
.message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.message.success {
    background: rgba(0, 168, 107, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
}

.message.error {
    background: rgba(209, 50, 18, 0.1);
    color: var(--error);
    border: 1px solid var(--error);
}

.message.info {
    background: rgba(255, 153, 0, 0.1);
    color: #b36b00;
    border: 1px solid var(--aws-orange);
}

/* App Layout */
.app-container {
    display: none;
}

.app-container.active {
    display: block;
}

.app-header {
    background: var(--aws-dark);
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    font-size: 1.25rem;
    color: var(--aws-orange);
}

.app-header .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-header .user-email {
    color: #aab7b8;
    font-size: 0.9rem;
}

.app-header .btn-logout {
    background: transparent;
    color: white;
    border: 1px solid #545b64;
    padding: 8px 16px;
    font-size: 0.875rem;
}

.app-header .btn-logout:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
.app-main {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.nav-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

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

.nav-tab.active {
    color: var(--aws-orange);
    border-bottom-color: var(--aws-orange);
    font-weight: 500;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 24px;
}

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

.card-header h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
}

/* Account List */
.account-list {
    display: grid;
    gap: 16px;
}

.account-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--aws-light);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.account-info h3 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.account-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.account-info .status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-top: 4px;
}

.account-info .status.valid {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.account-info .status.invalid {
    background: rgba(209, 50, 18, 0.15);
    color: var(--error);
}

.account-info .status.pending {
    background: rgba(240, 173, 78, 0.15);
    color: var(--warning);
}

/* Pending Badge */
.pending-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    background: rgba(240, 173, 78, 0.2);
    color: #b8860b;
    margin-left: 8px;
    font-weight: 500;
}

/* Pending State in Wizard */
.pending-state {
    text-align: center;
    padding: 24px;
}

.pending-state .pending-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.pending-state h3 {
    color: var(--text-primary);
    margin-bottom: 8px;
}

.pending-state .pending-subtitle {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.pending-state .pending-message {
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================================================
   Bootstrap Wizard - Capability Selection Styles
   Requirements: 1.1, 1.2, 1.3, 1.4, 2.1, 2.2
   ============================================================================ */

/* Auth Type Selection */
.auth-type-selection {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wizard-intro {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.auth-option {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.auth-option:hover {
    border-color: var(--aws-orange);
    background: rgba(255, 153, 0, 0.03);
}

.auth-option.selected {
    border-color: var(--aws-orange);
    background: rgba(255, 153, 0, 0.08);
}

.auth-option-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-option-header input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--aws-orange);
}

.auth-option-header label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
}

.auth-option-title {
    font-weight: 600;
    color: var(--text-primary);
}

.auth-option-desc {
    margin: 8px 0 0 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Capability Selection Step */
.capability-selection {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.capabilities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.capability-item {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.capability-item:hover {
    border-color: var(--aws-orange);
    background: rgba(255, 153, 0, 0.03);
}

.capability-item.selected {
    border-color: var(--success);
    background: rgba(40, 167, 69, 0.05);
}

.capability-item.required {
    border-color: var(--success);
    background: rgba(40, 167, 69, 0.08);
}

.capability-item.required .capability-checkbox {
    cursor: not-allowed;
}

.capability-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.capability-header .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.capability-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--success);
    cursor: pointer;
}

.capability-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.capability-description {
    margin: 8px 0 12px 28px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.capability-permissions {
    margin-left: 28px;
    padding: 10px 12px;
    background: var(--aws-light);
    border-radius: 6px;
    font-size: 0.8rem;
}

.permissions-label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-right: 6px;
}

.permissions-summary {
    color: var(--text-secondary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    word-break: break-word;
}

/* Badge Styles for Capability Selection */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-recommended {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(240, 173, 78, 0.2);
    color: #b8860b;
}

.badge-required {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
    margin-left: 8px;
}

/* Role Manager Section */
.role-manager-section {
    margin-top: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.role-manager-section h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.role-manager-option {
    padding: 12px 16px;
    background: var(--aws-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.role-manager-option .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.role-manager-option .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--aws-orange);
}

.role-manager-option .checkbox-text {
    font-weight: 600;
    color: var(--text-primary);
}

.role-manager-option .hint {
    margin: 8px 0 0 28px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Selected Capabilities Summary (shown in credentials step) */
.selected-capabilities-summary {
    padding: 12px 16px;
    background: rgba(0, 168, 107, 0.08);
    border: 1px solid rgba(0, 168, 107, 0.2);
    border-radius: 8px;
    margin-bottom: 16px;
}

.selected-capabilities-summary h4 {
    margin: 0 0 4px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.selected-capabilities-summary p {
    margin: 0;
    color: var(--text-primary);
}

.selected-capabilities-summary .role-manager-enabled {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--success);
}

/* Bootstrap Flow Styles */
.bootstrap-flow {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-section {
    padding-bottom: 16px;
}

.step-section:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.step-section h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.step-section p {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Code Block */
.code-block {
    position: relative;
    background: var(--aws-dark);
    border-radius: 8px;
    padding: 16px;
    margin: 12px 0;
}

.code-block pre {
    margin: 0;
    color: #e6e6e6;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.code-block .copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    font-size: 0.75rem;
}

/* Download Section */
.download-section {
    margin-top: 12px;
}

/* Config Items (for manual role flow) */
.config-item {
    margin-bottom: 12px;
}

.config-item label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

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

.config-value code {
    background: var(--aws-light);
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
}

.copy-inline-btn {
    padding: 4px 8px !important;
    font-size: 0.8rem !important;
    min-width: auto !important;
}

/* Setup Options */
.setup-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

/* Warning Box (for access keys flow) */
.warning-box {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 16px;
}

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

.warning-icon {
    font-size: 1.2rem;
}

.warning-title {
    font-weight: 600;
    color: var(--error);
}

.warning-content {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.warning-content p {
    margin: 0 0 8px 0;
}

.warning-list {
    margin: 8px 0;
    padding-left: 20px;
}

.warning-list li {
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.warning-recommendation {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(220, 53, 69, 0.2);
}

.warning-acknowledgment {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(220, 53, 69, 0.2);
}

.warning-acknowledgment label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.warning-acknowledgment input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* Migration Info Box */
.migration-info {
    background: rgba(0, 123, 255, 0.08);
    border: 1px solid rgba(0, 123, 255, 0.2);
}

/* Success State */
.success-state {
    text-align: center;
    padding: 24px;
}

.success-state .success-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.success-state h3 {
    color: var(--success);
    margin-bottom: 8px;
}

.success-state .success-subtitle {
    color: var(--text-secondary);
    font-family: monospace;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.success-state .success-message {
    color: var(--text-secondary);
    line-height: 1.5;
}

.account-actions {
    display: flex;
    gap: 8px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

.empty-state h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    margin: 20px;
}

.modal.modal-wide {
    max-width: 680px;
}

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

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.spinner.dark {
    border-color: rgba(0, 0, 0, 0.1);
    border-top-color: var(--aws-orange);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .auth-card {
        padding: 24px;
    }
    
    .app-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .nav-tabs {
        overflow-x: auto;
    }
    
    .account-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .account-actions {
        width: 100%;
    }
    
    .account-actions .btn {
        flex: 1;
    }
}


/* Admin Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--aws-light);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.data-table td {
    font-size: 0.9rem;
}

.data-table tr:hover {
    background: rgba(255, 153, 0, 0.05);
}

.data-table .actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Role Badge */
.role-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.role-badge.admin {
    background: rgba(255, 153, 0, 0.15);
    color: #b36b00;
}

.role-badge.standard {
    background: rgba(104, 112, 120, 0.15);
    color: var(--text-secondary);
}

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

.status-badge.confirmed {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.status-badge.force_change_password {
    background: rgba(240, 173, 78, 0.15);
    color: #8a6d3b;
}

.status-badge.unconfirmed {
    background: rgba(209, 50, 18, 0.15);
    color: var(--error);
}

/* Role Select */
.role-select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
}

.role-select:disabled {
    background: var(--aws-light);
    cursor: not-allowed;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

/* Error State */
.error-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--error);
}

/* Form Select */
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.form-group select:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.15);
}

/* Button disabled state */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* Asset Management Styles */
.asset-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.account-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 280px;
    background: white;
}

.account-select:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.15);
}

/* Asset Type Tabs */
.asset-type-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
    overflow-x: auto;
}

.asset-type-tab,
.user-type-tab {
    padding: 10px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.asset-type-tab:hover,
.user-type-tab:hover {
    color: var(--text-primary);
}

.asset-type-tab.active,
.user-type-tab.active {
    color: var(--aws-orange);
    border-bottom-color: var(--aws-orange);
    font-weight: 500;
}

.asset-type-tab .count,
.user-type-tab .count {
    background: var(--aws-light);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.asset-type-tab.active .count,
.user-type-tab.active .count {
    background: rgba(255, 153, 0, 0.15);
    color: var(--aws-orange);
}

/* Asset Table */
.asset-table {
    width: 100%;
}

.asset-table .monospace {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Import Mode Badge */
.import-mode-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.import-mode-badge.spice {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.import-mode-badge.direct_query {
    background: rgba(104, 112, 120, 0.15);
    color: var(--text-secondary);
}

/* Type Badge */
.type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.type-badge.custom {
    background: rgba(255, 153, 0, 0.15);
    color: #b36b00;
}

.type-badge.builtin {
    background: rgba(104, 112, 120, 0.15);
    color: var(--text-secondary);
}

/* Status Badge Extensions */
.status-badge.success,
.status-badge.creation_successful,
.status-badge.update_successful {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.status-badge.error,
.status-badge.failed {
    background: rgba(209, 50, 18, 0.15);
    color: var(--error);
}

.status-badge.pending,
.status-badge.in_progress {
    background: rgba(240, 173, 78, 0.15);
    color: #8a6d3b;
}

/* Asset JSON Display */
.asset-json {
    background: var(--aws-light);
    padding: 16px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Large Modal */
.modal-large {
    max-width: 700px;
}

/* Troubleshooting Guide Styles */
.troubleshooting-link {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
}

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

.troubleshooting-content {
    max-height: 60vh;
    overflow-y: auto;
}

.troubleshooting-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.troubleshooting-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.troubleshooting-section h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.troubleshooting-section p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.troubleshooting-section ul,
.troubleshooting-section ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.troubleshooting-section li {
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.troubleshooting-section code {
    background: var(--background-light);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
}

.troubleshooting-section a {
    color: var(--primary-color);
}

.troubleshooting-section a:hover {
    text-decoration: underline;
}

/* Loading State with Spinner */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loading .spinner {
    width: 32px;
    height: 32px;
}

/* Button with spinner */
.btn .spinner {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    vertical-align: middle;
}


/* Text Truncation for Long Names */
.text-truncate-cell {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Fixed table layout for proper truncation */
.data-table.fixed-layout {
    table-layout: fixed;
    width: 100%;
}

.data-table.fixed-layout th,
.data-table.fixed-layout td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Column widths for asset tables */
.data-table.fixed-layout .col-name {
    width: 25%;
}

.data-table.fixed-layout .col-id {
    width: 25%;
}

.data-table.fixed-layout .col-mode,
.data-table.fixed-layout .col-type,
.data-table.fixed-layout .col-status {
    width: 10%;
}

.data-table.fixed-layout .col-date {
    width: 12%;
}

.data-table.fixed-layout .col-actions {
    width: 18%;
}

/* Checkbox column for selection */
.data-table.fixed-layout .col-checkbox {
    width: 40px;
    text-align: center;
}

.data-table .col-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Selected row styling */
.data-table tr.selected {
    background: rgba(255, 153, 0, 0.1);
}

.data-table tr.selected:hover {
    background: rgba(255, 153, 0, 0.15);
}

/* Bulk Action Toolbar */
.bulk-action-toolbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--aws-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 16px;
}

.bulk-action-toolbar.visible {
    display: flex;
}

.bulk-action-toolbar #selection-count {
    font-weight: 500;
    color: var(--text-primary);
}

.bulk-action-toolbar .bulk-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.bulk-action-toolbar .btn-link {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
}

.bulk-action-toolbar .btn-link:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

/* Responsive Table Wrapper */
.table-responsive-wrapper {
    overflow-x: auto;
    max-width: 100%;
}

/* Asset JSON Display in Modal */
.asset-json-display {
    max-height: 60vh;
    overflow-y: auto;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Info Button Style */
.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}


/* App Footer with Version */
.app-footer {
    background: var(--aws-dark);
    color: var(--text-secondary);
    padding: 12px 24px;
    text-align: center;
    font-size: 0.75rem;
    border-top: 1px solid #3d4f5f;
}

.app-footer #app-version {
    color: #aab7b8;
}

/* Server Configuration Styles */
.config-section {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    background: #fafafa;
}

.config-section-title {
    color: var(--aws-dark);
    font-size: 1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.config-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.config-toggle-item {
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.config-toggle-item:hover {
    border-color: var(--aws-orange);
}

.config-toggle-item .form-check {
    margin: 0;
}

.config-toggle-item .form-check-label {
    cursor: pointer;
    width: 100%;
}

.config-toggle-item .form-check-label strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.config-toggle-item .form-check-label small {
    display: block;
    margin-top: 2px;
}

.config-metadata {
    padding: 8px 12px;
    background: #e9ecef;
    border-radius: 4px;
}

/* Form Switch Styling */
.form-check-input {
    width: 40px;
    height: 20px;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--aws-orange);
    border-color: var(--aws-orange);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.25);
}

.form-switch {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.form-switch .form-check-input {
    flex-shrink: 0;
    margin-top: 4px;
}

/* Card body for config */
.card-body {
    padding: 20px;
}

/* Margin bottom utility */
.mb-4 {
    margin-bottom: 24px;
}

/* Toast notifications */
.toast-container {
    z-index: 1100;
}

.toast {
    min-width: 250px;
    border-radius: 6px;
}

.toast-body {
    padding: 12px 16px;
}

/* Self-contained admin toast (no Bootstrap JS dependency) */
.admin-toast {
    pointer-events: auto;
    min-width: 280px;
    max-width: 420px;
    padding: 12px 16px;
    border-radius: 6px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.admin-toast-visible {
    opacity: 1;
    transform: translateX(0);
}
.admin-toast-success { background-color: var(--success, #28a745); }
.admin-toast-error   { background-color: var(--danger, #dc3545); }
.admin-toast-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0.8;
}
.admin-toast-close:hover { opacity: 1; }

.bg-success {
    background-color: var(--success) !important;
}

.bg-danger {
    background-color: var(--error) !important;
}

.btn-close-white {
    filter: brightness(0) invert(1);
}


/* Account Config Styles */
.config-section-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.config-section-card h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.config-section-card .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.config-section-card .section-header h3 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.config-item.full-width {
    grid-column: 1 / -1;
}

.config-item label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.config-item span {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.config-item .monospace {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    background: var(--aws-light);
    padding: 4px 8px;
    border-radius: 4px;
    word-break: break-all;
}

.config-section {
    margin-top: 16px;
}

.config-section h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.domain-list, .rule-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.domain-list li, .rule-list li {
    padding: 8px 12px;
    background: var(--aws-light);
    border-radius: 4px;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.rule-list li code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 8px;
}

/* Badge styles for Account Config */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-primary {
    background: var(--aws-orange);
    color: white;
}

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

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

.badge-danger {
    background: var(--error);
    color: white;
}

.badge-secondary {
    background: var(--text-secondary);
    color: white;
}

.text-muted {
    color: var(--text-secondary);
    font-style: italic;
}

/* Margin utility */
.mb-4 {
    margin-bottom: 24px;
}

/* ============================================================================
   Capabilities Section Styles
   Requirements: 28.1, 28.2, 28.3, 28.4
   ============================================================================ */

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.capability-card {
    position: relative;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.capability-card.enabled {
    border-color: var(--success);
    background: linear-gradient(to bottom right, white, rgba(40, 167, 69, 0.03));
}

.capability-card.disabled {
    opacity: 0.85;
}

.capability-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.capability-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--aws-orange);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.capability-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.capability-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.capability-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.capability-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.capability-details {
    background: var(--aws-light);
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
}

.capability-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.capability-detail:last-child {
    margin-bottom: 0;
}

.capability-detail label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.capability-detail code.role-arn {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    background: white;
    padding: 6px 8px;
    border-radius: 4px;
    word-break: break-all;
    border: 1px solid var(--border-color);
}

/* Toggle Switch for Capabilities */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

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

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

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

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--success);
}

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

.toggle-switch input:disabled + .toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Badge info variant */
.badge-info {
    background: #17a2b8;
    color: white;
}

/* Alert styles for capabilities */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert .icon {
    flex-shrink: 0;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    border: 1px solid rgba(23, 162, 184, 0.3);
    color: #0c5460;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #856404;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 16px;
}

.mt-3 {
    margin-top: 16px;
}

.mt-2 {
    margin-top: 8px;
}

.mb-0 {
    margin-bottom: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Capability Progress Overlay - Requirements 28.5 */
.capability-progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 8px;
    animation: fadeIn 0.2s ease;
}

.capability-progress-overlay.fade-out {
    animation: fadeOut 0.2s ease forwards;
}

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

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

.capability-progress-content {
    text-align: center;
    padding: 32px;
}

.capability-progress-content .spinner.large {
    width: 48px;
    height: 48px;
    border-width: 3px;
    margin-bottom: 16px;
}

.capability-progress-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.capability-progress-content .progress-detail {
    margin: 0 0 4px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.capability-progress-content .progress-hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted, #999);
}

/* Affected Features List - Requirements 28.6 */
.affected-features-list {
    margin: 8px 0 0 0;
    padding-left: 20px;
    font-size: 0.9rem;
}

.affected-features-list li {
    margin-bottom: 4px;
}

.affected-features-list li:last-child {
    margin-bottom: 0;
}

/* Legacy Account Notice - Requirements 29.6 */
.legacy-account-notice {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.08) 0%, rgba(255, 193, 7, 0.02) 100%);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 24px;
}

.legacy-notice-header {
    margin-bottom: 16px;
}

.badge-large {
    font-size: 0.95rem;
    padding: 6px 14px;
}

.legacy-notice-content {
    margin-bottom: 20px;
}

.legacy-notice-content p {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.legacy-notice-content p:last-child {
    margin-bottom: 0;
}

.legacy-benefits-list {
    margin: 12px 0 0 0;
    padding-left: 24px;
}

.legacy-benefits-list li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.legacy-benefits-list li:last-child {
    margin-bottom: 0;
}

.legacy-benefits-list strong {
    color: var(--aws-primary);
}

.legacy-notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.legacy-notice-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legacy-notice-actions .btn .icon {
    font-size: 1.1em;
}

.legacy-notice-info {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    padding: 12px 16px;
}

.legacy-notice-info .hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.legacy-notice-info .hint strong {
    color: var(--text-primary);
}

/* Legacy Configuration Badge in Section Header */
#legacy-config-badge {
    background: var(--warning);
    color: var(--text-primary);
    font-weight: 500;
}

/* Alert content with nested elements */
.alert > div {
    flex: 1;
}

.alert code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
}

/* Text utilities */
.text-muted {
    color: var(--text-secondary);
}


/* ============================================================================
   Asset Relationships Styles
   ============================================================================ */

/* Asset Detail Tabs */
.asset-detail-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.asset-detail-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px 4px 0 0;
    transition: all 0.2s;
}

.asset-detail-tab:hover {
    color: var(--text-primary);
    background: var(--aws-light);
}

.asset-detail-tab.active {
    color: var(--aws-orange);
    border-bottom: 2px solid var(--aws-orange);
}

.asset-detail-tab-content {
    padding: 16px 0;
}

/* Permissions Table */
.permissions-header {
    padding: 12px;
    background: var(--aws-light);
    border-radius: 6px;
}

.permissions-list table {
    width: 100%;
    border-collapse: collapse;
}

.permissions-list th,
.permissions-list td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.permissions-list th {
    background: var(--aws-light);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.permissions-list td {
    font-size: 0.9rem;
}

/* Lineage Tree */
.lineage-info {
    padding: 8px 12px;
    background: var(--aws-light);
    border-radius: 6px;
}

.lineage-tree {
    padding: 16px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.lineage-node {
    padding: 8px 12px;
    margin: 4px 0;
    background: white;
    border-radius: 4px;
    border-left: 3px solid var(--aws-orange);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lineage-node:hover {
    background: var(--aws-light);
}

.lineage-icon {
    font-size: 1.2rem;
}

.lineage-node-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

.lineage-node-link:hover {
    color: var(--aws-orange);
    text-decoration: underline;
}

/* Dependents List */
.dependents-list {
    padding: 8px;
}

.dependent-group {
    margin-bottom: 16px;
}

.dependent-group h6 {
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

.dependent-group ul {
    margin: 0;
    padding: 0;
}

.dependent-group li {
    padding: 6px 0;
}

.dependent-link {
    color: var(--text-primary);
    text-decoration: none;
}

.dependent-link:hover {
    color: var(--aws-orange);
    text-decoration: underline;
}

/* User Groups List */
.list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-group-item {
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--border-color);
    margin-bottom: -1px;
}

.list-group-item:first-child {
    border-radius: 6px 6px 0 0;
}

.list-group-item:last-child {
    border-radius: 0 0 6px 6px;
    margin-bottom: 0;
}

/* Bootstrap-like badge utilities */
.bg-primary { background-color: var(--aws-orange) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-info { background-color: #17a2b8 !important; }
.bg-warning { background-color: var(--warning) !important; color: var(--text-primary) !important; }
.bg-secondary { background-color: var(--text-secondary) !important; }

.badge.bg-primary,
.badge.bg-success,
.badge.bg-info,
.badge.bg-secondary {
    color: white;
}

/* Margin utilities */
.ms-1 { margin-left: 4px; }
.ms-2 { margin-left: 8px; }
.ms-3 { margin-left: 16px; }
.mb-3 { margin-bottom: 16px; }

/* Alert styles */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.alert-warning {
    background: rgba(240, 173, 78, 0.15);
    border: 1px solid var(--warning);
    color: #8a6d3b;
}

.alert-info {
    background: rgba(23, 162, 184, 0.15);
    border: 1px solid #17a2b8;
    color: #0c5460;
}

/* Text utilities */
.text-warning {
    color: var(--warning);
}

/* Table utilities */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table-sm th,
.table-sm td {
    padding: 6px 10px;
}

/* ============================================================================
   Detail Modal Sections
   ============================================================================ */

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.detail-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.detail-label {
    flex: 0 0 140px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
}

.detail-value {
    flex: 1;
    color: var(--text-primary);
    font-size: 13px;
    word-break: break-word;
}

/* Tags for group/member lists */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-primary);
}

.tag:hover {
    background: var(--bg-tertiary);
}

/* Collapsible details */
details {
    margin-top: 8px;
}

details summary {
    cursor: pointer;
    color: var(--primary);
    font-size: 13px;
    padding: 4px 0;
}

details summary:hover {
    text-decoration: underline;
}

details[open] summary {
    margin-bottom: 8px;
}

/* Text utilities */
.text-muted {
    color: var(--text-secondary);
    font-style: italic;
}


/* ============================================================================
   Migration Compatibility Styles
   ============================================================================ */

.migration-support-summary {
    padding: 1rem;
}

.migration-support-summary h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.support-section {
    margin-bottom: 1.5rem;
}

.support-section h4 {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.support-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.support-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.25rem;
}

.support-list.supported li {
    background-color: rgba(40, 167, 69, 0.1);
}

.support-list.partial li {
    background-color: rgba(255, 193, 7, 0.1);
}

.support-list.not-supported li {
    background-color: rgba(220, 53, 69, 0.1);
}

.support-list .asset-type {
    font-weight: 500;
    text-transform: capitalize;
}

.support-list .asset-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.recommendations-list {
    padding-left: 1.5rem;
    margin: 0;
}

.recommendations-list li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Compatibility Assessment */
.compatibility-assessment {
    padding: 1rem;
}

.assessment-summary {
    margin-bottom: 1.5rem;
}

.summary-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.summary-stats .stat.can-migrate {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.summary-stats .stat.cannot-migrate {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.summary-stats .stat-icon {
    font-size: 1.5rem;
}

.stat-counts {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-counts .count {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.stat-counts .count.supported {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.stat-counts .count.partial {
    background-color: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.stat-counts .count.setup {
    background-color: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
}

.stat-counts .count.blocked {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.blockers-section,
.warnings-section,
.recommendations-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
}

.blockers-section {
    background-color: rgba(220, 53, 69, 0.1);
}

.warnings-section {
    background-color: rgba(255, 193, 7, 0.1);
}

.recommendations-section {
    background-color: rgba(23, 162, 184, 0.1);
}

.blockers-list,
.warnings-list {
    padding-left: 1.5rem;
    margin: 0.5rem 0 0 0;
}

.blockers-list li {
    color: #dc3545;
}

.warnings-list li {
    color: #856404;
}

/* Assessment Table */
.assessment-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.assessment-table th,
.assessment-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.assessment-table th {
    background-color: var(--bg-secondary);
    font-weight: 500;
}

.assessment-table tr.supported {
    background-color: rgba(40, 167, 69, 0.05);
}

.assessment-table tr.partial {
    background-color: rgba(255, 193, 7, 0.05);
}

.assessment-table tr.setup-required {
    background-color: rgba(23, 162, 184, 0.05);
}

.assessment-table tr.not-supported {
    background-color: rgba(220, 53, 69, 0.05);
}

.assessment-table .status-cell {
    width: 50px;
    text-align: center;
    font-size: 1.2rem;
}

.assessment-table .type-cell {
    text-transform: capitalize;
    font-weight: 500;
}

.assessment-table .notes-cell .blocker {
    color: #dc3545;
    font-size: 0.85rem;
}

.assessment-table .notes-cell .warning {
    color: #856404;
    font-size: 0.85rem;
}

.assessment-table .notes-cell .info {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Migration Badge */
.migration-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: help;
}

.migration-badge.supported {
    background-color: rgba(40, 167, 69, 0.15);
}

.migration-badge.partial {
    background-color: rgba(255, 193, 7, 0.15);
}

.migration-badge.setup-required {
    background-color: rgba(23, 162, 184, 0.15);
}

.migration-badge.not-supported {
    background-color: rgba(220, 53, 69, 0.15);
}

.migration-badge-cell {
    width: 40px;
    text-align: center;
}

/* Assets Section */
.assets-section {
    margin-top: 1.5rem;
}

.assets-section h4 {
    margin-bottom: 0.5rem;
}


/* Rename Preview */
.rename-preview {
    background: var(--aws-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.rename-preview .preview-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: 0.9rem;
}

.rename-preview .old-name {
    color: var(--text-secondary);
    text-decoration: line-through;
}

.rename-preview .arrow {
    color: var(--aws-orange);
}

.rename-preview .new-name {
    color: var(--success);
    font-weight: 500;
}

.rename-preview .preview-more {
    color: var(--text-secondary);
    font-style: italic;
    padding-top: 8px;
}

/* Asset count in modals */
.asset-count {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* Delete asset list */
.delete-asset-list ul {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    max-height: 150px;
    overflow-y: auto;
}

.delete-asset-list li {
    padding: 4px 0;
    font-size: 0.9rem;
}

.delete-asset-list li.more {
    color: var(--text-secondary);
    font-style: italic;
}

.warning-text {
    color: var(--error);
    font-size: 0.9rem;
    margin-top: 12px;
}

/* Notifications */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 450px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.notification-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.notification-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.notification-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.notification-message {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    margin-left: 12px;
}

.notification-close:hover {
    opacity: 1;
}

/* Modal message alerts */
.modal-message {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.modal-message.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.modal-message.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.modal-message.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Wizard Message Styles */
.wizard-message {
    display: none;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.wizard-message-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.wizard-message-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wizard-message-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Current Folder Assignments in Move Modal */
.current-folders-section {
    margin-bottom: 20px;
    padding: 12px;
    background: var(--aws-light);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.current-folders-section h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.current-folders-list {
    max-height: 200px;
    overflow-y: auto;
}

.current-folders-list .loading-text,
.current-folders-list .error-text,
.current-folders-list .no-data {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.current-folders-list .error-text {
    color: #dc3545;
}

.folder-group {
    margin-bottom: 12px;
}

.folder-group:last-child {
    margin-bottom: 0;
}

.folder-group-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.folder-assignment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.folder-assignment-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    font-size: 0.85rem;
    background: white;
    border-radius: 4px;
    margin-bottom: 4px;
}

.folder-assignment-list li:last-child {
    margin-bottom: 0;
}

.folder-assignment-list .asset-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.folder-assignment-list .folder-badge {
    background: var(--aws-orange);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.folder-assignment-list.no-folder li {
    background: #f8f9fa;
    color: var(--text-secondary);
}

.folder-assignment-list .more-items {
    font-style: italic;
    color: var(--text-secondary);
    background: transparent;
}

/* Current Namespace Access in Namespace Modal */
.current-namespace-section {
    margin-bottom: 20px;
    padding: 12px;
    background: var(--aws-light);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.current-namespace-section h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Namespace Info Box - explains how namespace access works */
.namespace-info-box {
    margin-bottom: 16px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f7ff 100%);
    border-radius: 8px;
    border-left: 4px solid var(--aws-orange);
}

.namespace-info-box .info-text {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.namespace-info-box .info-text strong {
    color: var(--aws-squid-ink);
}

.namespace-info-box .info-text em {
    font-style: italic;
    color: var(--aws-orange);
    font-weight: 500;
}

.namespace-info-box .hint-text {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.current-namespace-list {
    max-height: 200px;
    overflow-y: auto;
}

.current-namespace-list .loading-text,
.current-namespace-list .error-text,
.current-namespace-list .no-data {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.current-namespace-list .error-text {
    color: #dc3545;
}

.namespace-group {
    margin-bottom: 12px;
}

.namespace-group:last-child {
    margin-bottom: 0;
}

.namespace-group-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.namespace-assignment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.namespace-assignment-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    font-size: 0.85rem;
    background: white;
    border-radius: 4px;
    margin-bottom: 4px;
}

.namespace-assignment-list li:last-child {
    margin-bottom: 0;
}

.namespace-assignment-list .asset-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.namespace-assignment-list .namespace-badge {
    background: #6c5ce7;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.namespace-assignment-list.no-namespace li {
    background: #f8f9fa;
    color: var(--text-secondary);
}

.namespace-assignment-list .more-items {
    font-style: italic;
    color: var(--text-secondary);
    background: transparent;
}

.namespace-principal-picker {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.spinner.small {
    width: 14px;
    height: 14px;
    border-width: 2px;
    vertical-align: middle;
    margin-right: 6px;
}

/* ============================================================================
   File Browser Styles
   ============================================================================ */

/* Main file browser layout */
.file-browser {
    display: flex;
    height: calc(100vh - 200px);
    min-height: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Sidebar */
.file-browser-sidebar {
    width: 250px;
    min-width: 200px;
    max-width: 350px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background: #fafafa;
}

.file-browser-sidebar .sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: white;
}

.file-browser-sidebar .sidebar-header h3 {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Folder tree */
.folder-tree {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.folder-tree-node {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 4px;
    margin: 1px 4px;
    transition: background 0.15s;
    user-select: none;
}

.folder-tree-node:hover {
    background: rgba(255, 153, 0, 0.1);
}

.folder-tree-node.selected {
    background: rgba(255, 153, 0, 0.2);
    font-weight: 500;
}

.folder-tree-node.root {
    font-weight: 500;
    margin-bottom: 8px;
    padding-left: 12px !important;
}

.folder-tree-expand {
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: transform 0.2s ease, color 0.15s;
    flex-shrink: 0;
    margin-right: 4px;
}

.folder-tree-expand:hover {
    color: var(--aws-orange);
}

.folder-tree-expand.hidden {
    visibility: hidden;
}

.folder-tree-icon {
    margin-right: 10px;
    font-size: 1rem;
    flex-shrink: 0;
    min-width: 20px;
}

.folder-tree-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.folder-tree-count {
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: rgba(0,0,0,0.06);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    flex-shrink: 0;
}

/* Tree children container with animation */
.folder-tree-children {
    overflow: hidden;
    transition: max-height 0.25s ease-out, opacity 0.2s ease;
}

.folder-tree-children.expanded {
    max-height: 2000px;
    opacity: 1;
}

.folder-tree-children.collapsed {
    max-height: 0;
    opacity: 0;
}

.tree-loading, .tree-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.tree-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Main content area */
.file-browser-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Toolbar */
.file-browser-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: white;
    gap: 16px;
}

.file-browser-toolbar .toolbar-left {
    flex-shrink: 0;
}

.file-browser-toolbar .toolbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 400px;
}

.file-browser-toolbar .toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.file-browser-toolbar .toolbar-search {
    position: relative;
    width: 100%;
}

.file-browser-toolbar .toolbar-search .search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
}

.file-browser-toolbar .toolbar-search .search-input {
    width: 100%;
    padding-left: 32px;
}

.file-browser-toolbar .view-toggles {
    display: flex;
    gap: 2px;
    background: var(--aws-light);
    border-radius: 4px;
    padding: 2px;
}

/* Filter Bar */
.file-browser-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
    flex-wrap: wrap;
}

.file-browser-filters .filters-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.file-browser-filters .filters-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-browser-filters .filters-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Chips */
.filter-chip-container {
    position: relative;
}

.filter-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-chip:hover {
    border-color: var(--aws-orange);
    background: #fff8f0;
}

.filter-chip.active {
    background: var(--aws-orange);
    color: white;
    border-color: var(--aws-orange);
}

.filter-chip-icon {
    font-size: 0.9rem;
}

.filter-chip-label {
    white-space: nowrap;
}

.filter-chip-arrow {
    font-size: 0.65rem;
    opacity: 0.7;
}

.filter-clear-btn {
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    border-radius: 4px;
}

.filter-clear-btn:hover {
    background: rgba(0,0,0,0.05);
    color: var(--error);
}

.filter-clear-btn.hidden {
    display: none;
}

/* Filter Dropdown */
.filter-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 1000;
}

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

.filter-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.filter-select-all-btn {
    padding: 2px 8px;
    background: var(--aws-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.filter-select-all-btn:hover {
    background: var(--aws-orange);
    color: white;
    border-color: var(--aws-orange);
}

.filter-dropdown-list {
    padding: 8px 0;
    max-height: 250px;
    overflow-y: auto;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
}

.filter-option:hover {
    background: #f8f9fa;
}

.filter-option input {
    margin: 0;
}

.filter-dropdown-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* Breadcrumb Bar */
.file-browser-breadcrumb-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    min-height: 32px;
}

.file-browser-breadcrumb-bar .breadcrumb-icon {
    font-size: 0.9rem;
    opacity: 0.7;
}

.file-browser-toolbar .nav-buttons,
.file-browser-filters .nav-buttons {
    display: flex;
    gap: 4px;
}

.file-browser-toolbar .btn-icon,
.file-browser-filters .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 4px;
}

.file-browser-toolbar .btn-icon:hover:not(:disabled),
.file-browser-filters .btn-icon:hover:not(:disabled) {
    background: #e9ecef;
}

.file-browser-toolbar .btn-icon:disabled,
.file-browser-filters .btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.file-browser-toolbar .btn-icon.active {
    background: var(--aws-orange);
    color: white;
    border-color: var(--aws-orange);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    overflow: hidden;
    flex: 1;
}

.breadcrumb-item {
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.breadcrumb-item:hover {
    color: var(--aws-orange);
    background: rgba(255, 153, 0, 0.1);
}

.breadcrumb-item:last-child {
    color: var(--text-primary);
    font-weight: 500;
    background: var(--aws-light);
}

.breadcrumb-separator {
    color: var(--border-color);
    font-size: 0.8rem;
}

/* Search input */
.search-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    width: 100%;
    transition: all 0.15s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.15);
}

/* Selection toolbar */
.selection-toolbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: rgba(255, 153, 0, 0.1);
    border-bottom: 1px solid rgba(255, 153, 0, 0.3);
}

.selection-toolbar.visible {
    display: flex;
}

.selection-toolbar .selection-actions {
    display: flex;
    gap: 8px;
}

/* Content panel */
.file-browser-content {
    flex: 1;
    overflow: auto;
    padding: 0;
}

/* Browser list view */
.browser-list {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.browser-list th,
.browser-list td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.browser-list th {
    background: var(--aws-light);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 1;
}

.browser-list .col-checkbox {
    width: 36px;
    text-align: center;
}

.browser-list .col-icon {
    width: 50px;
    text-align: center;
    font-size: 1.1rem;
}

.browser-list .col-name {
    width: auto;
}

.browser-list .col-name .item-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.browser-list .col-type {
    width: 90px;
}

.browser-list .col-subtype {
    width: 100px;
}

.browser-list .col-date {
    width: 90px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.browser-list .col-actions {
    width: 86px;
    text-align: right;
    white-space: nowrap;
}

.browser-list .col-actions .action-buttons {
    display: inline-flex;
    gap: 4px;
    justify-content: flex-end;
}

.browser-row {
    transition: background 0.15s;
}

.browser-row:hover {
    background: rgba(255, 153, 0, 0.05);
}

.browser-row.selected {
    background: rgba(255, 153, 0, 0.1);
}

.browser-row .item-name {
    font-weight: 500;
}

/* Type badges for browser */
.type-badge.folder {
    background: rgba(104, 112, 120, 0.15);
    color: var(--text-secondary);
}

.type-badge.dashboard {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.type-badge.dataset {
    background: rgba(23, 162, 184, 0.15);
    color: #0c5460;
}

.type-badge.data_source {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.type-badge.topic {
    background: rgba(111, 66, 193, 0.15);
    color: #6f42c1;
}

.type-badge.analysis {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.type-badge.theme {
    background: rgba(255, 153, 0, 0.15);
    color: var(--aws-orange);
}

/* Sub-type badges */
.subtype-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
}

.subtype-badge.subtype-shared {
    background: rgba(104, 112, 120, 0.1);
    color: var(--text-secondary);
}

.subtype-badge.subtype-scaled {
    background: rgba(23, 162, 184, 0.15);
    color: #0c5460;
}

.subtype-badge.subtype-restricted {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.subtype-badge.subtype-spice {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.subtype-badge.subtype-direct {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.subtype-badge.subtype-datasource {
    background: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
}

.subtype-badge.subtype-topic {
    background: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
}

.subtype-badge.subtype-none {
    color: var(--text-secondary);
    background: transparent;
}

/* Icon buttons for actions */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.15s;
}

.btn-icon:hover {
    background: rgba(255, 153, 0, 0.15);
}

.btn-icon:active {
    background: rgba(255, 153, 0, 0.25);
}

.btn-icon.browser-refresh-btn {
    color: var(--success);
}

.btn-icon.browser-refresh-btn:hover {
    background: rgba(0, 168, 107, 0.15);
}

.btn-icon.browser-refresh-btn.refreshing {
    animation: spin 1s linear infinite;
}

.btn-icon.browser-refresh-btn.success {
    color: var(--success);
}

.btn-icon.browser-refresh-btn.error {
    color: var(--error);
}

/* Browser grid view */
.browser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    padding: 16px;
}

.browser-grid-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px;
    border-radius: 8px;
    transition: background 0.15s;
    text-align: center;
}

.browser-grid-item:hover {
    background: rgba(255, 153, 0, 0.1);
}

.browser-grid-item.selected {
    background: rgba(255, 153, 0, 0.2);
}

.browser-grid-item .grid-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

.browser-grid-item .grid-name {
    font-size: 0.85rem;
    font-weight: 500;
    word-break: break-word;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
}

.browser-grid-item .grid-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* SPICE refresh button in grid view */
.browser-grid-item .grid-refresh-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    padding: 0;
    font-size: 14px;
    border-radius: 50%;
    background: var(--aws-orange);
    color: white;
    border: none;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.browser-grid-item:hover .grid-refresh-btn {
    opacity: 1;
}

.browser-grid-item .grid-refresh-btn:hover {
    background: #cc7a00;
}

.browser-grid-item .grid-refresh-btn.success {
    background: #28a745;
}

.browser-grid-item .grid-refresh-btn.error {
    background: #dc3545;
}

/* SPICE badge indicator */
.browser-grid-item .spice-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
    color: var(--aws-orange);
}

/* Small spinner for refresh button */
.spinner-small {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

/* Empty and loading states */
.browser-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary);
    height: 100%;
}

.browser-empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.browser-empty-state h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.browser-empty-state p {
    margin: 0;
}

.browser-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    height: 100%;
}

.browser-loading p {
    margin-top: 12px;
    color: var(--text-secondary);
}

.browser-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: var(--error);
}

.browser-error .btn {
    margin-top: 16px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .file-browser {
        flex-direction: column;
        height: auto;
    }
    
    .file-browser-sidebar {
        width: 100%;
        max-width: none;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .file-browser-toolbar {
        flex-direction: column;
        gap: 12px;
        padding: 12px;
    }
    
    .file-browser-toolbar .toolbar-primary {
        flex-direction: column;
        width: 100%;
    }
    
    .file-browser-toolbar .toolbar-primary .account-select {
        width: 100%;
    }
    
    .file-browser-toolbar .toolbar-search {
        max-width: none;
    }
    
    .file-browser-toolbar .toolbar-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .file-browser-filters {
        flex-direction: column;
        gap: 8px;
    }
    
    .file-browser-filters .filters-left {
        justify-content: center;
    }
    
    .file-browser-filters .filters-right {
        justify-content: center;
    }
    
    .browser-selection-toolbar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .browser-selection-toolbar .selection-actions {
        justify-content: center;
    }
}

/* ==================== DRAG AND DROP STYLES ==================== */

/* Dragging state */
.browser-row.dragging,
.browser-grid-item.dragging {
    opacity: 0.5;
    background: rgba(255, 153, 0, 0.1);
}

/* Drop target highlighting */
.browser-row.drop-target,
.browser-grid-item.drop-target,
.folder-tree-node.drop-target {
    background: rgba(255, 153, 0, 0.3) !important;
    outline: 2px dashed var(--aws-orange);
    outline-offset: -2px;
}

.folder-tree-node.drop-target {
    border-radius: 4px;
}

/* Drag ghost (created dynamically) */
.drag-ghost {
    position: absolute;
    top: -1000px;
    left: -1000px;
    padding: 8px 12px;
    background: var(--aws-orange);
    color: white;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    pointer-events: none;
    z-index: 10000;
}

/* ==================== SELECTION TOOLBAR ==================== */

.browser-selection-toolbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: var(--aws-dark);
    color: white;
    border-bottom: 1px solid var(--aws-dark);
}

.browser-selection-toolbar.has-selection {
    display: flex;
}

.browser-selection-toolbar .selection-count {
    font-weight: 500;
    font-size: 0.9rem;
}

.browser-selection-toolbar .selection-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.browser-selection-toolbar .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 4px;
}

.browser-selection-toolbar .btn-secondary {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
}

.browser-selection-toolbar .btn-secondary:hover {
    background: rgba(255,255,255,0.25);
}

.browser-selection-toolbar .btn-danger {
    background: var(--error);
    border-color: var(--error);
}

.browser-selection-toolbar .btn-link {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
}

.browser-selection-toolbar .btn-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

/* ==================== CURSOR STYLES ==================== */

/* Removed grab/grabbing cursors for draggable items - using default cursor */

/* Folder drop targets in tree */
.folder-tree-node[data-folder-id] {
    transition: background 0.15s, outline 0.15s;
}

/* ==================== NOTIFICATION CONTAINER ==================== */

#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
}

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

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

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

.notification-info {
    background: var(--aws-dark);
    color: white;
}

.notification-message {
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    line-height: 1;
}

.notification-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================================================
   Folder Type Badges and Indicators
   ============================================================================ */

/* Colored folder icons */
.folder-icon-red {
    filter: hue-rotate(-40deg) saturate(2) brightness(0.9);
}

.folder-icon-blue {
    filter: hue-rotate(180deg) saturate(1.5) brightness(1.1);
}

/* Type badge for restricted folders (red background) */
.type-badge.folder-restricted {
    background: rgba(220, 53, 69, 0.9);
    color: white;
}

/* Type badge for scaled folders (blue background) */
.type-badge.folder-scaled {
    background: rgba(23, 162, 184, 0.9);
    color: white;
}

/* Standard folder type badge */
.type-badge.folder {
    background: rgba(104, 112, 120, 0.15);
    color: var(--text-secondary);
}

/* Restricted folder row styling */
.browser-row.restricted-folder {
    opacity: 0.9;
}

.browser-row.restricted-folder:hover {
    background: rgba(220, 53, 69, 0.08);
}

/* Restricted folder styling in tree */
.folder-tree-node.restricted {
    opacity: 0.9;
}

.folder-tree-node.restricted:hover {
    background: rgba(220, 53, 69, 0.08);
}

.folder-tree-node.restricted.selected {
    background: rgba(220, 53, 69, 0.15);
}

/* Scaled folder styling in tree */
.folder-tree-node.scaled:hover {
    background: rgba(23, 162, 184, 0.1);
}

.folder-tree-node.scaled.selected {
    background: rgba(23, 162, 184, 0.2);
}

/* Grid view restricted folder */
.browser-grid-item.restricted-folder {
    opacity: 0.9;
}

.browser-grid-item.restricted-folder:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Tooltip for folder types - using default cursor */

/* Disabled drag state for restricted folder contents */
.browser-row.restricted-folder[draggable="false"],
.browser-grid-item.restricted-folder[draggable="false"] {
    cursor: not-allowed;
}

/* ============================================================================
   Radio Group Styles (for folder type selection)
   ============================================================================ */

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-label:hover {
    border-color: var(--aws-orange);
    background: rgba(255, 153, 0, 0.05);
}

.radio-label input[type="radio"] {
    margin-top: 3px;
    accent-color: var(--aws-orange);
}

.radio-label input[type="radio"]:checked + .radio-text strong {
    color: var(--aws-orange);
}

.radio-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-text strong {
    font-size: 14px;
    color: var(--text-primary);
}

.radio-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Warning hint style */
.hint.warning-hint {
    color: var(--warning);
    font-weight: 500;
}

/* Medium modal size */
.modal.modal-medium {
    max-width: 500px;
}

/* ============================================================================
   Move to Root Option
   ============================================================================ */

.move-root-option {
    padding: 12px;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.move-root-option:hover {
    border-color: var(--aws-orange);
    background: rgba(255, 153, 0, 0.05);
}

.move-root-option.selected {
    border-color: var(--aws-orange);
    background: rgba(255, 153, 0, 0.1);
}

.move-root-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.move-root-option input[type="radio"] {
    accent-color: var(--aws-orange);
}

.move-root-icon {
    font-size: 18px;
}

.move-root-text {
    display: flex;
    flex-direction: column;
}

.move-root-text strong {
    font-size: 14px;
}

.move-root-text span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Folder warning in move modal */
.move-folder-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid var(--warning);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-primary);
}

.move-folder-warning strong {
    color: var(--warning);
}

/* Move to Root Option */
.move-to-root-option {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.divider-with-text {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 12px;
}

.divider-with-text::before,
.divider-with-text::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.divider-with-text span {
    padding: 0 12px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.hint-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    margin-left: 26px;
}


/* ============================================================================
   Namespace Filter Styles
   ============================================================================ */

.namespace-filter-container {
    position: relative;
    display: inline-block;
}

.namespace-filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.namespace-filter-btn:hover {
    border-color: var(--aws-orange);
    background: rgba(255, 153, 0, 0.05);
}

.namespace-filter-btn.active {
    border-color: var(--aws-orange);
    background: rgba(255, 153, 0, 0.1);
}

.namespace-icon {
    font-size: 1rem;
}

.namespace-label {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.namespace-dropdown-arrow {
    font-size: 0.65rem;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.namespace-filter-btn.active .namespace-dropdown-arrow {
    transform: rotate(180deg);
}

.namespace-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    min-width: 250px;
    max-width: 350px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
}

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

.namespace-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--aws-light);
    border-radius: 8px 8px 0 0;
}

.namespace-dropdown-header span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.namespace-select-all-btn {
    background: none;
    border: none;
    color: var(--aws-orange);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
}

.namespace-select-all-btn:hover {
    background: rgba(255, 153, 0, 0.1);
}

.namespace-dropdown-list {
    max-height: 250px;
    overflow-y: auto;
    padding: 8px 0;
}

.namespace-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
}

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

.namespace-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--aws-orange);
}

.namespace-item-info {
    flex: 1;
    min-width: 0;
}

.namespace-item-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.namespace-item-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.namespace-item-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    background: rgba(104, 112, 120, 0.15);
    color: var(--text-secondary);
}

.namespace-item-badge.default {
    background: rgba(255, 153, 0, 0.15);
    color: #b36b00;
}

.namespace-dropdown-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: var(--aws-light);
    border-radius: 0 0 8px 8px;
}

.namespace-dropdown-footer .btn {
    padding: 6px 16px;
    font-size: 0.85rem;
}

/* Namespace filter active indicator */
.namespace-filter-btn.has-filter {
    border-color: var(--aws-orange);
    background: rgba(255, 153, 0, 0.1);
}

.namespace-filter-btn.has-filter .namespace-label {
    color: var(--aws-orange);
    font-weight: 500;
}

/* Empty state for namespace list */
.namespace-empty-state {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Loading state for namespace list */
.namespace-loading {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-secondary);
}

.namespace-loading .spinner {
    margin-bottom: 8px;
}


/* ============================================================================
   Browser Permissions Modal Styles
   ============================================================================ */

.permissions-asset-info {
    padding: 12px 16px;
    background: var(--aws-light);
    border-radius: 6px;
    margin-bottom: 16px;
}

.permissions-asset-info .asset-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.permissions-asset-info .asset-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(104, 112, 120, 0.15);
    color: var(--text-secondary);
    margin-left: 8px;
}

.permissions-content {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

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

.permissions-table th,
.permissions-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.permissions-table th {
    background: var(--aws-light);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    position: sticky;
    top: 0;
}

.permissions-table td {
    font-size: 0.9rem;
}

.permissions-table tr:hover {
    background: rgba(255, 153, 0, 0.05);
}

.principal-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.principal-icon {
    font-size: 1rem;
}

.principal-name {
    font-weight: 500;
}

.principal-arn {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: 'Monaco', 'Menlo', monospace;
    word-break: break-all;
}

.access-level-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.access-level-badge.owner {
    background: rgba(255, 153, 0, 0.15);
    color: #b36b00;
}

.access-level-badge.author,
.access-level-badge.edit {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.access-level-badge.reader,
.access-level-badge.view {
    background: rgba(104, 112, 120, 0.15);
    color: var(--text-secondary);
}

.source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.source-badge.direct {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.source-badge.folder {
    background: rgba(23, 162, 184, 0.15);
    color: #0c5460;
}

.source-badge.group {
    background: rgba(240, 173, 78, 0.15);
    color: #856404;
}

.remove-permission-btn {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.remove-permission-btn:hover {
    opacity: 1;
    background: rgba(209, 50, 18, 0.1);
}

.remove-permission-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Add Permission Section */
.add-permission-section {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-top: 16px;
}

.add-permission-section h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.add-permission-form .form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

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

.add-permission-form .form-group:first-child {
    flex: 2;
}

.add-permission-form .form-group label {
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.add-permission-form .form-group input,
.add-permission-form .form-group select {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.add-permission-form .btn {
    white-space: nowrap;
}

/* Multi-asset permissions view */
.multi-asset-permissions {
    margin-bottom: 16px;
}

.multi-asset-warning {
    padding: 12px 16px;
    background: rgba(240, 173, 78, 0.15);
    border: 1px solid var(--warning);
    border-radius: 6px;
    color: #856404;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.asset-permissions-group {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.asset-permissions-header {
    padding: 10px 16px;
    background: var(--aws-light);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.asset-permissions-header .asset-name {
    font-weight: 500;
}

.asset-permissions-body {
    padding: 0;
}

/* Empty permissions state */
.permissions-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-secondary);
}

.permissions-error {
    padding: 16px;
    background: rgba(209, 50, 18, 0.1);
    border: 1px solid var(--error);
    border-radius: 6px;
    color: var(--error);
}

/* Principal Picker Styles */
.principal-picker {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.principal-picker-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: var(--aws-light);
}

.principal-tab {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.principal-tab:hover {
    background: rgba(255, 153, 0, 0.1);
}

.principal-tab.active {
    background: white;
    color: var(--aws-orange);
    font-weight: 500;
    border-bottom: 2px solid var(--aws-orange);
    margin-bottom: -1px;
}

.principal-picker-content {
    padding: 12px;
}

.principal-picker-content.hidden {
    display: none;
}

.principal-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.principal-search-row select {
    width: 120px;
    padding: 6px 10px;
    font-size: 0.85rem;
}

.principal-search-row input {
    flex: 1;
    padding: 6px 10px;
    font-size: 0.85rem;
}

.principal-search-row.compact {
    margin-bottom: 6px;
}

.principal-search-row.compact select {
    width: 90px;
    padding: 4px 8px;
    font-size: 0.8rem;
}

.principal-search-row.compact input {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.principal-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
}

.principal-list.compact {
    max-height: 150px;
}

.principal-list-loading {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.principal-list-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s;
}

.principal-list-item:last-child {
    border-bottom: none;
}

.principal-list-item:hover {
    background: rgba(255, 153, 0, 0.1);
}

.principal-list-item.selected {
    background: rgba(255, 153, 0, 0.2);
}

.principal-list-item .principal-icon {
    font-size: 1.1rem;
}

.principal-list-item .principal-info {
    flex: 1;
    min-width: 0;
}

.principal-list-item .principal-name {
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.principal-list-item .principal-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.principal-list-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.selected-principal {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 153, 0, 0.15);
    border: 1px solid var(--aws-orange);
    border-radius: 4px;
    margin-top: 8px;
}

.selected-principal.hidden {
    display: none;
}

.selected-principal-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
}

.clear-principal-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.clear-principal-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

/* Principal picker inline (for browser permissions modal) */
.principal-picker-inline {
    flex: 2 !important;
}

.principal-picker-inline .principal-picker {
    margin-top: 4px;
}

.principal-picker-inline .principal-picker-tabs {
    padding: 0;
}

.principal-picker-inline .principal-tab {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.principal-picker-inline .principal-picker-content {
    padding: 8px;
}

/* ============================================
   Folder Operations Modals
   ============================================ */

.folder-details {
    padding: 8px 0;
}

.folder-delete-list {
    margin: 12px 0;
    padding-left: 20px;
}

.folder-delete-list li {
    margin: 4px 0;
}

.permissions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.perm-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.permissions-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.permission-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    gap: 12px;
}

.principal-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.principal-icon {
    font-size: 1.1rem;
}

.principal-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.principal-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
}

.access-level {
    flex-shrink: 0;
}

.access-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.access-badge.viewer {
    background: #e3f2fd;
    color: #1565c0;
}

.access-badge.contributor {
    background: #fff3e0;
    color: #e65100;
}

.access-badge.owner {
    background: #e8f5e9;
    color: #2e7d32;
}

.access-badge.custom {
    background: #f3e5f5;
    color: #7b1fa2;
}

.permission-actions {
    flex-shrink: 0;
}

.permission-actions .btn-icon {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.permission-row:hover .permission-actions .btn-icon {
    opacity: 1;
}


/* ============================================================================
   Identity Admin Styles
   ============================================================================ */

/* Identity Header */
.identity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.identity-account-selector {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Three-Panel Layout */
.identity-panels {
    display: grid;
    grid-template-columns: 240px 1fr 380px;
    gap: 16px;
    height: calc(100vh - 280px);
    min-height: 500px;
}

/* NEW: Three-Panel Side-by-Side Layout (Users | Groups | Folders) */
.identity-three-panels {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 16px;
    height: calc(100vh - 340px);
    min-height: 400px;
}

.identity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 12px;
}

.identity-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.identity-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.namespace-select {
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.namespace-select:focus {
    outline: none;
    border-color: var(--aws-orange);
}

/* Namespace Multi-Select Dropdown */
.namespace-multiselect {
    position: relative;
}

.namespace-multiselect .filter-chip {
    min-width: 160px;
    justify-content: space-between;
}

.namespace-multiselect .filter-dropdown {
    min-width: 240px;
}

.namespace-dropdown-actions {
    display: flex;
    gap: 4px;
}

.namespace-dropdown-actions .namespace-select-all-btn {
    padding: 2px 8px;
    background: var(--aws-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
}

.namespace-dropdown-actions .namespace-select-all-btn:hover {
    background: var(--aws-orange);
    color: white;
    border-color: var(--aws-orange);
}

.filter-dropdown-footer {
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.namespace-item .namespace-name {
    flex: 1;
    font-weight: 500;
}

.namespace-item .namespace-counts {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: 8px;
}

/* Identity Bulk Toolbar */
.identity-bulk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 153, 0, 0.1);
    border: 1px solid var(--aws-orange);
    border-radius: 6px;
    margin-bottom: 12px;
}

.identity-bulk-toolbar .bulk-actions {
    display: flex;
    gap: 8px;
}

/* Panel Search */
.panel-search {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
}

.panel-search .search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
}

.panel-search .search-input:focus {
    outline: none;
    border-color: var(--aws-orange);
}

/* Panel List */
.panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* Panel Actions */
.panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* User Card */
.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.15s;
    border: 2px solid transparent;
}

.user-card:hover {
    background: var(--aws-light);
}

.user-card.selected {
    background: rgba(255, 153, 0, 0.1);
    border-color: var(--aws-orange);
}

.user-card.highlighted {
    background: rgba(0, 161, 201, 0.1);
    border-color: var(--aws-blue);
}

.user-card.multi-selected {
    background: rgba(255, 153, 0, 0.15);
    border-color: var(--aws-orange);
}

.user-card[draggable="true"] {
    cursor: grab;
}

.user-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.user-card .user-icon {
    font-size: 1.2rem;
}

.user-card .user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-card .user-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-card .user-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.user-card .user-role {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--aws-light);
    color: var(--text-secondary);
}

/* Group Card */
.group-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: all 0.15s;
    border: 2px solid transparent;
}

.group-card:hover {
    background: var(--aws-light);
}

.group-card.selected {
    background: rgba(255, 153, 0, 0.1);
    border-color: var(--aws-orange);
}

.group-card.highlighted {
    background: rgba(0, 161, 201, 0.1);
    border-color: var(--aws-blue);
}

.group-card.drag-over {
    background: rgba(0, 168, 107, 0.15);
    border-color: var(--success);
    border-style: dashed;
}

.group-card .group-icon {
    font-size: 1.2rem;
}

.group-card .group-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.group-card .group-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.group-card .group-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.group-card .member-count {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--aws-light);
    color: var(--text-secondary);
}

/* Folder Tree */
.folder-tree {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.folder-tree-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 2px;
    transition: all 0.15s;
    border: 2px solid transparent;
}

.folder-tree-item:hover {
    background: var(--aws-light);
}

.folder-tree-item.selected {
    background: rgba(255, 153, 0, 0.1);
    border-color: var(--aws-orange);
}

.folder-tree-item.highlighted {
    background: rgba(0, 161, 201, 0.1);
    border-color: var(--aws-blue);
}

.folder-tree-item.drag-over {
    background: rgba(0, 168, 107, 0.15);
    border-color: var(--success);
    border-style: dashed;
}

.folder-tree-item .expand-icon {
    width: 16px;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: transform 0.2s;
}

.folder-tree-item .expand-icon.expanded {
    transform: rotate(90deg);
}

.folder-tree-item .expand-icon.no-children {
    visibility: hidden;
}

.folder-tree-item .folder-icon {
    font-size: 1rem;
}

.folder-tree-item .folder-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-tree-item .folder-type-badge {
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 3px;
    background: var(--aws-light);
    color: var(--text-secondary);
    text-transform: uppercase;
}

.folder-tree-item .folder-type-badge.restricted {
    background: rgba(209, 50, 18, 0.1);
    color: var(--error);
}

.folder-tree-item .folder-type-badge.namespace {
    background: rgba(0, 161, 201, 0.1);
    color: var(--aws-blue);
}

/* Folder depth indentation */
.folder-tree-item[data-depth="1"] { padding-left: 26px; }
.folder-tree-item[data-depth="2"] { padding-left: 42px; }
.folder-tree-item[data-depth="3"] { padding-left: 58px; }
.folder-tree-item[data-depth="4"] { padding-left: 74px; }
.folder-tree-item[data-depth="5"] { padding-left: 90px; }

/* Folder children container */
.folder-children {
    display: none;
}

.folder-children.expanded {
    display: block;
}

/* Detail Panel (Bottom) */
.identity-detail-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 16px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 350px;
}

.identity-detail-panel.collapsed {
    max-height: 48px;
}

.identity-detail-panel .detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    background: var(--aws-light);
}

.identity-detail-panel .detail-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.identity-detail-panel .detail-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.identity-detail-panel .collapse-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.identity-detail-panel.collapsed .collapse-btn {
    transform: rotate(-90deg);
}

.identity-detail-panel .detail-content {
    padding: 16px;
    max-height: 280px;
    overflow-y: auto;
}

.identity-detail-panel.collapsed .detail-content {
    display: none;
}

/* Permission List in Detail Panel */
.permission-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.permission-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--aws-light);
    border-radius: 6px;
}

.permission-item .principal-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.permission-item .principal-icon {
    font-size: 1rem;
}

.permission-item .principal-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.permission-item .principal-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.permission-item .principal-namespace {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.permission-item .permission-level {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 4px;
    background: white;
    color: var(--text-secondary);
    font-weight: 500;
}

.permission-item .permission-level.viewer {
    background: #e3f2fd;
    color: #1565c0;
}

.permission-item .permission-level.contributor {
    background: #fff3e0;
    color: #e65100;
}

.permission-item .permission-level.owner {
    background: #fce4ec;
    color: #c2185b;
}

.identity-panel {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.identity-panel .panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.identity-panel .panel-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

/* Namespace Panel */
.namespace-panel {
    min-width: 200px;
}

.namespace-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.namespace-item {
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 4px;
    transition: background-color 0.15s;
    border: 1px solid transparent;
}

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

.namespace-item.selected {
    background: rgba(255, 153, 0, 0.1);
    border-color: var(--aws-orange);
}

.namespace-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.namespace-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.namespace-counts {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.namespace-counts .count {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Identity Store Badges */
.identity-store-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.identity-store-badge.quicksight {
    background: #e8f5e9;
    color: #2e7d32;
}

.identity-store-badge.iam-identity-center,
.identity-store-badge.idc {
    background: #fff3e0;
    color: #e65100;
}

.identity-store-badge.iam {
    background: #e3f2fd;
    color: #1565c0;
}

/* Badge for default namespace */
.badge-default {
    font-size: 0.65rem;
    padding: 1px 5px;
    background: var(--text-secondary);
    color: white;
    border-radius: 3px;
    margin-left: 4px;
    text-transform: uppercase;
}

/* Namespace badge for "All Namespaces" view */
.namespace-badge {
    font-size: 0.65rem;
    padding: 1px 6px;
    background: var(--aws-squid-ink);
    color: white;
    border-radius: 3px;
    margin-left: 6px;
    font-weight: 500;
}

/* Namespace with add button container */
.namespace-with-add {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Add to namespace button */
.btn-add-namespace {
    width: 18px;
    height: 18px;
    padding: 0;
    font-size: 14px;
    font-weight: bold;
    line-height: 16px;
    text-align: center;
    background: var(--aws-orange);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.btn-add-namespace:hover {
    background: var(--aws-orange-dark);
    transform: scale(1.1);
}

/* Namespace checkbox list in modal */
.namespace-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.namespace-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.namespace-checkbox-item:hover {
    background: var(--aws-light);
}

.namespace-checkbox-item input[type="checkbox"] {
    margin: 0;
}

.namespace-checkbox-item .namespace-counts {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Other namespaces section in detail panel */
.other-namespaces-section h4 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.other-namespaces-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.other-namespace-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--aws-light);
    border-radius: 4px;
    padding: 2px 4px 2px 0;
}

.other-namespace-item .namespace-badge {
    margin: 0;
}

/* Remove from namespace button (red X) */
.btn-remove-namespace {
    width: 16px;
    height: 16px;
    padding: 0;
    font-size: 12px;
    font-weight: bold;
    line-height: 14px;
    text-align: center;
    background: var(--error);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
    opacity: 0.7;
}

.btn-remove-namespace:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* List Panel */
.list-panel {
    min-width: 300px;
}

.identity-view-tabs {
    display: flex;
    gap: 4px;
}

.identity-view-tab {
    padding: 6px 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: all 0.15s;
}

.identity-view-tab:hover {
    background: var(--aws-light);
    color: var(--text-primary);
}

.identity-view-tab.active {
    background: rgba(255, 153, 0, 0.15);
    color: var(--aws-orange);
    font-weight: 500;
}

.list-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-actions .search-input {
    width: 150px;
    padding: 6px 10px;
    font-size: 0.85rem;
}

.list-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* Identity Table */
.identity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.identity-table th {
    text-align: left;
    padding: 8px 10px;
    background: var(--aws-light);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    position: sticky;
    top: 0;
    z-index: 1;
}

.identity-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.identity-row {
    cursor: pointer;
    transition: background-color 0.15s;
}

.identity-row:hover {
    background: var(--aws-light);
}

.identity-row.selected {
    background: rgba(255, 153, 0, 0.1);
}

.user-name-cell,
.group-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.user-icon,
.group-icon {
    font-size: 1rem;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.role-reader,
.role-badge.role-reader_pro {
    background: #e3f2fd;
    color: #1565c0;
}

.role-badge.role-author,
.role-badge.role-author_pro {
    background: #fff3e0;
    color: #e65100;
}

.role-badge.role-admin,
.role-badge.role-admin_pro {
    background: #fce4ec;
    color: #c2185b;
}

/* Identity Type Badge */
.identity-type-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    background: var(--aws-light);
    color: var(--text-secondary);
}

.identity-type-badge.quicksight {
    background: #e8f5e9;
    color: #2e7d32;
}

.identity-type-badge.iam_identity_center {
    background: #fff3e0;
    color: #e65100;
}

/* Status Badge */
.status-badge.active {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.status-badge.inactive {
    background: rgba(209, 50, 18, 0.15);
    color: var(--error);
}

/* Member Count */
.member-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 2px 8px;
    background: var(--aws-light);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Detail Panel */
.detail-panel {
    min-width: 320px;
}

.detail-actions {
    display: flex;
    gap: 8px;
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

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

.detail-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
}

.detail-section h4 .hint {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: 8px;
}

.detail-grid {
    display: grid;
    gap: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.detail-item span {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* Detail value with copy button */
.detail-value-with-copy {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-value-with-copy code {
    flex: 1;
    word-break: break-all;
}

.detail-value-with-copy .hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Role details content */
.role-details-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.role-details-content code {
    padding: 4px 8px;
    background: var(--aws-light);
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
}

/* Notification icon and text */
.notification-icon {
    font-size: 1.2rem;
    margin-right: 8px;
}

.notification-text {
    flex: 1;
}

/* ARN Display */
.arn-display {
    display: block;
    padding: 8px 12px;
    background: var(--aws-light);
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    word-break: break-all;
    color: var(--text-secondary);
}

/* Memberships List */
.memberships-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.membership-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--aws-light);
    border-radius: 4px;
    font-size: 0.85rem;
}

.membership-item .group-name,
.membership-item .member-name {
    flex: 1;
    font-weight: 500;
}

.no-memberships {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
    padding: 8px 0;
}

/* Read-only Indicator */
.readonly-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 4px 8px;
    background: var(--aws-light);
    border-radius: 4px;
}

/* Read-only Banner */
#identity-readonly-banner {
    margin-bottom: 16px;
}

#identity-readonly-banner .icon {
    margin-right: 8px;
}

/* Drag and Drop Styles */
.identity-row[draggable="true"] {
    cursor: grab;
}

.identity-row.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.drop-target {
    transition: background-color 0.2s, outline 0.2s;
}

.drop-target.drag-over {
    background: rgba(255, 153, 0, 0.15);
    outline: 2px dashed var(--aws-orange);
    outline-offset: -2px;
}

.drop-target.invalid-drop {
    background: rgba(209, 50, 18, 0.1);
    outline: 2px dashed var(--error);
    outline-offset: -2px;
}

/* Relationship Highlighting */
.identity-row.highlighted {
    background: rgba(0, 161, 201, 0.15);
    border-left: 3px solid var(--aws-blue);
}

.identity-row.highlighted:hover {
    background: rgba(0, 161, 201, 0.25);
}

/* Multi-Selection */
.identity-row.multi-selected {
    background: rgba(255, 153, 0, 0.2);
    border-left: 3px solid var(--aws-orange);
}

.identity-row.multi-selected:hover {
    background: rgba(255, 153, 0, 0.3);
}

/* Bulk Toolbar */
#identity-bulk-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--aws-light);
    border-bottom: 1px solid var(--border-color);
}

#identity-bulk-toolbar .selection-count {
    font-weight: 500;
    color: var(--text-primary);
}

/* Badge List */
.badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge-list .badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--aws-light);
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Form Value Display */
.form-value {
    display: inline-block;
    padding: 8px 12px;
    background: var(--aws-light);
    border-radius: 4px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Textarea in forms */
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.15);
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Loading and Empty States */
.loading-state,
.empty-state.small {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-secondary);
    text-align: center;
}

.loading-state p,
.empty-state.small p {
    margin-top: 8px;
    font-size: 0.85rem;
}

/* Small Spinner */
.spinner.small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* Button Tiny */
.btn-tiny {
    padding: 2px 6px;
    font-size: 0.75rem;
    line-height: 1;
}

/* Responsive Identity Panels */
@media (max-width: 1200px) {
    .identity-panels {
        grid-template-columns: 200px 1fr 320px;
    }
    
    .identity-three-panels {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .identity-panels {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .identity-three-panels {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        height: auto;
    }
    
    .identity-three-panels .folders-panel {
        grid-column: 1 / -1;
    }
    
    .identity-panel {
        min-height: 300px;
    }
    
    .namespace-panel {
        max-height: 200px;
    }
    
    .list-panel {
        max-height: 400px;
    }
    
    .detail-panel {
        max-height: 400px;
    }
    
    .identity-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .identity-header-left,
    .identity-header-right {
        width: 100%;
    }
    
    .identity-header-left {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .identity-three-panels {
        grid-template-columns: 1fr;
    }
    
    .identity-three-panels .folders-panel {
        grid-column: 1;
    }
}

/* ============================================
   MCP Administration Styles
   ============================================ */

/* Admin Sub-tabs */
.admin-subtabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: var(--aws-light);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.admin-subtab {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.admin-subtab:hover {
    background: rgba(255, 153, 0, 0.1);
    color: var(--text-primary);
}

.admin-subtab.active {
    background: white;
    border-color: var(--border-color);
    color: var(--aws-orange);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-section {
    padding: 0 16px;
}

/* MCP Applications List */
.mcp-apps-list {
    padding: 16px;
}

.mcp-apps-table {
    width: 100%;
    border-collapse: collapse;
}

.mcp-apps-table th,
.mcp-apps-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.mcp-apps-table th {
    background: var(--aws-light);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.mcp-apps-table td {
    font-size: 0.9rem;
}

.mcp-apps-table tr:hover {
    background: rgba(255, 153, 0, 0.05);
}

.mcp-apps-table .actions {
    display: flex;
    gap: 8px;
}

/* Auth Mode Badge */
.auth-mode-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.auth-mode-badge.service_auth {
    background: rgba(0, 161, 201, 0.15);
    color: var(--aws-blue);
}

.auth-mode-badge.user_auth {
    background: rgba(138, 43, 226, 0.15);
    color: #8a2be2;
}

/* Status Badge Extensions for MCP */
.status-badge.status-active {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.status-badge.status-inactive {
    background: rgba(209, 50, 18, 0.15);
    color: var(--error);
}

/* MCP Modals */
.mcp-modal .modal {
    max-width: 500px;
}

.mcp-modal .modal-large {
    max-width: 700px;
}

/* Credentials Section */
.credentials-section {
    margin: 20px 0;
}

.credential-item {
    margin-bottom: 16px;
}

.credential-item label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.credential-value {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--aws-light);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.credential-value code {
    flex: 1;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    color: var(--text-primary);
}

.credential-value.secret {
    background: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.3);
}

.credential-value.secret code {
    color: #856404;
}

.copy-btn {
    flex-shrink: 0;
    padding: 4px 8px;
    font-size: 0.9rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: var(--aws-orange);
    border-color: var(--aws-orange);
}

/* MCP Detail Grid */
.mcp-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.mcp-detail-grid .detail-section {
    margin-bottom: 0;
}

.mcp-detail-grid .detail-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.mcp-detail-grid .detail-row label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.mcp-detail-grid .detail-row span,
.mcp-detail-grid .detail-row code {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.mcp-detail-grid .detail-row .detail-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mcp-detail-grid .detail-row .detail-value code {
    flex: 1;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    word-break: break-all;
    padding: 6px 10px;
    background: var(--aws-light);
    border-radius: 4px;
}

/* MCP Tokens Container */
.mcp-tokens-container {
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 12px;
}

.mcp-tokens-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.mcp-tokens-table th,
.mcp-tokens-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.mcp-tokens-table th {
    background: var(--aws-light);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.no-tokens {
    color: var(--text-secondary);
    font-style: italic;
    padding: 12px 0;
}

.token-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* Actions Section */
.actions-section {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Warning Button */
.btn-warning {
    background: #ffc107;
    color: #212529;
    border: none;
}

.btn-warning:hover {
    background: #e0a800;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #856404;
}

.alert-warning strong {
    color: #664d03;
}

/* Radio Group Styling */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: var(--aws-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-label:hover {
    border-color: var(--aws-orange);
}

.radio-label input[type="radio"] {
    margin-top: 3px;
}

.radio-label input[type="radio"]:checked + .radio-text strong {
    color: var(--aws-orange);
}

.radio-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-text strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.radio-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Setup Instructions */
.setup-instructions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.setup-instructions h4 {
    margin-bottom: 12px;
    font-size: 1rem;
    color: var(--text-primary);
}

.instruction-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.instruction-tab {
    padding: 8px 16px;
    background: var(--aws-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.instruction-tab:hover {
    border-color: var(--aws-orange);
    color: var(--aws-orange);
}

.instruction-tab.active {
    background: var(--aws-orange);
    border-color: var(--aws-orange);
    color: white;
}

.instruction-content {
    padding: 16px;
    background: var(--aws-light);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.instruction-content p {
    margin-bottom: 12px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.instruction-content ol {
    margin-left: 20px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.instruction-content ol li {
    margin-bottom: 8px;
}

.code-block {
    background: var(--aws-darker);
    color: #e0e0e0;
    padding: 12px 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin-bottom: 12px;
    font-size: 0.8rem;
    line-height: 1.5;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Responsive MCP Admin */
@media (max-width: 768px) {
    .mcp-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-subtabs {
        flex-wrap: wrap;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .instruction-tabs {
        flex-wrap: wrap;
    }
}

/* =============================================================================
   Role-Based Permission System Styles
   ============================================================================= */

/* User Role Badges (for header and tables) */
.role-badge.role-user {
    background: #e3f2fd;
    color: #1565c0;
}

.role-badge.role-admin {
    background: #fff3e0;
    color: #e65100;
}

.role-badge.role-global_admin {
    background: #ffebee;
    color: #c62828;
}

/* Role Legend */
.role-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.role-legend .role-badge {
    margin-right: 4px;
}

/* MCP Permissions Container */
.mcp-permissions-container {
    padding: 12px 0;
}

.permissions-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.permission-category {
    padding: 12px;
    background: var(--aws-light);
    border-radius: 8px;
}

.permission-category h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.permission-category h5.category-header {
    margin: 0 0 12px 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
}

.permissions-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.permission-tools {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.permission-tool {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.2s;
}

.permission-tool:hover {
    border-color: var(--aws-orange);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.permission-tool .tool-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.permission-tool .tool-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.permission-tool .tool-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.permission-tool .toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.permission-tool .toggle-label:hover {
    border-color: var(--aws-orange);
}

.permission-tool .toggle-label.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
}

.permission-tool .toggle-text {
    font-size: 0.85rem;
}

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

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

.server-disabled-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    background: #ffebee;
    color: #c62828;
    border-radius: 3px;
    margin-left: 4px;
}

/* MCP Server Permissions (Admin Config) */
.mcp-server-permissions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.permission-category-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--aws-light);
    border-radius: 8px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    flex-shrink: 0;
}

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

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

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

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--aws-orange);
}

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

.toggle-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toggle-info .toggle-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.toggle-info .toggle-tools {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Permissions Actions */
.permissions-actions {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

/* Owner Cell in Tables */
.owner-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Filter Bar */
.mcp-filter-bar {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.mcp-filter-bar label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.mcp-filter-bar select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Role Select in Tables */
.role-select {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
}

.role-select:focus {
    outline: none;
    border-color: var(--aws-orange);
}

/* Card Margin Bottom */
.mb-3 {
    margin-bottom: 16px;
}

.mb-4 {
    margin-bottom: 24px;
}

/* ============================================
   MCP Permissions UI - Collapsible Categories
   ============================================ */

/* Permissions Summary */
.permissions-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--aws-light);
    border-radius: 8px;
    margin-bottom: 16px;
}

.permissions-summary .summary-text {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.permissions-summary .summary-actions {
    display: flex;
    gap: 8px;
}

/* Permissions Search */
.permissions-search {
    margin-bottom: 16px;
}

.permissions-search input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.permissions-search input:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.1);
}

/* Category Header Row - Collapsible */
.category-header-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.category-header-row:hover {
    background: rgba(0, 0, 0, 0.03);
}

.category-expand-icon {
    font-size: 0.75rem;
    color: var(--text-secondary);
    width: 16px;
    text-align: center;
}

.category-header-row h5.category-header {
    margin: 0;
    flex: 1;
}

.category-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-right: 12px;
}

.category-actions {
    display: flex;
    gap: 6px;
}

/* Tiny buttons for category actions */
.btn-tiny {
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
    background: white;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-tiny:hover {
    border-color: var(--aws-orange);
    background: var(--aws-light);
}

/* Permission tools container - collapsible */
.permission-category .permission-tools {
    margin-top: 8px;
    padding-left: 24px;
}

/* Tool item with data attribute for filtering */
.permission-tool[data-tool] {
    transition: opacity 0.2s, height 0.2s;
}

/* Hidden state for filtered tools */
.permission-tool[style*="display: none"] {
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
    overflow: hidden;
}

/* ============================================================================
   User Asset Access Section (Identity Tab)
   ============================================================================ */

.asset-access-section {
    margin-top: 16px;
}

.asset-access-content {
    max-height: 300px;
    overflow-y: auto;
}

.asset-access-summary {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.asset-type-section {
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.asset-type-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--aws-light);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
}

.asset-type-header:hover {
    background: var(--aws-hover);
}

.asset-type-icon {
    font-size: 1rem;
}

.asset-type-label {
    flex: 1;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.asset-type-count {
    background: var(--aws-orange);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 24px;
    text-align: center;
}

.expand-icon {
    font-size: 0.7rem;
    color: var(--text-secondary);
    transition: transform 0.15s ease;
}

.asset-type-items {
    padding: 8px 12px;
    background: white;
}

.asset-type-items.hidden {
    display: none;
}

.asset-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

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

.asset-item .asset-name {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 8px;
}

.access-level-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.access-level-badge.owner {
    background: rgba(232, 119, 34, 0.15);
    color: #b36b00;
}

.access-level-badge.viewer {
    background: rgba(0, 115, 187, 0.15);
    color: #005a94;
}


/* ============================================================================
   Migration UI Styles
   ============================================================================ */

/* Migration workspace layout */
.migration-workspace {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 500px;
    position: relative;
}

/* Header with account selectors */
.migration-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
}

.migration-accounts {
    display: flex;
    align-items: center;
    gap: 16px;
}

.account-selector-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-selector-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.account-selector-group .account-select {
    min-width: 220px;
}

.migration-arrow {
    font-size: 1.5rem;
    color: var(--aws-orange);
    font-weight: bold;
    margin-top: 20px;
}

.migration-header-actions {
    display: flex;
    gap: 8px;
}

/* Main content area - two panels */
.migration-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #f8f9fa;
}

/* Migration panels */
.migration-panel {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.migration-assets-panel {
    flex: 1;
    min-width: 350px;
    margin: 16px 8px 16px 16px;
    border-radius: 8px;
}

.migration-config-panel {
    width: 380px;
    min-width: 320px;
    margin: 16px 16px 16px 8px;
    border-radius: 8px;
    overflow-y: auto;
}

.migration-panel .panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background: #fafafa;
}

.migration-panel .panel-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.migration-panel .panel-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.migration-panel .panel-toolbar .selection-count {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Asset list */
.migration-assets-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.asset-group {
    margin-bottom: 12px;
}

.asset-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.asset-group-icon {
    font-size: 1rem;
}

.asset-group-count {
    font-weight: normal;
    opacity: 0.7;
}

.asset-group-items {
    padding: 4px 0 4px 8px;
}

.asset-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.15s;
}

.asset-item:hover {
    background: #f8f9fa;
}

.asset-item.selected {
    background: #fff3e0;
    border-left: 3px solid var(--aws-orange);
}

.asset-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.asset-checkbox-label .asset-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.migration-indicator {
    font-size: 0.85rem;
    padding: 2px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.migration-indicator.supported {
    background: #e8f5e9;
}

.migration-indicator.partial {
    background: #fff3e0;
}

.migration-indicator.not-supported {
    background: #ffebee;
}

.migration-indicator.setup-required {
    background: #e3f2fd;
}

.migration-indicator.unknown {
    background: #f5f5f5;
}

/* Config sections */
.config-section {
    padding: 16px;
    border-bottom: 1px solid #eee;
}

.config-section:last-child {
    border-bottom: none;
}

.config-section h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.section-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header-with-action h4 {
    margin: 0;
}

.section-header-with-action .bulk-check-btn {
    font-size: 0.75rem;
    padding: 4px 10px;
}

/* Compatibility summary */
.compatibility-summary-compact {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.compat-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
}

.compat-status .status-icon {
    font-size: 1.2rem;
}

.compat-status.can-migrate {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.compat-status.cannot-migrate {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.compat-counts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.compat-counts .count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
}

.compat-counts .count.supported {
    background: #e8f5e9;
    border-color: #c8e6c9;
}

.compat-counts .count.partial {
    background: #fff3e0;
    border-color: #ffe0b2;
}

.compat-counts .count.setup {
    background: #e3f2fd;
    border-color: #bbdefb;
}

.compat-counts .count.blocked {
    background: #ffebee;
    border-color: #ffcdd2;
}

.compat-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: #fff3e0;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #e65100;
}

.compat-warning.qtopic-warning {
    background: #ffebee;
    color: #c62828;
}

.compat-blockers,
.compat-warnings {
    font-size: 0.85rem;
}

.compat-blockers ul,
.compat-warnings ul {
    margin: 4px 0 0 0;
    padding-left: 20px;
}

.compat-blockers li {
    color: #c62828;
}

.compat-warnings li {
    color: #e65100;
}

/* Migration indicators container */
.migration-indicators {
    display: flex;
    gap: 4px;
    align-items: center;
}

.migration-indicators .migration-indicator {
    font-size: 0.8rem;
}

/* Asset compatibility details */
.compat-asset-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.asset-compat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.asset-compat-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.asset-compat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.asset-compat-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.asset-compat-type {
    font-size: 0.7rem;
    color: white;
    background: #607d8b;
    padding: 2px 8px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 500;
}

.asset-compat-indicators {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.asset-compat-indicators .indicator-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.asset-compat-indicators .migration-indicator {
    font-size: 0.85rem;
}

/* Dependency list */
.asset-dependencies {
    margin-top: 10px;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.dep-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.dep-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dep-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    padding: 8px 10px;
    border-radius: 4px;
    background: white;
    border: 1px solid #e8e8e8;
    flex-wrap: wrap;
}

.dep-item.supported {
    background: #f1f8f1;
    border-color: #c8e6c9;
}

.dep-item.partial {
    background: #fff8f0;
    border-color: #ffe0b2;
}

.dep-item.not-supported {
    background: #fff5f5;
    border-color: #ffcdd2;
}

.dep-item.setup-required {
    background: #f3f8fd;
    border-color: #bbdefb;
}

.dep-indicator {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.dep-type {
    font-size: 0.7rem;
    color: white;
    background: #757575;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 500;
    flex-shrink: 0;
}

.dep-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.dep-name {
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-word;
}

.dep-id {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: monospace;
    word-break: break-all;
}

.dep-blocker {
    font-size: 0.75rem;
    color: #c62828;
    font-style: italic;
    background: #ffebee;
    padding: 3px 6px;
    border-radius: 3px;
    width: 100%;
    margin-top: 4px;
}

/* Dependency target status */
.dep-target-status {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.dep-target-status .target-status-icon {
    font-size: 0.85rem;
    flex-shrink: 0;
}

.dep-target-status .target-status-text {
    color: var(--text-secondary);
    word-break: break-word;
    line-height: 1.3;
}

/* Target status: Not in target */
.dep-target-status.not-in-target {
    background: #fff3e0;
    border-color: #ffe0b2;
}

.dep-target-status.not-in-target .target-status-text {
    color: #e65100;
}

/* Target status: Exists in target */
.dep-target-status.exists-in-target {
    background: #e8f5e9;
    border-color: #c8e6c9;
}

.dep-target-status.exists-in-target .target-status-text {
    color: #2e7d32;
}

/* Target status: Similar found */
.dep-target-status.similar-found {
    background: #e3f2fd;
    border-color: #bbdefb;
}

.dep-target-status.similar-found .target-status-text {
    color: #1565c0;
}

/* Target status: Unable to verify */
.dep-target-status.unable-to-verify {
    background: #fafafa;
    border-color: #e0e0e0;
}

.dep-target-status.unable-to-verify .target-status-text {
    color: #757575;
    font-style: italic;
}

/* Dependency action row */
.dep-action-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e0e0e0;
}

.dep-action-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* Dependency action dropdown */
.dep-action-dropdown {
    flex: 1;
    max-width: 200px;
    padding: 5px 8px;
    font-size: 0.75rem;
    border: 1px solid #d5dbdb;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dep-action-dropdown:hover {
    border-color: #aab7b8;
}

.dep-action-dropdown:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.15);
}

/* Action-specific dropdown styling */
.dep-action-dropdown option[value="migrate"] {
    color: #1565c0;
}

.dep-action-dropdown option[value="use_existing"] {
    color: #2e7d32;
}

.dep-action-dropdown option[value="map_to"] {
    color: #6a1b9a;
}

.dep-action-dropdown option[value="skip"] {
    color: #757575;
}

/* Highlight dropdown based on selected action */
.dep-item:has(.dep-action-dropdown[value="migrate"]) .dep-action-dropdown {
    border-color: #bbdefb;
    background: #e3f2fd;
}

.dep-item:has(.dep-action-dropdown[value="use_existing"]) .dep-action-dropdown {
    border-color: #c8e6c9;
    background: #e8f5e9;
}

.dep-item:has(.dep-action-dropdown[value="map_to"]) .dep-action-dropdown {
    border-color: #e1bee7;
    background: #f3e5f5;
}

.dep-item:has(.dep-action-dropdown[value="skip"]) .dep-action-dropdown {
    border-color: #e0e0e0;
    background: #fafafa;
}

/* Mapping dropdown container */
.dep-mapping-dropdown-container {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.mapping-arrow {
    color: #6a1b9a;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Mapping dropdown */
.dep-mapping-dropdown {
    flex: 1;
    max-width: 280px;
    padding: 5px 8px;
    font-size: 0.75rem;
    border: 1px solid #e1bee7;
    border-radius: 4px;
    background: #f3e5f5;
    cursor: pointer;
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dep-mapping-dropdown:hover {
    border-color: #ce93d8;
}

.dep-mapping-dropdown:focus {
    outline: none;
    border-color: #9c27b0;
    box-shadow: 0 0 0 2px rgba(156, 39, 176, 0.15);
}

/* Mapping dropdown option styling */
.dep-mapping-dropdown option {
    padding: 4px 8px;
}

.dep-mapping-dropdown option[value="__clear__"] {
    color: #c62828;
    font-style: italic;
}

.dep-mapping-dropdown option:disabled {
    color: #9e9e9e;
    font-style: italic;
}

/* IAM vs Credential indicator in dropdown */
.dep-mapping-dropdown option[title*="[IAM]"] {
    color: #2e7d32;
}

.dep-mapping-dropdown option[title*="[Creds]"] {
    color: #e65100;
}

/* Responsive: stack action and mapping dropdowns on small screens */
@media (max-width: 768px) {
    .dep-action-row {
        flex-wrap: wrap;
    }
    
    .dep-mapping-dropdown-container {
        width: 100%;
        margin-top: 6px;
    }
    
    .dep-mapping-dropdown {
        max-width: none;
    }
}

.asset-blockers {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.blocker-tag {
    font-size: 0.8rem;
    color: #c62828;
    background: #ffebee;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #ffcdd2;
    font-weight: 500;
}

/* Dependency Summary Panel */
.dependency-summary-panel {
    margin-top: 16px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.dependency-summary-panel .summary-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.dependency-summary-panel .summary-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.dependency-summary-panel .summary-counts .count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.dependency-summary-panel .summary-counts .count.migrate {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.dependency-summary-panel .summary-counts .count.use-existing {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.dependency-summary-panel .summary-counts .count.map-to {
    background: #f3e5f5;
    color: #6a1b9a;
    border: 1px solid #e1bee7;
}

.dependency-summary-panel .summary-counts .count.skip {
    background: #fafafa;
    color: #616161;
    border: 1px solid #e0e0e0;
}

/* Blockers section in summary */
.dependency-summary-panel .summary-blockers {
    margin-top: 12px;
    padding: 10px 12px;
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dependency-summary-panel .summary-blockers .blockers-icon {
    font-size: 0.9rem;
}

.dependency-summary-panel .summary-blockers .blockers-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: #c62828;
}

.dependency-summary-panel .summary-blockers .blockers-list {
    margin: 4px 0 0 0;
    padding-left: 20px;
    font-size: 0.75rem;
    color: #b71c1c;
}

.dependency-summary-panel .summary-blockers .blockers-list li {
    margin-bottom: 2px;
}

.dependency-summary-panel .summary-blockers .blockers-list .more-blockers {
    font-style: italic;
    color: #c62828;
}

/* Bulk Check Button and Indicators */
.bulk-check-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--aws-orange);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.bulk-check-btn:hover {
    background: #ec8b00;
}

.bulk-check-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.bulk-check-btn.loading {
    background: #999;
    cursor: not-allowed;
}

.bulk-check-btn .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Bulk Check Progress and Completion Indicators */
.bulk-check-progress {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-top: 8px;
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #1565c0;
}

.bulk-check-progress .spinner.small {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.bulk-check-complete {
    display: none;
    padding: 8px 12px;
    margin-top: 8px;
    border-radius: 6px;
    font-size: 0.85rem;
}

.bulk-check-complete.success {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #2e7d32;
}

.bulk-check-complete.error {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
    color: #e65100;
}

.bulk-check-complete .complete-icon {
    margin-right: 6px;
}

.bulk-check-complete .complete-message {
    font-weight: 500;
}

.bulk-check-complete .error-details {
    margin: 8px 0 0 0;
    padding-left: 20px;
    font-size: 0.8rem;
    color: #bf360c;
}

.bulk-check-complete .error-details li {
    margin-bottom: 2px;
}

/* Warnings section in summary */
.dependency-summary-panel .summary-warnings {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dependency-summary-panel .summary-warning {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.dependency-summary-panel .summary-warning .warning-icon {
    flex-shrink: 0;
    font-size: 0.9rem;
}

.dependency-summary-panel .summary-warning .warning-text {
    color: var(--text-primary);
    line-height: 1.4;
}

/* Warning type: skip-not-in-target */
.dependency-summary-panel .summary-warning.skip-not-in-target {
    background: #fff3e0;
    border: 1px solid #ffe0b2;
}

.dependency-summary-panel .summary-warning.skip-not-in-target .warning-text {
    color: #e65100;
}

/* Warning type: credential-mapping */
.dependency-summary-panel .summary-warning.credential-mapping {
    background: #fff8e1;
    border: 1px solid #ffecb3;
}

.dependency-summary-panel .summary-warning.credential-mapping .warning-text {
    color: #f57f17;
}

/* Responsive: stack summary counts on small screens */
@media (max-width: 480px) {
    .dependency-summary-panel .summary-counts {
        flex-direction: column;
        gap: 6px;
    }
    
    .dependency-summary-panel .summary-counts .count {
        width: fit-content;
    }
}

/* Option groups */
.option-group {
    margin-bottom: 16px;
}

.option-group:last-child {
    margin-bottom: 0;
}

.option-group > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.15s;
}

.radio-label:hover {
    background: #f5f5f5;
}

/* Credential configuration */
.credential-item {
    padding: 12px;
    background: #fafafa;
    border-radius: 6px;
    margin-bottom: 12px;
}

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

.credential-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.credential-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: #e0e0e0;
    padding: 2px 8px;
    border-radius: 4px;
}

.credential-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.credential-method {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
}

.credential-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.credential-fields input {
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
}

/* VPC mapping */
.vpc-item {
    padding: 12px;
    background: #fafafa;
    border-radius: 6px;
    margin-bottom: 12px;
}

.vpc-source {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.vpc-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.vpc-name {
    font-weight: 500;
    font-size: 0.9rem;
}

.vpc-mapping {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vpc-arrow {
    color: var(--aws-orange);
    font-weight: bold;
}

.vpc-target-select {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Migration footer */
.migration-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: white;
    border-top: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
}

.migration-validation {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.validation-error {
    font-size: 0.85rem;
    color: #c62828;
}

.migration-actions {
    display: flex;
    gap: 12px;
}

.btn-large {
    padding: 12px 32px;
    font-size: 1rem;
}

/* Progress overlay */
.migration-progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.progress-content {
    text-align: center;
    padding: 40px;
}

.progress-content h3 {
    margin: 0 0 16px 0;
    font-size: 1.25rem;
}

.progress-phase {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.progress-bar-container {
    width: 300px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto 12px;
}

.progress-bar {
    height: 100%;
    background: var(--aws-orange);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Results panel */
.migration-results-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 101;
    display: flex;
    flex-direction: column;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.results-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.results-header h3.results-success {
    color: #2e7d32;
}

.results-header h3.results-error {
    color: #c62828;
}

.results-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.results-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 20px;
    background: #f5f5f5;
    border-radius: 8px;
    min-width: 80px;
}

.summary-stat.success {
    background: #e8f5e9;
}

.summary-stat.error {
    background: #ffebee;
}

.summary-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.summary-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.results-assets h4,
.results-errors h4 {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.results-assets ul,
.results-errors ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-asset {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 4px;
    background: #fafafa;
}

.result-asset.imported {
    background: #e8f5e9;
}

.result-asset.failed {
    background: #ffebee;
}

.result-asset .asset-status {
    font-size: 1rem;
}

.result-asset .asset-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: #e0e0e0;
    padding: 2px 6px;
    border-radius: 3px;
}

.result-asset .asset-name {
    flex: 1;
    font-size: 0.9rem;
}

.result-asset .asset-error {
    font-size: 0.8rem;
    color: #c62828;
}

.result-error {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: #ffebee;
    border-radius: 4px;
    margin-bottom: 8px;
}

.result-error .error-phase {
    font-size: 0.75rem;
    font-weight: 600;
    color: #c62828;
}

.result-error .error-message {
    font-size: 0.85rem;
    color: #b71c1c;
}

.results-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

/* Target Resources Status */
.target-resources-status-container {
    margin-top: 4px;
}

.target-resources-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    flex-wrap: wrap;
}

.target-resources-status .status-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
}

.target-resources-status .status-indicator.loading {
    color: var(--text-secondary);
}

.target-resources-status .status-indicator.error {
    color: #c62828;
}

.target-resources-status .status-indicator.success {
    color: #2e7d32;
}

.target-resources-status .resource-counts {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.target-resources-status .refresh-target-btn {
    padding: 2px 6px;
    font-size: 0.75rem;
    min-width: auto;
}

.spinner-small {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #e0e0e0;
    border-top-color: var(--aws-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive migration layout */
@media (max-width: 900px) {
    .migration-content {
        flex-direction: column;
    }
    
    .migration-assets-panel,
    .migration-config-panel {
        width: auto;
        min-width: auto;
        margin: 8px 16px;
    }
    
    .migration-config-panel {
        max-height: 400px;
    }
    
    .migration-accounts {
        flex-direction: column;
        gap: 8px;
    }
    
    .migration-arrow {
        transform: rotate(90deg);
        margin: 0;
    }
}

/* ============================================================================
   Task 17: Enhanced Dependency UI Styles
   ============================================================================ */

/* Dependency item hover and interaction states */
.dep-item:hover {
    border-color: var(--aws-orange);
    box-shadow: 0 1px 4px rgba(255, 153, 0, 0.15);
}

.dep-item:focus-within {
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.1);
}

/* Smooth transitions for dependency items */
.dep-item {
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

/* Dependency type badge colors by type */
.dep-type[data-type="dataset"] {
    background: #1565c0;
}

.dep-type[data-type="data_source"] {
    background: #6a1b9a;
}

.dep-type[data-type="datasource"] {
    background: #6a1b9a;
}

/* Target status icon animations */
.dep-target-status .target-status-icon {
    transition: transform 0.2s ease;
}

.dep-item:hover .dep-target-status .target-status-icon {
    transform: scale(1.1);
}

/* Action dropdown disabled state */
.dep-action-dropdown:disabled {
    background: #f5f5f5;
    color: #9e9e9e;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Mapping dropdown loading state */
.dep-mapping-dropdown.loading {
    background: #f5f5f5;
    color: #9e9e9e;
    cursor: wait;
}

/* Dependency summary panel enhancements */
.dependency-summary-panel {
    transition: all 0.2s ease;
}

.dependency-summary-panel:empty {
    display: none;
}

/* Summary count badges with icons */
.dependency-summary-panel .summary-counts .count::before {
    margin-right: 4px;
}

.dependency-summary-panel .summary-counts .count.migrate::before {
    content: "📦";
}

.dependency-summary-panel .summary-counts .count.use-existing::before {
    content: "✅";
}

.dependency-summary-panel .summary-counts .count.map-to::before {
    content: "🔗";
}

.dependency-summary-panel .summary-counts .count.skip::before {
    content: "⏭️";
}

/* Dependency info truncation for long names */
.dep-info .dep-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Full width action row on dependency items */
.dep-action-row {
    width: 100%;
    flex-basis: 100%;
}

/* Improved target status text wrapping */
.dep-target-status .target-status-text {
    flex: 1;
    min-width: 0;
}

/* Matched resource details in target status */
.dep-target-status .matched-resource {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-family: monospace;
    display: block;
    margin-top: 2px;
    word-break: break-all;
}

/* Very small screen responsive adjustments */
@media (max-width: 480px) {
    .dep-item {
        padding: 10px;
        gap: 6px;
    }
    
    .dep-indicator {
        font-size: 0.8rem;
    }
    
    .dep-type {
        font-size: 0.65rem;
        padding: 1px 4px;
    }
    
    .dep-info .dep-name {
        font-size: 0.8rem;
    }
    
    .dep-info .dep-id {
        font-size: 0.65rem;
    }
    
    .dep-target-status {
        font-size: 0.7rem;
        padding: 4px 6px;
    }
    
    .dep-action-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .dep-action-label {
        margin-bottom: 2px;
    }
    
    .dep-action-dropdown {
        max-width: none;
        width: 100%;
    }
    
    .dep-mapping-dropdown-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mapping-arrow {
        display: none;
    }
    
    .dep-mapping-dropdown {
        max-width: none;
        width: 100%;
    }
    
    /* Summary panel mobile */
    .dependency-summary-panel {
        padding: 10px 12px;
    }
    
    .dependency-summary-panel .summary-title {
        font-size: 0.8rem;
    }
    
    .dependency-summary-panel .summary-counts .count {
        font-size: 0.75rem;
        padding: 3px 8px;
    }
}

/* Print styles for dependency UI */
@media print {
    .dep-action-dropdown,
    .dep-mapping-dropdown,
    .dep-action-row {
        display: none;
    }
    
    .dep-target-status {
        border: 1px solid #ccc;
    }
    
    .dependency-summary-panel {
        break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .dep-item {
        border-width: 2px;
    }
    
    .dep-target-status {
        border-width: 2px;
    }
    
    .dep-action-dropdown,
    .dep-mapping-dropdown {
        border-width: 2px;
    }
    
    .dependency-summary-panel .summary-counts .count {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dep-item,
    .dep-target-status .target-status-icon,
    .dep-action-dropdown,
    .dep-mapping-dropdown,
    .dependency-summary-panel {
        transition: none;
    }
}

/* Focus visible styles for keyboard navigation */
.dep-action-dropdown:focus-visible,
.dep-mapping-dropdown:focus-visible {
    outline: 2px solid var(--aws-orange);
    outline-offset: 2px;
}

/* Dependency item with blocker styling */
.dep-item.has-blocker {
    border-left: 3px solid #c62828;
}

.dep-item.has-blocker .dep-indicator {
    color: #c62828;
}

/* Skipped dependency visual feedback */
.dep-item.action-skip {
    opacity: 0.7;
    background: #fafafa;
}

.dep-item.action-skip .dep-name {
    text-decoration: line-through;
    color: var(--text-secondary);
}

/* Use existing dependency visual feedback */
.dep-item.action-use-existing {
    border-left: 3px solid #2e7d32;
}

/* Map to dependency visual feedback */
.dep-item.action-map-to {
    border-left: 3px solid #6a1b9a;
}

/* Migrate dependency visual feedback */
.dep-item.action-migrate {
    border-left: 3px solid #1565c0;
}


/* ============================================================================
   Migration History Styles
   ============================================================================ */

/* History Filters */
.history-filters {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.history-filters .filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.history-filters .filter-row + .filter-row {
    margin-top: 12px;
}

.history-filters .filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}

.history-filters .filter-group.search-group {
    flex: 2;
    min-width: 200px;
}

.history-filters .filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-filters .filter-group input,
.history-filters .filter-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.history-filters .filter-group input:focus,
.history-filters .filter-group select:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.1);
}

.history-filters .filter-actions {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* History Table */
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.history-table thead {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 1;
}

.history-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.history-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.history-table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.history-table tbody tr:hover {
    background: var(--bg-hover);
}

.history-table .timestamp-cell {
    white-space: nowrap;
}

.history-table .timestamp-date {
    display: block;
    font-weight: 500;
}

.history-table .timestamp-time {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.history-table .account-cell {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-table .assets-cell {
    text-align: center;
}

.history-table .status-cell {
    white-space: nowrap;
}

.history-table .duration-cell {
    white-space: nowrap;
    color: var(--text-secondary);
}

.history-table .actions-cell {
    text-align: right;
    white-space: nowrap;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-success {
    background: rgba(40, 167, 69, 0.15);
    color: #2e7d32;
}

.status-badge.status-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #f57c00;
}

.status-badge.status-error {
    background: rgba(220, 53, 69, 0.15);
    color: #c62828;
}

.status-badge.status-info {
    background: rgba(23, 162, 184, 0.15);
    color: #0277bd;
}

.status-badge.status-unknown {
    background: rgba(108, 117, 125, 0.15);
    color: #616161;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    text-align: center;
    padding: 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Empty State for History */
#history-table-container .empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

#history-table-container .empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

#history-table-container .empty-state h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

#history-table-container .empty-state p {
    margin: 0;
    max-width: 400px;
    margin: 0 auto;
}

/* Error State for History */
#history-table-container .error-state {
    text-align: center;
    padding: 32px 24px;
    background: rgba(220, 53, 69, 0.05);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 8px;
    color: #c62828;
}

#history-table-container .error-state p {
    margin: 0 0 16px 0;
}

/* Modal XL size for history */
.modal-xl {
    max-width: 1000px;
    width: 95%;
}

/* Responsive History Table */
@media (max-width: 768px) {
    .history-filters .filter-row {
        flex-direction: column;
    }
    
    .history-filters .filter-group {
        width: 100%;
    }
    
    .history-filters .filter-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
    
    .history-table {
        font-size: 0.8rem;
    }
    
    .history-table th,
    .history-table td {
        padding: 8px 10px;
    }
    
    .history-table .account-cell {
        max-width: 100px;
    }
    
    /* Hide some columns on mobile */
    .history-table .duration-cell {
        display: none;
    }
}

@media (max-width: 480px) {
    .history-table .account-cell:nth-child(3) {
        display: none;
    }
    
    .status-badge {
        padding: 2px 6px;
        font-size: 0.65rem;
    }
}

/* ============================================================================
   Retention Expiration Notice Styles
   Requirements: 10.4 - Display notice when viewing migrations approaching retention expiration
   ============================================================================ */

.retention-expiration-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid;
}

.retention-notice-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.retention-notice-content {
    flex: 1;
}

.retention-notice-message {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.retention-notice-suggestion {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Warning level - 2-7 days until expiration */
.retention-notice-warning {
    background: rgba(240, 173, 78, 0.15);
    border-color: var(--warning);
    color: #8a6d3b;
}

/* Critical level - less than 1 day until expiration */
.retention-notice-critical {
    background: rgba(209, 50, 18, 0.15);
    border-color: var(--error);
    color: var(--error);
}

/* Expired - record has passed TTL */
.retention-notice-expired {
    background: rgba(104, 112, 120, 0.15);
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

/* ============================================================================
   Migration Templates Styles
   Requirements: 4.1, 4.2 - Templates list display
   ============================================================================ */

/* Templates List Container */
.templates-list {
    margin-top: 16px;
}

/* Templates Table */
.templates-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
}

.templates-table thead {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 1;
}

.templates-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

.templates-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.templates-table tbody tr {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.templates-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Template Name Cell */
.templates-table .template-name-cell {
    min-width: 150px;
}

.templates-table .template-name {
    font-weight: 500;
    color: var(--text-primary);
}

/* Template Description Cell */
.templates-table .template-desc-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Template Accounts Cell */
.templates-table .template-accounts-cell {
    white-space: nowrap;
}

.templates-table .account-flow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.templates-table .source-account,
.templates-table .target-account {
    padding: 2px 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

.templates-table .flow-arrow {
    color: var(--text-secondary);
    font-weight: bold;
}

/* Template Assets Cell */
.templates-table .template-assets-cell {
    text-align: center;
    white-space: nowrap;
}

/* Template Last Used Cell */
.templates-table .template-last-used-cell {
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Template Actions Cell */
.templates-table .template-actions-cell {
    text-align: right;
    white-space: nowrap;
}

.templates-table .template-actions-cell .btn {
    margin-left: 6px;
}

.templates-table .template-actions-cell .btn:first-child {
    margin-left: 0;
}

/* Empty State for Templates */
#templates-list-container .empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}

#templates-list-container .empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

#templates-list-container .empty-state h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

#templates-list-container .empty-state p {
    margin: 0;
    max-width: 400px;
    margin: 0 auto;
}

/* Error State for Templates */
#templates-list-container .error-state {
    text-align: center;
    padding: 32px 24px;
}

#templates-list-container .error-state .error-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

#templates-list-container .error-state h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

#templates-list-container .error-state p {
    margin: 0 0 16px 0;
    color: var(--text-secondary);
}

/* Responsive Templates Table */
@media (max-width: 992px) {
    .templates-table .template-desc-cell {
        max-width: 150px;
    }
}

@media (max-width: 768px) {
    .templates-table {
        font-size: 0.85rem;
    }
    
    .templates-table th,
    .templates-table td {
        padding: 10px 12px;
    }
    
    .templates-table .template-desc-cell {
        display: none;
    }
    
    .templates-table .template-last-used-cell {
        display: none;
    }
    
    .templates-table .account-flow {
        flex-direction: column;
        gap: 2px;
    }
    
    .templates-table .flow-arrow {
        transform: rotate(90deg);
    }
}

@media (max-width: 576px) {
    .templates-table .template-actions-cell .btn {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    /* Stack action buttons on very small screens */
    .templates-table .template-actions-cell {
        display: flex;
        flex-direction: column;
        gap: 4px;
        align-items: flex-end;
    }
    
    .templates-table .template-actions-cell .btn {
        margin-left: 0;
    }
}

/* =====================================================
   Template Preview Modal Styles
   Requirements: 5.1, 5.4, 5.5, 5.6
   ===================================================== */

.preview-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Preview Banner Styles */
.preview-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.preview-banner .banner-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.preview-banner .banner-content {
    flex: 1;
}

.preview-banner .banner-content strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.preview-banner .banner-content p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

.preview-banner-success {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
}

.preview-banner-warning {
    background: #fffbeb;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.preview-banner-error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

/* Preview Section Styles */
.preview-section {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.preview-section .section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.preview-section .section-header .section-icon {
    font-size: 1.1rem;
}

.section-header-error {
    background: #fef2f2;
    color: #991b1b;
}

.section-header-warning {
    background: #fffbeb;
    color: #92400e;
}

.section-header-info {
    background: #eff6ff;
    color: #1e40af;
}

.preview-section .section-content {
    padding: 16px;
    background: white;
}

.preview-section .section-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Preview List Styles */
.preview-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.preview-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 0.9rem;
}

.preview-item .item-type {
    background: #e5e7eb;
    color: var(--text-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.preview-item .item-message {
    flex: 1;
    min-width: 200px;
}

.preview-item .item-asset {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
}

.preview-item .item-id {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.preview-item .item-existing {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Error and Warning List Specific Styles */
.error-list .error-item {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
}

.warning-list .warning-item {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
}

.conflict-list .conflict-item {
    background: #fff7ed;
    border-left: 3px solid #f97316;
}

/* Source Changes Section */
.preview-source-changes .change-group {
    margin-bottom: 16px;
}

.preview-source-changes .change-group:last-child {
    margin-bottom: 0;
}

.preview-source-changes .change-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.preview-source-changes .change-icon {
    font-size: 1rem;
}

.preview-source-changes .change-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-source-changes .change-item {
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: monospace;
}

.change-deleted .change-item {
    background: #fef2f2;
    color: #991b1b;
}

.change-modified .change-item {
    background: #fffbeb;
    color: #92400e;
}

.change-new-deps .change-item {
    background: #eff6ff;
    color: #1e40af;
}

/* Preview Table Styles */
.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.preview-table th,
.preview-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.preview-table th {
    background: #f3f4f6;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.preview-table tbody tr:hover {
    background: #f9fafb;
}

.preview-table .action-type {
    font-weight: 500;
}

.preview-table .action-id {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.preview-table .action-reason {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Action Badge Styles */
.action-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.action-badge-create,
.action-badge-migrate {
    background: #ecfdf5;
    color: #065f46;
}

.action-badge-update,
.action-badge-overwrite {
    background: #eff6ff;
    color: #1e40af;
}

.action-badge-skip {
    background: #f3f4f6;
    color: #6b7280;
}

.action-badge-rename {
    background: #fef3c7;
    color: #92400e;
}

.action-badge-use_existing,
.action-badge-map_to {
    background: #f0fdf4;
    color: #166534;
}

/* Empty State */
.preview-section .empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-style: italic;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .preview-table {
        font-size: 0.85rem;
    }
    
    .preview-table th,
    .preview-table td {
        padding: 8px 10px;
    }
    
    .preview-table .action-id {
        max-width: 120px;
    }
    
    .preview-table .action-reason {
        display: none;
    }
    
    .preview-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preview-item .item-message {
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .preview-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .preview-section .section-header {
        font-size: 0.9rem;
        padding: 10px 12px;
    }
    
    .preview-section .section-content {
        padding: 12px;
    }
}

/* =====================================================
   Execute Template Modal Styles
   ===================================================== */

/* Execute Template Content */
.execute-template-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Execute Summary Section */
.execute-summary {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.execute-summary .summary-header h4 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.execute-summary .summary-description {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.execute-summary .summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.execute-summary .summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.execute-summary .summary-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.execute-summary .summary-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Execute Options Section */
.execute-options {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.execute-options h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.execute-options .options-description {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.execute-options .form-label .label-hint {
    font-weight: normal;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-left: 8px;
}

/* Execute Notice */
.execute-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #3b82f6;
    border-radius: 8px;
    color: #1e40af;
}

.execute-notice .notice-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.execute-notice .notice-content {
    flex: 1;
}

.execute-notice .notice-content strong {
    display: block;
    margin-bottom: 4px;
}

.execute-notice .notice-content p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Execute Progress */
.execute-progress {
    text-align: center;
    padding: 40px 20px;
}

.execute-progress .progress-indicator {
    margin-bottom: 20px;
}

.execute-progress .progress-indicator .spinner.large {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

.execute-progress h4 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.execute-progress .progress-description {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.execute-progress .progress-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* Execution Results */
.execution-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Result Banner */
.result-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
}

.result-banner .banner-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.result-banner .banner-content {
    flex: 1;
}

.result-banner .banner-content strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.result-banner .banner-content p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

.result-banner-success {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
}

.result-banner-warning {
    background: #fffbeb;
    border: 1px solid #f59e0b;
    color: #92400e;
}

.result-banner-error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

/* Result Details */
.result-details {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.result-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.result-value.monospace {
    font-family: monospace;
    font-size: 0.85rem;
    word-break: break-all;
}

/* Result Sections */
.result-section {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.result-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.result-section h4 .section-icon {
    font-size: 1.1rem;
}

.result-section.result-errors h4 {
    background: #fef2f2;
    color: #991b1b;
}

.result-section.result-warnings h4 {
    background: #fffbeb;
    color: #92400e;
}

.result-section.result-overrides h4 {
    background: #eff6ff;
    color: #1e40af;
}

/* Result List */
.result-list {
    list-style: none;
    padding: 16px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
}

.result-list-item {
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 0.9rem;
}

.result-list-item.error-item {
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    color: #991b1b;
}

.result-list-item.warning-item {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    color: #92400e;
}

/* Overrides List */
.overrides-list {
    padding: 16px;
    background: white;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.override-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #eff6ff;
    border-radius: 6px;
    font-size: 0.9rem;
}

.override-label {
    font-weight: 500;
    color: #1e40af;
}

.override-value {
    font-weight: 600;
    color: var(--text-primary);
}

.override-original {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Error Actions */
.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

/* Responsive Styles for Execute Template Modal */
@media (max-width: 768px) {
    .execute-summary .summary-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .result-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .execute-summary .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .execute-notice {
        flex-direction: column;
        text-align: center;
    }
    
    .result-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .override-item {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ============================================================================
   Authentication Type Badges and Key Age Styles
   ============================================================================ */

/* Auth Type Badge Base */
.auth-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 8px;
    vertical-align: middle;
}

/* Cross-Account Role Badge (Green/Success) */
.auth-type-badge.auth-type-role {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
    border: 1px solid rgba(0, 168, 107, 0.3);
}

/* Access Keys Badge (Yellow/Warning) */
.auth-type-badge.auth-type-keys {
    background: rgba(240, 173, 78, 0.15);
    color: #8a6d3b;
    border: 1px solid rgba(240, 173, 78, 0.3);
}

/* Account Status Row */
.account-status-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

/* Key Age Info */
.key-age-info {
    display: inline-block;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.key-age-info.key-age-ok {
    color: var(--text-secondary);
    background: var(--aws-light);
}

.key-age-info.key-age-warning {
    color: #8a6d3b;
    background: rgba(240, 173, 78, 0.15);
}

.key-age-info.key-age-unknown {
    color: var(--text-secondary);
    font-style: italic;
}

/* Rotation Warning */
.rotation-warning {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--error);
    font-weight: 500;
    padding: 2px 8px;
    background: rgba(209, 50, 18, 0.1);
    border-radius: 4px;
}

/* Responsive adjustments for account items with badges */
@media (max-width: 600px) {
    .auth-type-badge {
        display: block;
        margin-left: 0;
        margin-top: 4px;
        width: fit-content;
    }
    
    .account-status-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}


/* =============================================================================
   MODULE ADMIN STYLES
   Requirements: 27.1, 27.2, 27.3, 27.4, 27.5, 27.6, 27.7
   ============================================================================= */

/* Modules Grid Layout */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    padding: 4px;
}

/* Module Card */
.module-card {
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    padding: 20px;
    transition: all 0.2s ease;
    position: relative;
}

.module-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.module-card.enabled {
    border-left: 4px solid var(--success);
}

.module-card.core {
    border-left: 4px solid var(--aws-orange);
    background: linear-gradient(135deg, #fff9f5 0%, white 100%);
}

.module-card.planned {
    opacity: 0.7;
    background: #fafafa;
}

.module-card.deps-missing {
    opacity: 0.8;
}

.module-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

.module-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--border-color);
    border-top-color: var(--aws-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Module Card Header */
.module-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.module-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.module-title-section {
    flex: 1;
    min-width: 0;
}

.module-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.module-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.module-badges .status-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
    text-transform: capitalize;
}

.module-badges .version-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(108, 117, 125, 0.1);
    color: var(--text-secondary);
}

/* Module Toggle */
.module-toggle {
    flex-shrink: 0;
}

.always-enabled-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 153, 0, 0.15);
    color: var(--aws-orange);
    font-weight: 500;
    white-space: nowrap;
}

.planned-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(108, 117, 125, 0.15);
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

/* Module Description */
.module-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 16px 0;
}

/* Module Details */
.module-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.module-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.85rem;
}

.module-detail-row .detail-label {
    color: var(--text-secondary);
    flex-shrink: 0;
    min-width: 90px;
}

.module-detail-row .detail-value {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Capability Tags */
.capability-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: rgba(0, 168, 107, 0.1);
    color: var(--success);
    font-weight: 500;
}

.capability-tag.missing {
    background: rgba(209, 50, 18, 0.1);
    color: var(--error);
}

/* Dependency Tags */
.dependency-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.dependency-tag.enabled {
    background: rgba(0, 168, 107, 0.1);
    color: var(--success);
}

.dependency-tag.disabled {
    background: rgba(209, 50, 18, 0.1);
    color: var(--error);
}

/* Module Warnings */
.module-warnings {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.module-warning {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.module-warning.capability {
    background: rgba(240, 173, 78, 0.1);
    color: #b8860b;
}

.module-warning.dependency {
    background: rgba(209, 50, 18, 0.1);
    color: var(--error);
}

.module-warning .warning-icon {
    flex-shrink: 0;
}

.module-warning .warning-text {
    line-height: 1.4;
}

/* Modules Section Header */
.modules-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modules-header h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
}

.modules-stats {
    display: flex;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modules-stats .stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.modules-stats .stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ============================================================================
   Module Confirmation Modal Styles
   Requirements: 27.5
   ============================================================================ */

.module-confirm-modal {
    max-width: 550px;
    width: 95%;
}

.module-confirm-modal .modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.module-confirm-modal.enable .modal-header {
    border-bottom: 3px solid var(--success);
}

.module-confirm-modal.disable .modal-header {
    border-bottom: 3px solid var(--error);
}

/* Module Info Summary */
.module-info-summary {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.module-info-text h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.module-info-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Confirm Question */
.confirm-question {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-weight: 500;
}

/* Impact Summary */
.impact-summary {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.impact-section {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.impact-section:last-child {
    border-bottom: none;
}

.impact-section.warning {
    background: #fff8e6;
    border-left: 4px solid var(--warning);
}

.impact-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px 0;
}

.impact-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
}

.impact-list {
    margin: 0;
    padding-left: 20px;
}

.impact-list li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.impact-list li:last-child {
    margin-bottom: 0;
}

.impact-list.features li {
    color: var(--text-primary);
}

.impact-list.dependents li {
    margin-bottom: 10px;
}

.impact-list.dependents strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.impact-list.dependents .dependent-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.impact-list.capabilities li {
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

.impact-list.capabilities code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.impact-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 12px 0 0 0;
    font-style: italic;
}

/* Capability Action */
.capability-action {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
}

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

.capability-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 8px 0 0 28px;
}

/* Modal Footer Buttons */
.module-confirm-modal .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.module-confirm-modal .btn {
    min-width: 120px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .module-card-header {
        flex-wrap: wrap;
    }
    
    .module-toggle {
        width: 100%;
        margin-top: 8px;
        display: flex;
        justify-content: flex-end;
    }

    .module-confirm-modal {
        max-width: 100%;
        margin: 10px;
    }

    .module-info-summary {
        flex-direction: column;
        text-align: center;
    }

    .module-icon-large {
        margin: 0 auto;
    }
}

/* =============================================================================
   Permission Override Admin Styles
   Requirements: 26.1, 26.2, 26.3
   ============================================================================= */

/* Principal Type Badge */
.principal-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.principal-type-badge.user {
    background: rgba(0, 123, 255, 0.15);
    color: #0056b3;
}

.principal-type-badge.cognito_group {
    background: rgba(108, 117, 125, 0.15);
    color: #495057;
}

.principal-type-badge.idc_group {
    background: rgba(255, 153, 0, 0.15);
    color: #b36b00;
}

.principal-type-badge.saml_group {
    background: rgba(111, 66, 193, 0.15);
    color: #5a32a3;
}

/* Count Badges for Grants/Denies */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.count-badge.grants {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.count-badge.denies {
    background: rgba(220, 53, 69, 0.15);
    color: var(--error);
}

/* Principal ID styling */
.principal-id {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Permission Override Table Column Widths */
.data-table .col-type {
    width: 15%;
}

.data-table .col-id {
    width: 25%;
}

.data-table .col-grants,
.data-table .col-denies {
    width: 10%;
    text-align: center;
}

.data-table .col-date {
    width: 15%;
}

.data-table .col-actions {
    width: 20%;
}

/* Permission Override Modal */
.permission-override-modal {
    max-width: 700px;
    width: 90%;
}

.permission-override-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.permission-override-modal .form-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.permission-override-modal .form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.permission-override-modal .form-section h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.permission-override-modal .form-row {
    display: flex;
    gap: 16px;
}

.permission-override-modal .form-row .form-group {
    flex: 1;
}

/* Checkbox Grid for Permissions */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.checkbox-grid .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-grid .checkbox-label:hover {
    background: rgba(255, 153, 0, 0.1);
}

.checkbox-grid .checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Notes textarea */
.permission-override-modal textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
}

.permission-override-modal textarea:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.2);
}

/* Responsive adjustments for Permission Override Modal */
@media (max-width: 768px) {
    .permission-override-modal {
        max-width: 100%;
        margin: 10px;
    }

    .permission-override-modal .form-row {
        flex-direction: column;
        gap: 12px;
    }

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

/* Tab Visibility Module Styles */

/* Tab badges for indicators */
.tab-badge {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.75rem;
    padding: 2px 4px;
    border-radius: 3px;
    vertical-align: middle;
}

.tab-badge-warning {
    background-color: var(--warning);
    color: white;
}

.tab-badge-readonly {
    background-color: #6c757d;
    color: white;
}

/* Configure account prompt */
.tab-prompt-container {
    margin: 20px 0;
}

.configure-prompt {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
}

.configure-prompt-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.configure-prompt h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.configure-prompt p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 12px;
    line-height: 1.5;
}

.configure-prompt .btn {
    margin-top: 20px;
}

/* Read-only indicator */
.tab-indicator-container {
    margin: 16px 0;
}

.readonly-indicator {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.readonly-icon {
    font-size: 1.25rem;
}

.readonly-text {
    color: #856404;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ===================================
   Add Account Wizard Styles
   =================================== */

.wizard-modal {
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.wizard-container {
    padding: 20px;
}

/* Progress Indicator */
.wizard-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    position: relative;
}

.wizard-progress::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 1;
}

.wizard-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.wizard-step.active .wizard-step-number {
    background: #007bff;
    color: white;
}

.wizard-step.complete .wizard-step-number {
    background: #28a745;
    color: white;
}

.wizard-step.complete .wizard-step-number::after {
    content: '✓';
}

.wizard-step-label {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.wizard-step.active .wizard-step-label {
    color: #007bff;
    font-weight: bold;
}

/* Error Display */
.wizard-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Step Title */
.wizard-step-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

/* Step Content */
.wizard-step-content-container {
    min-height: 400px;
    margin-bottom: 20px;
}

.wizard-step-content {
    animation: fadeIn 0.3s ease;
}

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

.wizard-description {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Setup Type Selection */
.setup-type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.setup-type-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.setup-type-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.setup-type-card.selected {
    border-color: #007bff;
    background: #f0f8ff;
}

.setup-type-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 16px;
}

.setup-type-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #333;
}

.setup-type-card p {
    color: #666;
    margin-bottom: 16px;
    line-height: 1.5;
}

.setup-type-features {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.setup-type-features li {
    padding: 6px 0;
    color: #555;
    font-size: 14px;
}

.select-setup-btn {
    width: 100%;
    margin-top: 16px;
}

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

.wizard-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.wizard-form .form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wizard-form .form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.wizard-form .form-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
}

/* Module Configuration */
.modules-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.module-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: white;
    transition: all 0.3s ease;
}

.module-item.enabled {
    border-color: #28a745;
    background: #f0fff4;
}

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

.module-icon {
    font-size: 20px;
    color: #28a745;
}

.module-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
}

.module-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.module-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.module-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.module-details.hidden {
    display: none;
}

.module-details p {
    color: #666;
    margin-bottom: 12px;
    font-size: 14px;
}

.module-role-level {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

.module-role-level label {
    font-weight: 500;
    color: #555;
    margin-bottom: 0;
}

.role-level-select {
    flex: 1;
    max-width: 300px;
}

/* Role Setup */
.role-setup-options {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 20px;
}

.role-setup-option {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: white;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    margin-top: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-content h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
}

.radio-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.role-manager-credentials,
.manual-setup-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.role-manager-credentials.hidden,
.manual-setup-info.hidden {
    display: none;
}

.info-text {
    color: #666;
    margin-bottom: 16px;
    line-height: 1.5;
}

.role-list {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.role-list li {
    padding: 8px 12px;
    background: #f8f9fa;
    border-left: 3px solid #007bff;
    margin-bottom: 8px;
    font-family: monospace;
    font-size: 14px;
}

.warning-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 12px;
    margin-top: 16px;
}

.warning-box strong {
    color: #856404;
}

.info-box {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    padding: 12px;
    margin-top: 16px;
    color: #0c5460;
}

/* Confirmation Step */
.confirmation-section {
    margin-bottom: 24px;
}

.confirmation-section h4 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

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

.confirmation-table td,
.confirmation-table th {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.confirmation-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.confirmation-table td:first-child {
    font-weight: 500;
    color: #555;
    width: 200px;
}

/* Success Display */
.wizard-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    font-size: 72px;
    color: #28a745;
    margin-bottom: 20px;
}

.wizard-success h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 12px;
}

.wizard-success p {
    color: #666;
    margin-bottom: 24px;
}

.success-details {
    text-align: left;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.success-details h4 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #333;
}

.success-details ul {
    list-style: none;
    padding: 0;
}

.success-details li {
    padding: 6px 0;
    color: #555;
}

.template-downloads {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}

.download-template-btn {
    text-align: left;
}

/* Footer */
.wizard-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.wizard-nav-buttons {
    display: flex;
    gap: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .setup-type-options {
        grid-template-columns: 1fr;
    }
    
    .wizard-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .wizard-progress {
        flex-wrap: wrap;
    }
    
    .wizard-step-label {
        font-size: 10px;
    }
}

/* =============================================================================
   MODULE CONFIGURATION STYLES
   Requirements: 9.1-9.7, 22.1-22.7, 23.1-23.5
   ============================================================================= */

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

.module-card {
    position: relative;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.module-card.enabled {
    border-color: var(--success);
    background: linear-gradient(to bottom right, white, rgba(40, 167, 69, 0.03));
}

.module-card.disabled {
    opacity: 0.85;
}

.module-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.module-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid var(--aws-orange);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.module-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.module-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.module-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.module-config {
    background: var(--aws-light);
    border-radius: 6px;
    padding: 16px;
    margin-top: 16px;
}

.module-config .form-group {
    margin-bottom: 16px;
}

.module-config .form-group:last-of-type {
    margin-bottom: 12px;
}

.module-config label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.module-config select,
.module-config input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    font-family: inherit;
}

.module-config input[type="text"] {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
}

.module-config .hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
    margin-bottom: 0;
}

.save-module-btn {
    width: 100%;
    margin-top: 4px;
}

/* Role Templates Section */
.role-templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.role-template-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.2s ease;
}

.role-template-card:hover {
    border-color: var(--aws-orange);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.role-template-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.download-template-btn {
    width: 100%;
}

.download-template-btn .icon {
    margin-right: 4px;
}

/* Affected Features List */
.affected-features-list {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.affected-features-list li {
    margin: 4px 0;
    color: var(--text-primary);
}

/* Role Level Select Styling */
.role-level-select {
    background-color: white;
    cursor: pointer;
}

.role-level-select:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

/* Role ARN Input Styling */
.role-arn-input {
    background-color: white;
}

.role-arn-input:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.role-arn-input::placeholder {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modules-grid {
        grid-template-columns: 1fr;
    }
    
    .role-templates-grid {
        grid-template-columns: 1fr;
    }
}


/* =============================================================================
   ADMIN MODULES, HEALTH, AND ORPHANED RESOURCES STYLES
   Requirements: 21.1-21.6, 32.1-32.7, 34.1-34.7
   ============================================================================= */

/* Modules List */
.modules-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.module-item {
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.module-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-title h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #232f3e;
}

.module-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #687078;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.module-description {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #687078;
    line-height: 1.5;
}

.module-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.tab-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f3f5;
    border-radius: 4px;
    font-size: 12px;
    color: #232f3e;
}

.module-note {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.module-note small {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Infrastructure Health */
.health-section {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
}

.health-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.health-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #232f3e;
}

.health-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    background: #f9fafb;
}

.health-item:last-child {
    margin-bottom: 0;
}

.health-label {
    font-weight: 500;
    color: #232f3e;
    font-size: 14px;
}

.health-value {
    font-size: 14px;
    color: #687078;
}

.health-item.status-healthy {
    background: #e6f4ea;
    border-left: 3px solid #34a853;
}

.health-item.status-warning {
    background: #fef7e0;
    border-left: 3px solid #fbbc04;
}

.health-item.status-error {
    background: #fce8e6;
    border-left: 3px solid #ea4335;
}

/* Orphaned Resources */
.orphaned-resources-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.orphaned-resource-item {
    padding: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #ffffff;
}

.resource-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.resource-type {
    flex-shrink: 0;
}

.resource-name {
    flex: 1;
}

.resource-name strong {
    font-size: 14px;
    color: #232f3e;
}

.resource-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 4px;
}

.detail-item {
    display: flex;
    gap: 8px;
    font-size: 13px;
}

.detail-label {
    font-weight: 500;
    color: #687078;
    min-width: 120px;
}

.detail-value {
    color: #232f3e;
}

.resource-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Badge Styles */
.badge-success {
    background: #34a853;
    color: white;
}

.badge-secondary {
    background: #687078;
    color: white;
}

.badge-warning {
    background: #fbbc04;
    color: #232f3e;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.alert-success {
    background: #e6f4ea;
    color: #1e8e3e;
    border: 1px solid #34a853;
}

.alert-warning {
    background: #fef7e0;
    color: #ea8600;
    border: 1px solid #fbbc04;
}

.alert-danger {
    background: #fce8e6;
    color: #c5221f;
    border: 1px solid #ea4335;
}

/* Responsive */
@media (max-width: 768px) {
    .module-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .module-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .health-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .resource-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   Unified Account Modal - Role List Section
   ======================================== */

.role-list-section {
    margin-top: 20px;
}

.role-list-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Role List - Compact Grid Layout */
.role-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Role Item Card */
.role-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    transition: all 0.2s ease;
}

.role-item.selected {
    background: #e8f5e9;
    border-color: var(--success);
    border-left-width: 3px;
}

.role-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Role Header */
.role-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.role-icon {
    font-size: 14px;
    color: var(--success);
    flex-shrink: 0;
}

.role-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    flex: 1;
}

/* Role ARN */
.role-arn {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    word-break: break-all;
}

/* Badge in role header */
.role-header .badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    margin-left: auto;
}

/* Role Description (for custom mode) */
.role-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 6px 0;
    line-height: 1.4;
}

/* Role Level Select Container */
.role-level-select {
    margin-top: 8px;
}

.role-level-select.hidden {
    display: none;
}

.role-level-select label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.role-level-select select {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.85rem;
    border: 1px solid #d5dbdb;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
}

.role-level-select select:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.15);
}

/* Checkbox Label in Custom Mode */
.role-item .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 6px;
}

.role-item .checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Hint text in role items */
.role-item .hint {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 6px;
    font-style: italic;
}

/* Empty state */
.role-list .hint {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .role-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   Bootstrap Credentials Step 3 Styling
   ============================================================================ */

/* Bootstrap credentials container */
.bootstrap-credentials {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Role Summary Section - Matches Step 2 layout */
.role-summary {
    background: var(--aws-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 8px;
}

.role-summary h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.role-summary p {
    margin: 8px 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.role-summary p strong {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 140px;
    display: inline-block;
}

/* Bootstrap Instructions Section */
.bootstrap-instructions {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
}

.bootstrap-instructions h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.bootstrap-instructions p {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Code block for bootstrap commands */
.bootstrap-instructions .code-block {
    position: relative;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    margin: 12px 0;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

.bootstrap-instructions .code-block pre {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.bootstrap-instructions .code-block .copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 12px;
    font-size: 0.8rem;
}

/* Credential Form Section */
.credential-form {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
}

.credential-form h4 {
    margin: 0 0 16px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Manual Role Credentials */
.manual-role-credentials {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.manual-role-instructions {
    background: var(--aws-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 20px;
}

.manual-role-instructions h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.manual-role-instructions p {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.manual-role-instructions .code-block {
    position: relative;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    margin: 12px 0;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

.manual-role-instructions .code-block pre {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.manual-role-instructions .code-block .copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 12px;
    font-size: 0.8rem;
}

.manual-role-instructions .hint {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 8px;
}

/* Access Keys Credentials */
.access-keys-credentials {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Warning box for access keys */
.warning-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 6px;
    padding: 16px;
}

.warning-box .warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-box strong {
    display: block;
    margin-bottom: 4px;
    color: #856404;
}

.warning-box p {
    margin: 0;
    font-size: 0.9rem;
    color: #856404;
}

/* Info box for credential security notes */
.info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 16px;
    font-size: 0.9rem;
    color: #0c5460;
}

.info-box .info-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}


/* =============================================================================
   Permission Indicator Styles
   Requirements: Req 10 - Permission Indicators
   ============================================================================= */

.permission-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.permission-indicator:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.permission-indicator .permission-icon {
    font-size: 14px;
    line-height: 1;
}

.permission-indicator .permission-text {
    line-height: 1;
}

/* Status-specific colors */
.permission-available {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.permission-available:hover {
    background-color: #c3e6cb;
}

.permission-insufficient {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.permission-insufficient:hover {
    background-color: #ffeaa7;
}

.permission-unavailable {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.permission-unavailable:hover {
    background-color: #f5c6cb;
}

/* Permission Detail Modal */
.permission-detail-status {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.permission-detail-status.permission-available {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
}

.permission-detail-status.permission-insufficient {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.permission-detail-status.permission-unavailable {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

.permission-detail-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.permission-detail-message {
    flex: 1;
}

.permission-detail-message p {
    margin: 0 0 8px 0;
}

.permission-detail-message p:last-child {
    margin-bottom: 0;
}

.permission-detail-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 20px;
}

.permission-detail-info .info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.permission-detail-info .info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.permission-detail-info .info-label {
    font-weight: 600;
    color: #495057;
}

.permission-detail-info .info-value {
    color: #212529;
    font-family: 'Courier New', monospace;
}

.permission-detail-action {
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    padding: 16px;
}

.permission-detail-action p {
    margin: 0 0 12px 0;
    font-weight: 600;
}

.permission-detail-action ol {
    margin: 0;
    padding-left: 20px;
}

.permission-detail-action li {
    margin-bottom: 8px;
}

.permission-detail-action li:last-child {
    margin-bottom: 0;
}


/* =============================================================================
   Error Handler Styles
   Requirements: Req 11 - Improved Error Messages
   ============================================================================= */

.error-header {
    background-color: #f8d7da;
    border-bottom: 2px solid #dc3545;
}

.error-message-container {
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 8px;
    background-color: #f8f9fa;
    border-left: 4px solid #dc3545;
}

.error-message-container.error-type-permission_denied {
    background-color: #fff3cd;
    border-left-color: #ffc107;
}

.error-message-container.error-type-validation_error {
    background-color: #e7f3ff;
    border-left-color: #007bff;
}

.error-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.error-content {
    flex: 1;
}

.error-message {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #212529;
}

.error-details {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
    margin: 12px 0;
}

.error-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.error-detail-label {
    font-weight: 600;
    color: #495057;
    margin-right: 16px;
}

.error-detail-value {
    color: #212529;
    font-family: 'Courier New', monospace;
    text-align: right;
}

.error-suggestion {
    background-color: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    padding: 12px;
    margin-top: 12px;
}

.error-suggestion strong {
    color: #004085;
}

/* Inline Error Styles */
.inline-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    color: #721c24;
    margin-bottom: 16px;
    animation: slideDown 0.3s ease;
}

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

.inline-error-icon {
    font-size: 20px;
    line-height: 1;
}

.inline-error-message {
    flex: 1;
}

/* Field Error Styles */
.field-error {
    color: #dc3545;
    font-size: 14px;
    margin-top: 4px;
}

.is-invalid {
    border-color: #dc3545 !important;
}

.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}


/* =============================================================================
   Role Manager Modal Styles
   Requirements: Req 8, 9, 18 - Role Manager Integration
   ============================================================================= */

.role-manager-modules {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.role-manager-modules .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.role-manager-modules .section-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.modules-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.module-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.module-card:hover {
    border-color: var(--aws-orange);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.module-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.module-version {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.module-actions {
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

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

.module-actions .template-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
}

.module-actions .template-select:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.15);
}

/* Add Module Dialog */
.add-module-dialog {
    background: var(--aws-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.add-module-dialog h4 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.add-module-dialog .form-group {
    margin-bottom: 16px;
}

.add-module-dialog .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    background: white;
}

.add-module-dialog .form-control:focus {
    outline: none;
    border-color: var(--aws-orange);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.15);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* Modal Large Variant */
.modal.modal-large {
    max-width: 700px;
}

/* Notification Styles (if not already defined) */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 450px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.notification-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.notification-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.notification-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.notification-message {
    flex: 1;
    font-size: 0.9rem;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    margin-left: 12px;
    color: inherit;
}

.notification-close:hover {
    opacity: 1;
}


/* =============================================================================
   Template Update Dialog Styles
   Requirements: Req 26, 27 - Template Update Workflow
   ============================================================================= */

.update-summary {
    background: var(--aws-light);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.version-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.version-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.version-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.version-value {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    padding: 6px 12px;
    border-radius: 6px;
}

.version-value.current {
    background: #e9ecef;
    color: var(--text-secondary);
}

.version-value.new {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
}

.version-arrow {
    font-size: 1.5rem;
    color: var(--aws-orange);
    font-weight: bold;
}

/* Breaking Changes Section */
.breaking-changes-section {
    background: rgba(220, 53, 69, 0.08);
    border: 2px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.breaking-changes-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.breaking-changes-header .warning-icon {
    font-size: 1.5rem;
}

.breaking-changes-header h4 {
    margin: 0;
    color: var(--error);
    font-size: 1rem;
}

.breaking-changes-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.breaking-change-item {
    background: white;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.breaking-change-item:last-child {
    margin-bottom: 0;
}

.breaking-change-item strong {
    display: block;
    color: var(--error);
    margin-bottom: 6px;
}

.breaking-change-item p {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    line-height: 1.5;
}

.migration-note {
    background: rgba(23, 162, 184, 0.1);
    border-left: 3px solid #17a2b8;
    padding: 8px 12px;
    margin-top: 8px;
    border-radius: 4px;
}

.migration-note strong {
    color: #17a2b8;
    display: inline;
}

/* Permission Diff Section */
.permission-diff-section {
    margin-bottom: 20px;
}

.permission-diff-section h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.permission-diff {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.diff-section {
    border-radius: 6px;
    padding: 12px;
}

.diff-section h5 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.diff-section.added {
    background: rgba(0, 168, 107, 0.08);
    border: 1px solid rgba(0, 168, 107, 0.3);
}

.diff-section.added h5 {
    color: var(--success);
}

.diff-section.added .diff-icon {
    color: var(--success);
    font-weight: bold;
}

.diff-section.removed {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.diff-section.removed h5 {
    color: var(--error);
}

.diff-section.removed .diff-icon {
    color: var(--error);
    font-weight: bold;
}

.diff-section.unchanged {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.diff-section.unchanged summary {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.diff-section.unchanged summary:hover {
    color: var(--text-primary);
}

.permission-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.permission-list li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.permission-list code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85rem;
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
}

.no-changes {
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

/* Changelog Section */
.changelog-section {
    margin-bottom: 20px;
}

.changelog-section h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.changelog-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.changelog-entry {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    background: var(--aws-light);
}

.changelog-entry:last-child {
    margin-bottom: 0;
}

.changelog-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.changelog-text {
    flex: 1;
    color: var(--text-primary);
    line-height: 1.5;
}

.changelog-feature {
    border-left: 3px solid var(--success);
}

.changelog-fix {
    border-left: 3px solid #17a2b8;
}

.changelog-breaking {
    border-left: 3px solid var(--error);
    background: rgba(220, 53, 69, 0.05);
}

.changelog-change {
    border-left: 3px solid var(--aws-orange);
}

.no-changelog {
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

/* Update Warning */
.update-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 6px;
    padding: 12px;
    margin-top: 20px;
}

.update-warning p {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.update-warning strong {
    color: #856404;
}


/* =============================================================================
   Bulk Update Dialog Styles
   Requirements: Req 27 - Bulk Template Updates
   ============================================================================= */

.bulk-update-summary {
    background: var(--aws-light);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bulk-update-summary p {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.bulk-actions {
    display: flex;
    gap: 8px;
}

.updates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

.update-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s ease;
}

.update-card:hover {
    border-color: var(--aws-orange);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.update-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    flex: 1;
}

.update-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--aws-orange);
}

.update-info {
    flex: 1;
}

.update-module-name {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.update-versions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-badge {
    font-size: 0.85rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    padding: 3px 8px;
    border-radius: 4px;
}

.version-badge.current {
    background: #e9ecef;
    color: var(--text-secondary);
}

.version-badge.new {
    background: rgba(0, 168, 107, 0.15);
    color: var(--success);
    font-weight: 600;
}

.version-arrow {
    color: var(--aws-orange);
    font-weight: bold;
}

.breaking-badge {
    background: rgba(220, 53, 69, 0.15);
    color: var(--error);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.update-changelog {
    background: var(--aws-light);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.update-changelog strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.update-changelog ul {
    margin: 0;
    padding-left: 20px;
}

.update-changelog li {
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.update-changelog li:last-child {
    margin-bottom: 0;
}

.update-changelog .more-changes {
    font-style: italic;
    color: var(--text-secondary);
}

.update-breaking-warning {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 6px;
    padding: 12px;
}

.update-breaking-warning strong {
    display: block;
    margin-bottom: 8px;
    color: var(--error);
    font-size: 0.9rem;
}

.update-breaking-warning ul {
    margin: 0;
    padding-left: 20px;
}

.update-breaking-warning li {
    margin-bottom: 4px;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.update-breaking-warning li:last-child {
    margin-bottom: 0;
}

/* Bulk Update Progress */
.bulk-update-progress {
    padding: 20px;
}

.bulk-update-progress h4 {
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

#progress-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.progress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: var(--aws-light);
    border-radius: 6px;
    border-left: 3px solid #dee2e6;
}

.progress-item.success {
    border-left-color: var(--success);
    background: rgba(0, 168, 107, 0.05);
}

.progress-item.error {
    border-left-color: var(--error);
    background: rgba(220, 53, 69, 0.05);
}

.progress-module {
    font-weight: 600;
    color: var(--text-primary);
}

.progress-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.status-success {
    color: var(--success);
    font-weight: 600;
}

.status-error {
    color: var(--error);
    font-weight: 600;
}

.bulk-update-complete {
    margin-top: 20px;
    padding: 16px;
    background: rgba(0, 168, 107, 0.1);
    border: 1px solid rgba(0, 168, 107, 0.3);
    border-radius: 8px;
    text-align: center;
}

.bulk-update-complete p {
    margin: 0 0 12px 0;
    color: var(--success);
}

/* Spinner small variant */
.spinner.small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* ==========================================================================
   Module Role Cards — Consolidated Inline View
   ========================================================================== */

.module-roles-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.module-role-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s ease;
}

.module-role-card:hover {
    border-color: #c0c0c0;
}

.module-role-card.disabled {
    background: #fafafa;
    opacity: 0.75;
}

.module-role-card .module-role-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.module-role-card .module-role-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.module-role-card .module-role-name {
    font-weight: 600;
    font-size: 0.95em;
    color: #333;
}

.module-role-card .module-role-body {
    padding: 10px 14px;
}

.module-role-card .module-role-description {
    font-size: 0.85em;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.module-role-card .module-role-details {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #eee;
    font-size: 0.82em;
    color: #888;
}

.module-role-card .module-role-details code {
    font-size: 0.9em;
    word-break: break-all;
    color: #666;
}

.module-role-card .module-role-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.module-role-card .module-role-actions label {
    font-size: 0.82em;
    color: #666;
    white-space: nowrap;
    margin: 0;
}

.module-role-card .module-role-actions select {
    padding: 3px 8px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    font-size: 0.82em;
    background: #fff;
}

.module-role-card .module-role-actions .btn {
    font-size: 0.8em;
    padding: 3px 10px;
    border-radius: 4px;
}

.module-role-card .module-role-actions .inline-remove-module-btn {
    margin-left: auto;
}

.module-role-card .version-badge {
    font-size: 0.78em;
    color: #888;
    font-weight: normal;
}

.version-detecting {
    display: inline-block;
    animation: spin 1s linear infinite;
    margin-left: 4px;
    font-size: 0.85em;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.version-badge.version-custom {
    background: rgba(255, 152, 0, 0.15);
    color: #e65100;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

/* ============================================================================
   Health Check Results Modal
   ============================================================================ */

.health-check-summary {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.health-check-summary.success {
    background: rgba(0, 168, 107, 0.1);
    border: 1px solid rgba(0, 168, 107, 0.3);
}

.health-check-summary.error {
    background: rgba(209, 50, 18, 0.08);
    border: 1px solid rgba(209, 50, 18, 0.25);
}

.health-check-summary h4 {
    margin: 0;
    font-size: 1rem;
}

.health-check-summary.success h4 {
    color: var(--success);
}

.health-check-summary.error h4 {
    color: var(--error);
}

.health-check-roles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.health-check-role {
    border-radius: 8px;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
}

.health-check-role.success {
    border-left: 4px solid var(--success);
    background: rgba(0, 168, 107, 0.04);
}

.health-check-role.error {
    border-left: 4px solid var(--error);
    background: rgba(209, 50, 18, 0.04);
}

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

.health-icon {
    font-size: 1.1rem;
    font-weight: 700;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.health-check-role.success .health-icon {
    color: var(--success);
}

.health-check-role.error .health-icon {
    color: var(--error);
}

.health-check-header strong {
    font-size: 0.95rem;
    text-transform: capitalize;
}

.health-role-level {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.health-check-details {
    padding-left: 30px;
}

.health-msg {
    margin: 0 0 6px 0;
    font-size: 0.88rem;
    line-height: 1.4;
}

.health-msg-ok {
    color: var(--success);
}

.health-msg-err {
    color: var(--error);
    font-weight: 500;
}

.health-detail-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 0.82rem;
}

.health-detail-label {
    color: var(--text-secondary);
    flex-shrink: 0;
    min-width: 90px;
}

.health-detail-value {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    word-break: break-all;
}

.health-role-arn {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.health-role-arn code {
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.04);
    padding: 2px 6px;
    border-radius: 3px;
    word-break: break-all;
}

.health-raw-error {
    margin-top: 8px;
}

.health-raw-error summary {
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.health-raw-error summary:hover {
    color: var(--text-primary);
}

.health-raw-error pre {
    margin: 6px 0 0 0;
    padding: 10px 12px;
    background: var(--aws-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.75rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 120px;
    overflow-y: auto;
    color: var(--text-secondary);
}

/* ==========================================================================
   Admin Modules Consolidated View
   ========================================================================== */

.consolidated-modules-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.consolidated-module-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    padding: 16px;
    transition: border-color 0.2s;
}

.consolidated-module-card:hover {
    border-color: var(--aws-orange);
}

.consolidated-module-card.disabled {
    opacity: 0.7;
    background: #fafafa;
}

.consolidated-module-details {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.consolidated-section {
    padding: 12px;
    background: var(--aws-light);
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.consolidated-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0 0 8px 0;
}

.consolidated-tabs-list,
.consolidated-tools-list,
.consolidated-templates-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.consolidated-tab-item,
.consolidated-template-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    font-size: 0.875rem;
}

.consolidated-tab-item:hover,
.consolidated-template-item:hover {
    border-color: var(--aws-orange);
}

.consolidated-module-toggle,
.consolidated-tab-toggle,
.consolidated-mcp-toggle {
    cursor: pointer;
}
