:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    min-height: 100vh;
    max-width: 1600px;
    margin: 0 auto;
}

/* Header */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.brand h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: 50px;
    font-size: 0.875rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: blink 2s ease-in-out infinite;
}

.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.status-dot.offline {
    background: var(--text-muted);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Dashboard */
.dashboard {
    padding: 2rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    grid-auto-rows: min-content;
}

.stats-grid {
    grid-column: 1 / -1;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px var(--shadow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--bg-tertiary);
}

.stat-icon.devices {
    filter: hue-rotate(200deg);
}

.stat-icon.activity {
    filter: hue-rotate(100deg);
}

.stat-icon.success {
    filter: hue-rotate(50deg);
}

.stat-icon.uptime {
    filter: hue-rotate(300deg);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Panels */
.panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.panel:hover {
    border-color: var(--primary);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.panel-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

.refresh-btn,
.clear-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.logout-btn {
    background-color: var(--error-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #dc2626;
}

.btn-history {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    transition: background-color 0.2s;
}

.btn-history:hover {
    background-color: var(--primary-hover);
}

.refresh-btn:hover,
.clear-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* Devices List */
/* Devices Grid */
.devices-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.device-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.device-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px -10px rgba(0, 0, 0, 0.5);
}

.device-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--border);
    transition: background 0.3s ease;
}

.device-card.active::before {
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

.device-card.offline::before {
    background: var(--text-muted);
}

/* Card Header */
.device-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.device-ip-badge {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.device-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.device-status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.device-status-badge.offline {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
    box-shadow: 0 0 8px currentColor;
    animation: pulse-dot 2s infinite;
}

.device-status-badge.offline .status-dot {
    animation: none;
    box-shadow: none;
}

/* Card Body (Input) */
.device-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.input-group {
    display: flex;
    gap: 0.75rem;
}

.device-name-input {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.625rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.device-name-input:focus {
    border-color: var(--primary);
    outline: none;
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-save-mini {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 42px;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.btn-save-mini:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Card Footer */
.device-footer {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.connection-time {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

@keyframes pulse-dot {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.8);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Command Form */
.command-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group select,
.form-group textarea {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    font-family: 'Courier New', monospace;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

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

/* Activity Log */
.log-container {
    max-height: 500px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.log-container::-webkit-scrollbar {
    width: 8px;
}

.log-container::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.log-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.log-entry {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--primary);
    padding: 1rem;
    border-radius: 0.5rem;
    animation: slideIn 0.3s ease;
}

.log-entry.connection {
    border-left-color: var(--success);
}

.log-entry.error {
    border-left-color: var(--danger);
}

.log-entry.packet-in {
    border-left-color: var(--primary);
}

.log-entry.packet-out {
    border-left-color: var(--warning);
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.log-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-primary);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.log-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.log-message {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.log-details {
    background: var(--bg-primary);
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    overflow-x: auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.empty-state small {
    font-size: 0.875rem;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px var(--shadow);
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .header-content {
        padding: 1rem;
    }

    .brand h1 {
        font-size: 1.25rem;
    }
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 2rem;
}

.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 3rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 50px var(--shadow);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .brand-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-form input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
}

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

.error-message {
    color: var(--danger);
    font-size: 0.875rem;
    text-align: center;
    min-height: 1.25rem;
}

/* User Info and Logout */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-right: 1rem;
    padding-right: 1rem;
    border-right: 1px solid var(--border);
}

.user-info span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.logout-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* API Panel */
.api-panel {
    grid-column: span 2;
}

.api-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.api-tab {
    flex: 1;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.api-tab:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.api-tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.api-content {
    display: none;
}

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

.api-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-group input[type="number"],
.form-group input[type="text"] {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

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

/* Responsive adjustments */
@media (max-width: 1200px) {
    .api-panel {
        grid-column: span 1;
    }
}

/* Password Input with Toggle */
.password-input-wrapper {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    /* Ensure same height */
}

.password-input-wrapper input {
    flex: 1;
    /* No special padding needed since button is outside */
}

.toggle-password {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 3rem;
    /* Fixed width for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.toggle-password:hover {
    background: var(--bg-secondary);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.toggle-password:active {
    transform: translateY(0);
}

/* Raw JSON API Tester */
.api-raw-panel {
    grid-column: span 2;
}

.api-raw-panel-full {
    grid-column: 1 / -1;
    /* Full width */
}

.api-helpers {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    align-items: flex-end;
}

.helper-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.helper-group label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.helper-group select {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.helper-info {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 0.5rem;
}

.helper-info small {
    color: var(--primary);
    font-size: 0.875rem;
}

.btn-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.api-raw-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.api-raw-form textarea {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 300px;
}

.api-raw-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.api-response {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.response-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.response-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-secondary);
}

.api-response pre {
    background: var(--bg-primary);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--success);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Improved form group spacing */
.form-group input[type="text"],
.form-group input[type="password"] {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    width: 100%;
    transition: all 0.2s ease;
}

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

.form-group select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.875rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Responsive adjustments for raw API panel */
@media (max-width: 1200px) {
    .api-raw-panel {
        grid-column: span 1;
    }
}

/* API Tester Split Layout */
.api-tester-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .api-tester-container {
        grid-template-columns: 1fr;
    }
}

.request-editor {
    flex: 1;
}

.api-response {
    margin-top: 0;
    height: 100%;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    /* Match form height roughly */
}

.response-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    padding: 2rem;
    text-align: center;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.response-content {
    display: flex;
    flex-direction: column;
}

/* Data Table Styles */
.table-container {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

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

.data-table th {
    background-color: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 600;
}

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

.data-table .status-success {
    color: #4ade80;
}

.data-table .status-error {
    color: #f87171;
}

.data-table .status-pending {
    color: #fbbf24;
}

.btn-details {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
}

.btn-details:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}



.api-response pre {
    flex: 1;
    max-height: 500px;
    overflow-y: auto;
    margin-top: 0;
}

/* Cancel Button */
.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--danger);
    color: var(--danger);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-large {
    flex: 1;
}

/* Helpers */
.api-helpers {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    border: 1px solid var(--border);
}

.helper-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.helper-info {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}