/* ===== CONTROL ROOM DASHBOARD STYLES ===== */

.control-room-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.control-room-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    padding: 20px 0 10px 0;
}

.header-glyph {
    height: 60px;
    width: 60px;
    margin-left: -6px;
    flex-shrink: 0;
}

.header-title {
    margin: 0;
    margin-top: -6px;
    margin-left: -10px;
    font-size: 24px;
    font-weight: 400;
    color: var(--body-fg, #333);
}

.header-subtitle {
    margin-bottom: 30px;
}

.header-subtitle p {
    margin: 0;
    color: var(--body-quiet-color, #666);
    font-size: 14px;
}

.panels-section {
    margin-bottom: 60px;
}

.panels-section h2 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--body-quiet-color, #666);
    margin: 0 0 20px 0;
    text-transform: uppercase;
}

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

.panel-card {
    /* background: var(--darkened-bg, #f9f9f9); */
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    padding: 24px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-height: 160px;
}

.panel-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

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

.panel-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--darkened-bg, #f5f5f5);
    color: var(--link-fg, #417690);
}

.panel-status {
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

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

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

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

.panel-status-not-installed {
    background: #e8f4f8;
    color: #417690;
}

.panel-status-coming-soon {
    background: #fff3cd;
    color: #856404;
}

.panel-status-configuring {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(230, 126, 34, 0.12);
    color: #e67e22;
}

.panel-config-steps {
    display: flex;
    align-items: center;
    gap: 3px;
}

.panel-config-step {
    height: 5px;
    width: 14px;
    border-radius: 2px;
    background: rgba(230, 126, 34, 0.25);
    transition: background 0.2s ease;
}

.panel-config-step.done {
    background: #e67e22;
}

@media (prefers-color-scheme: dark) {
    .panel-status-configuring {
        background: rgba(240, 160, 80, 0.15);
        color: #f0a050;
    }
    .panel-config-step {
        background: rgba(240, 160, 80, 0.2);
    }
    .panel-config-step.done {
        background: #f0a050;
    }
}

html[data-theme="dark"] .panel-status-configuring {
    background: rgba(240, 160, 80, 0.15);
    color: #f0a050;
}

html[data-theme="dark"] .panel-config-step {
    background: rgba(240, 160, 80, 0.2);
}

html[data-theme="dark"] .panel-config-step.done {
    background: #f0a050;
}

.panel-not-installed {
    /* Not-installed panels use same styling as installed */
}

.panel-coming-soon {
    opacity: 0.55;
    cursor: default;
}

.panel-coming-soon:hover {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transform: none;
}

.panel-coming-soon .panel-icon {
    color: var(--body-quiet-color, #999);
}

.panel-link-coming-soon {
    font-size: 14px;
    font-weight: 500;
    color: var(--body-quiet-color, #999);
    cursor: default;
    font-style: italic;
}

.panel-link-install {
    color: var(--link-fg, #417690);
    font-weight: 600;
}

.panel-link-configure {
    color: #e67e22;
    font-weight: 600;
}

@media (prefers-color-scheme: dark) {
    .panel-link-configure {
        color: #f0a050;
    }
}

html[data-theme="dark"] .panel-link-configure {
    color: #f0a050;
}

.panel-card-body h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--body-fg, #333);
}

.panel-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.panel-card-body p {
    margin: 0 0 16px 0;
    color: var(--body-quiet-color, #666);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
}

.panel-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--link-fg, #417690);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.panel-link:hover {
    color: var(--link-hover-color, #2e5266);
}

.panel-link .arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.panel-link:hover .arrow {
    transform: translateX(4px);
}

.more-panels-section {
    margin-bottom: 40px;
}

.more-panels-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.more-panels-half {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.more-panels-half+.more-panels-half {
    border-left: 1px solid var(--border-color, #e0e0e0);
}

.more-panels-half h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: var(--body-fg, #333);
}

.more-panels-half p {
    margin: 0;
    color: var(--body-quiet-color, #666);
    font-size: 14px;
    flex: 1;
}

.more-panels-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.panel-icon-more-coming {
    background: rgba(76, 175, 80, 0.12);
    color: #4caf50;
}

.panel-icon-build-own {
    background: rgba(76, 175, 80, 0.12);
    color: #4caf50;
}

.panel-link-code {
    font-family: var(--font-family-monospace, monospace);
    font-size: 13px;
    background: var(--darkened-bg, #f5f5f5);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color, #e0e0e0);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ===== INSTALL PANEL PAGE STYLES (Simple) ===== */

.install-simple-container {
    max-width: 700px;
    margin: 60px auto;
    text-align: center;
}

.install-simple-header {
    margin-bottom: 50px;
}

.install-simple-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--darkened-bg, #f5f5f5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--link-fg, #417690);
}

.install-simple-header h1 {
    margin: 0 0 15px 0;
    font-size: 32px;
    font-weight: 400;
    color: var(--body-fg, #333);
}

.install-simple-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--body-quiet-color, #666);
    margin: 0 auto;
    max-width: 500px;
}

/* Quick Features */
.install-simple-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.install-simple-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
}

.install-simple-feature-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--darkened-bg, #f5f5f5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--link-fg, #417690);
}

.install-simple-feature-text {
    font-size: 13px;
    line-height: 1.4;
    color: var(--body-fg, #333);
}

.install-simple-feature-text strong {
    font-weight: 500;
}

/* Installation Steps */
.install-simple-steps {
    text-align: left;
    margin-bottom: 40px;
}

.install-simple-step-card {
    background: var(--body-bg, white);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.2s ease;
}

.install-simple-step-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.install-simple-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.install-simple-step-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--link-fg, #417690);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.install-status-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 12px;
}

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

.install-status-not-installed {
    background: #e8f4f8;
    color: #417690;
}

.install-status-configuring {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(230, 126, 34, 0.12);
    color: #e67e22;
}

.install-simple-step-number.step-done {
    background: #4caf50;
}

.step-card-done {
    opacity: 0.5;
}

.step-card-done:hover {
    box-shadow: none;
}

.install-panel-open-btn {
    display: inline-block;
    margin-top: 16px;
}

.install-simple-step-content {
    flex: 1;
}

.install-simple-step-content h3 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--body-fg, #333);
}

.install-simple-step-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--body-quiet-color, #666);
}

.install-simple-code {
    position: relative;
    background: var(--darkened-bg, #f5f5f5);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    padding: 15px 50px 15px 15px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    margin-bottom: 8px;
}

.install-simple-code code {
    color: var(--body-fg, #333);
    line-height: 1.6;
}

.install-simple-copy {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--body-quiet-color, #999);
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.install-simple-copy:hover {
    background: var(--body-bg, white);
    color: var(--link-fg, #417690);
}

.install-simple-copy.copied {
    background: var(--darkened-bg, #f5f5f5);
    color: var(--body-quiet-color, #999);
}

.install-simple-copy.copied:hover {
    background: var(--darkened-bg, #f5f5f5);
    color: var(--body-quiet-color, #999);
}

/* Documentation Link */
.install-simple-docs {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.install-simple-docs a {
    color: var(--link-fg, #417690);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.install-simple-docs a:hover {
    color: var(--link-hover-color, #2e5266);
    text-decoration: underline;
}

/* ===== OLD INSTALL PANEL PAGE STYLES ===== */

.install-panel-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--darkened-bg, #f9f9f9);
    border-radius: 8px;
}

.install-panel-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--body-bg, white);
    border-radius: 12px;
    color: var(--link-fg, #417690);
}

.install-panel-info h1 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 400;
    color: var(--body-fg, #333);
}

.install-panel-description {
    margin: 0;
    font-size: 16px;
    color: var(--body-quiet-color, #666);
}

.install-panel-content {
    max-width: 800px;
}

.install-section {
    margin-bottom: 40px;
}

.install-section h2 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 500;
    color: var(--body-fg, #333);
}

.install-section p {
    margin: 0 0 10px 0;
    line-height: 1.6;
    color: var(--body-fg, #333);
}

.code-block {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: var(--darkened-bg, #f5f5f5);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 14px;
    margin: 15px 0;
}

.code-block code {
    flex: 1;
    color: var(--body-fg, #333);
}

.copy-button {
    padding: 6px 12px;
    background: var(--link-fg, #417690);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s ease;
}

.copy-button:hover {
    background: var(--link-hover-color, #2e5266);
}

.install-note {
    font-style: italic;
    color: var(--body-quiet-color, #666) !important;
    font-size: 14px !important;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.feature-list li {
    padding: 10px 0 10px 30px;
    position: relative;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
    color: var(--body-fg, #333);
}

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

.feature-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--link-fg, #417690);
    font-weight: bold;
}

.install-actions {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, #e0e0e0);
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--link-fg, #417690);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.button:hover {
    background: var(--link-hover-color, #2e5266);
    color: white;
}

.button-secondary {
    background: var(--body-bg, white);
    color: var(--link-fg, #417690);
    border: 1px solid var(--border-color, #e0e0e0);
}

.button-secondary:hover {
    background: var(--darkened-bg, #f5f5f5);
    color: var(--link-fg, #417690);
}

.install-panel-message {
    text-align: center;
    padding: 60px 20px;
}

.install-panel-message h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #30a030;
}

.install-panel-message p {
    margin: 15px 0;
    font-size: 16px;
}

/* Dark mode support for install page */
@media (prefers-color-scheme: dark) {
    .install-simple-icon {
        background: var(--darkened-bg, #2d2d2d);
        color: var(--link-fg, #79aec8);
    }

    .install-simple-feature-icon {
        background: var(--darkened-bg, #2d2d2d);
        color: var(--link-fg, #79aec8);
    }

    .install-simple-code {
        background: rgba(255, 255, 255, 0.05);
        border-color: var(--border-color, #444);
    }

    .install-simple-copy:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--link-fg, #79aec8);
    }

    .install-simple-copy.copied {
        background: rgba(255, 255, 255, 0.05);
        color: var(--body-quiet-color, #999);
    }

    .install-simple-copy.copied:hover {
        background: rgba(255, 255, 255, 0.05);
        color: var(--body-quiet-color, #999);
    }

    .install-simple-docs {
        border-top-color: var(--border-color, #444);
    }

    .install-status-installed {
        background: rgba(76, 175, 80, 0.2);
        color: #6fbf73;
    }

    .install-status-not-installed {
        background: rgba(121, 174, 200, 0.15);
        color: #79aec8;
    }

    .install-status-configuring {
        background: rgba(240, 160, 80, 0.15);
        color: #f0a050;
    }

    .step-card-done {
        border-color: rgba(76, 175, 80, 0.25);
    }

    .install-simple-step-card {
        background: var(--darkened-bg, #2d2d2d);
        border-color: var(--border-color, #444);
    }

    .install-simple-step-card:hover {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    .install-simple-step-number {
        background: var(--link-fg, #79aec8);
    }

    .install-panel-header {
        background: rgba(255, 255, 255, 0.03);
    }

    .install-panel-icon {
        background: var(--darkened-bg, #2d2d2d);
        color: var(--link-fg, #79aec8);
    }

    .code-block {
        background: rgba(255, 255, 255, 0.05);
        border-color: var(--border-color, #444);
    }

    .feature-list li {
        border-color: var(--border-color, #444);
    }

    .copy-button {
        background: var(--link-fg, #79aec8);
    }

    .copy-button:hover {
        background: #5b9bd5;
    }

    .button {
        background: var(--link-fg, #79aec8);
    }

    .button:hover {
        background: #5b9bd5;
    }

    .button-secondary {
        background: var(--darkened-bg, #2d2d2d);
        border-color: var(--border-color, #444);
        color: var(--link-fg, #79aec8);
    }

    .button-secondary:hover {
        background: rgba(255, 255, 255, 0.05);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .header-title {
        color: var(--body-fg, #f8f8f8);
    }

    .panel-card {
        /* background: var(--darkened-bg, #2d2d2d); */
        border-color: var(--border-color, #444);
    }

    .panel-icon {
        background: rgba(121, 174, 200, 0.1);
        color: var(--link-fg, #79aec8);
    }

    .panel-status-connected,
    .panel-status-healthy,
    .panel-status-installed {
        background: rgba(52, 168, 83, 0.2);
        color: #6fbf73;
    }

    .panel-status-not-installed {
        background: rgba(121, 174, 200, 0.15);
        color: #79aec8;
    }

    .panel-coming-soon {
        opacity: 0.45;
    }

    .panel-status-coming-soon {
        background: rgba(255, 193, 7, 0.15);
        color: #ffc107;
    }

    .more-panels-block {
        border-color: var(--border-color, #444);
    }

    .more-panels-half+.more-panels-half {
        border-left-color: var(--border-color, #444);
    }

    .panel-link-code {
        background: var(--darkened-bg, #2d2d2d);
        border-color: var(--border-color, #444);
    }
}

/* ===== KEY SEARCH PAGE STYLES ===== */

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

.key-search-page-header h1 {
    margin: 0;
    flex: 1;
}

.key-search-flush-form {
    margin: 0;
    flex-shrink: 0;
}

.flush-button {
    background-color: #ba2121 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.flush-button:hover:not(:disabled) {
    background-color: #a41e1e !important;
}

.flush-button:disabled {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

/* Dark mode support for flush button */
@media (prefers-color-scheme: dark) {
    .flush-button {
        background-color: #cc2936 !important;
    }

    .flush-button:hover:not(:disabled) {
        background-color: #b02329 !important;
    }

    .flush-button:disabled {
        background-color: #555 !important;
        color: #999 !important;
    }
}

/* Table styles */
#result_list {
    width: 100%;
}

/* Icon styles */
.icon-yes img,
.icon-no img {
    width: 13px;
    height: 13px;
    margin-right: 4px;
    vertical-align: text-bottom;
}

.icon-yes {
    color: #30a030;
}

.icon-no {
    color: #ba2121;
}

/* Message list styles */
.messagelist {
    margin: 0 0 20px 0;
}

.messagelist .success,
.messagelist .error {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid;
}

.messagelist .success {
    background-color: var(--message-success-bg, #d4edda);
    color: var(--body-fg, #155724);
    border-color: var(--message-success-border, #c3e6cb);
}

.messagelist .error {
    background-color: var(--message-error-bg, #f8d7da);
    color: var(--message-error-fg, #721c24);
    border-color: var(--message-error-border, #f5c6cb);
}

.messagelist .warning {
    background-color: var(--message-warning-bg, #fff3cd);
    color: var(--message-warning-fg, #856404);
    border-color: var(--message-warning-border, #ffeeba);
}

/* ===== INSTANCE OVERVIEW STYLES ===== */

.instance-stats {
    padding-top: 15px;
    padding-bottom: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    margin-top: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid var(--border-color, #ddd);
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--link-fg, #417690);
}

.stat-value.stat-success {
    color: #30a030;
}

.stat-value.stat-warning {
    color: #e47911;
}

.stat-value.stat-disabled {
    color: #999;
}

.default-badge {
    background: var(--link-fg, #417690);
    color: var(--body-bg, white);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: 5px;
}

.ttl-value {
    font-weight: bold;
    color: var(--link-fg, #417690);
}

/* ===== KEY SEARCH STYLES ===== */

.search-form {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color, #ddd);
}

.search-form .form-row {
    margin: 0;
}

.search-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.search-form .help {
    font-size: 11px;
    margin-top: 3px;
    opacity: 0.7;
}

/* Key type badges - used in both search and detail views */
.key-type {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
}

.key-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    color: white;
}

/* Key type colors - consistent across templates */
.key-type-string {
    background-color: #28a745;
}

.key-type-list {
    background-color: #007bff;
}

.key-type-set {
    background-color: #ffc107;
}

.key-type-zset {
    background-color: #17a2b8;
}

.key-type-hash {
    background-color: #6f42c1;
}

.key-type-stream {
    background-color: #059669;
}

/* Alternative key type colors used in search view */
.key-search .key-type-string {
    background: #417690;
}

.key-search .key-type-list {
    background: #30a030;
}

.key-search .key-type-set {
    background: #e47911;
}

.key-search .key-type-zset {
    background: #7b68ee;
}

.key-search .key-type-hash {
    background: #dc2626;
}

/* ===== KEY DETAIL STYLES ===== */

.key-value-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

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

.key-value-table th {
    font-weight: bold;
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
}

.key-value-table tbody tr:nth-child(even) {
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.02));
}

.key-value-table code {
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
}

.string-value-field {
    width: 100%;
}

.readonly {
    padding: 8px 0;
}

.readonly code {
    padding: 4px 8px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
}

.danger-zone {
    border: 2px solid #dc3545;
    border-radius: 4px;
    background-color: var(--error-bg, rgba(220, 53, 69, 0.1));
}

.danger-zone h2 {
    color: #dc3545;
}

.field-box {
    margin-bottom: 15px;
}

.submit-row {
    margin-top: 10px;
}

.key-value-display h3 {
    margin: 0 0 15px 0;
    opacity: 0.8;
}

/* Key Detail Page Styles */
.key-detail-delete-form {
    margin: 0;
}

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

.key-detail-header h1 {
    margin: 0;
}

/* Delete button styling to match Django admin */
.delete-button {
    background-color: #ba2121 !important;
    color: white !important;
    border-color: #ba2121 !important;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.delete-button:hover,
.delete-button:focus {
    background-color: #a41e1e !important;
    border-color: #a41e1e !important;
    color: white !important;
}

/* Disabled delete button styling */
.delete-button:disabled {
    background-color: #ba2121 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border-color: #ba2121 !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.delete-button:disabled:hover,
.delete-button:disabled:focus {
    background-color: #ba2121 !important;
    border-color: #ba2121 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 0.6 !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .delete-button {
        background-color: #cc2936 !important;
        border-color: #cc2936 !important;
    }

    .delete-button:hover,
    .delete-button:focus {
        background-color: #b02329 !important;
        border-color: #b02329 !important;
    }

    .delete-button:disabled {
        background-color: #cc2936 !important;
        border-color: #cc2936 !important;
        color: rgba(255, 255, 255, 0.6) !important;
        opacity: 0.6 !important;
    }

    .delete-button:disabled:hover,
    .delete-button:disabled:focus {
        background-color: #cc2936 !important;
        border-color: #cc2936 !important;
        color: rgba(255, 255, 255, 0.6) !important;
        opacity: 0.6 !important;
    }
}

/* Pagination Mode Indicator Styles */
.pagination-mode-indicator {
    margin-bottom: 10px;
}

.pagination-mode-indicator .badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pagination-mode-indicator .badge.cursor-mode {
    background-color: #2196F3;
    color: white;
}

.pagination-mode-indicator .badge.page-mode {
    background-color: #4CAF50;
    color: white;
}

/* Dark mode support for badges */
@media (prefers-color-scheme: dark) {
    .pagination-mode-indicator .badge.cursor-mode {
        background-color: #1976D2;
    }

    .pagination-mode-indicator .badge.page-mode {
        background-color: #388E3C;
    }

    /* Inline edit styles for dark mode */
    .inline-edit-input {
        border-color: #555;
        background-color: var(--darkened-bg, #2d2d2d);
        color: var(--body-fg, #fff);
    }

    .inline-edit-input:focus {
        border-color: #79aec8;
    }
}

/* Search Form Alignment Styles */
.search-form-row {
    margin-bottom: 15px;
}

.search-form-fields {
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 5px;
}

.search-field-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.search-field-group label {
    font-weight: bold;
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 3px;
    white-space: nowrap;
}

.search-field-group input[type="text"],
.search-field-group select {
    height: 32px;
    box-sizing: border-box;
}

.search-field-group select {
    min-width: 80px;
    padding: 6px 8px;
}

.search-field-group input[type="submit"] {
    height: 32px;
    padding: 6px 15px;
    box-sizing: border-box;
}

.search-help {
    margin-left: 0;
    margin-top: 5px;
}

.search-help .help {
    margin: 0;
    color: #666;
    font-size: 11px;
    font-style: italic;
}

/* ===== INDEX PAGE ABILITIES STYLES ===== */

/* Ability indicators (checkmarks and dashes) */
.ability-indicator {
    font-size: 1.2em;
    display: inline-block;
}

.ability-supported {
    color: var(--link-fg, #417690);
}

.ability-unsupported {
    color: var(--border-color, #ccc);
}

/* Backend name display */
.backend-name {
    font-size: 0.9em;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.backend-error {
    color: #ba2121;
    font-size: 0.85em;
}

/* Abilities legend section */
.abilities-legend {
    margin-top: 20px;
    padding: 10px;
    background: var(--darkened-bg, #f8f8f8);
    border-left: 3px solid var(--link-fg, #417690);
    border-radius: 4px;
}

.abilities-legend-title {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: var(--body-fg, #333);
}

.abilities-legend-list {
    margin: 0;
    padding-left: 20px;
    list-style: none;
    color: var(--body-fg, #333);
}

.abilities-legend-list li {
    margin-bottom: 5px;
}

.abilities-legend-list strong {
    color: var(--body-fg, #333);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ability-supported {
        color: var(--link-fg, #79aec8);
    }

    .ability-unsupported {
        color: var(--border-color, #555);
    }

    .abilities-legend {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        border-left-color: var(--link-fg, #79aec8);
    }

    .backend-error {
        color: #cc2936;
    }
}

/* ===== COLLECTION MEMBER DELETE STYLES ===== */

.delete-member-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 3px;
    color: #dc3545;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.delete-member-btn:hover:not(:disabled) {
    background-color: #dc3545;
    color: white;
    transform: scale(1.1);
}

.delete-member-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.delete-member-btn:disabled:hover {
    background: none;
    transform: none;
}

/* ===== INLINE EDIT STYLES ===== */

.inline-edit-input {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 4px 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background-color: var(--body-bg, #fff);
    color: var(--body-fg, #333);
    min-width: 100px;
}

.inline-edit-input:focus {
    outline: none;
    border-color: #79aec8;
    box-shadow: 0 0 0 2px rgba(121, 174, 200, 0.2);
}

.inline-edit-btn {
    background: #79aec8;
    border: none;
    border-radius: 3px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
}

.inline-edit-btn:hover:not(:disabled) {
    background-color: #5b9bd5;
    transform: scale(1.05);
}

.inline-edit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.inline-edit-btn:disabled:hover {
    background-color: #ccc;
    transform: none;
}
