:root {
    --color-primary: #667eea;
    --color-secondary: #764ba2;
    --color-accent: #9f7aea;
    --color-success: #48bb78;
    --color-danger: #f56565;
    --color-warning: #ed8936;
    --color-info: #4299e1;
    --color-text-dark: #2d3748;
    --color-text-light: #718096;
    --color-bg-light: #f7fafc;
    --color-border: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

* {
    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(--color-primary) 0%, var(--color-secondary) 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    transition: background var(--transition-slow);
}

.container {
    width: 100%;
    max-width: 1000px;
    height: 92vh;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.5s var(--transition-base);
}

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

/* ============================================
   TOP NAVIGATION BAR (TypeDB-Style)
   ============================================ */
.topnav {
    display: flex;
    align-items: center;
    background: #1a1a2e;
    color: #fff;
    padding: 0 20px;
    height: 52px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: relative;
    z-index: 100;
    flex-shrink: 0;
}

.topnav-brand {
    cursor: pointer;
    margin-right: 24px;
    flex-shrink: 0;
}

.topnav-logo {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #00d4aa;
}

.topnav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow: visible;
}

.topnav-link {
    background: none;
    border: none;
    color: #ccc;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
    border-radius: 6px;
    transition: all 150ms ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
}

.topnav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.dd-arrow {
    font-size: 10px;
    opacity: 0.6;
}

/* Dropdowns */
.topnav-dropdown {
    position: relative;
}

.topnav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    min-width: 200px;
    padding: 6px 0;
    z-index: 200;
    margin-top: 4px;
}

.topnav-dropdown-menu.open {
    display: block;
    animation: ddFadeIn 150ms ease;
}

.topnav-dropdown-right {
    left: auto;
    right: 0;
}

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

.topnav-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: background 100ms;
}

.topnav-dropdown-menu a:hover {
    background: #f0f4ff;
    color: var(--color-primary);
}

.dd-user-header {
    padding: 12px 16px 8px;
}

.dd-divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

/* Right section */
.topnav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-shrink: 0;
}

.topnav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 150ms;
    position: relative;
}

.topnav-user:hover {
    background: rgba(255,255,255,0.1);
}

.topnav-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.topnav-user-name {
    font-size: 13px;
    color: #ccc;
    font-weight: 500;
}

.routing-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #888;
    padding: 4px 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
}

/* Mobile hamburger */
.topnav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.topnav-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #ccc;
    border-radius: 2px;
    transition: all 200ms;
}

/* Mobile Navigation Panel */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 300;
}

.mobile-nav-overlay.open {
    display: block;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: #1a1a2e;
    z-index: 301;
    transition: right 250ms ease;
    overflow-y: auto;
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-close {
    background: none;
    border: none;
    color: #999;
    font-size: 28px;
    cursor: pointer;
    padding: 0 4px;
}

.mobile-nav-items {
    padding: 8px 0;
}

.mobile-nav-group {
    padding: 16px 20px 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #00d4aa;
    font-weight: 700;
}

.mobile-nav-items a {
    display: block;
    padding: 10px 20px 10px 28px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 100ms;
}

.mobile-nav-items a:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.mobile-nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 8px 20px;
}

/* Responsive: hide desktop links, show hamburger on mobile */
@media (max-width: 768px) {
    .topnav-links { display: none; }
    .topnav-user-name { display: none; }
    .topnav-mobile-toggle { display: flex; }
    .topnav { padding: 0 12px; }
}

/* Legacy header (kept for backward compat) */
header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    padding: 32px 30px;
    text-align: center;
    position: relative;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

header::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: inherit;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

header p {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 400;
}

/* Menu Toggle Button */
.menu-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.05);
}

.hamburger-icon {
    font-size: 28px;
    line-height: 1;
}

/* Sidebar Menu */
.sidebar-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 1002;
    transition: right var(--transition-base);
    overflow-y: auto;
}

.sidebar-menu.active {
    right: 0;
}

.menu-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-header h3 {
    font-size: 24px;
    font-weight: 600;
}

.menu-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 28px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Menu User Info */
.menu-user-info {
    padding: 24px;
    border-bottom: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(to bottom, var(--color-bg-light), white);
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 4px;
}

.user-role {
    font-size: 14px;
    color: var(--color-text-light);
}

/* Menu Navigation */
.menu-nav {
    padding: 16px 0;
}

.menu-item {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    color: var(--color-text-dark);
    text-align: left;
}

.menu-item:hover {
    background: var(--color-bg-light);
}

.menu-item:active {
    transform: scale(0.98);
}

.menu-icon {
    font-size: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-text {
    font-size: 16px;
    font-weight: 500;
    flex: 1;
}

.admin-badge {
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: #fff;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.menu-divider {
    height: 1px;
    background: var(--color-border);
    margin: 16px 24px;
}

.menu-auth {
    margin-top: 8px;
    color: var(--color-primary);
    font-weight: 600;
}

.menu-auth .menu-icon {
    color: var(--color-primary);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hide admin items by default */
.admin-only {
    display: none;
}

/* Messages Container */
.messages-container {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: var(--color-bg-light);
    background-image:
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(118, 75, 162, 0.03) 0%, transparent 50%);
}

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

.messages-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 10px;
}

.messages-container::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 10px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* Message Styles */
.message {
    margin-bottom: 20px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    max-width: 80%;
    animation: messageSlideIn 0.3s var(--transition-base);
    box-shadow: var(--shadow-sm);
    position: relative;
}

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

.message.user {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message.assistant {
    background: white;
    color: var(--color-text-dark);
    border: 1px solid var(--color-border);
    border-bottom-left-radius: 4px;
}

.message.system {
    background: linear-gradient(135deg, #fef5e7 0%, #fdebd0 100%);
    color: #856404;
    font-size: 14px;
    text-align: center;
    margin: 15px auto;
    max-width: 90%;
    border-left: 4px solid var(--color-warning);
}

.message.error {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    color: #c53030;
    border-left: 4px solid var(--color-danger);
}

.message-content {
    line-height: 1.6;
    margin-bottom: 8px;
}

.message-content code {
    background: rgba(0,0,0,0.08);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    border: 1px solid rgba(0,0,0,0.1);
}

.message-content pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 12px 0;
}

.message-content pre code {
    background: none;
    border: none;
    color: inherit;
    padding: 0;
}

.message-timestamp {
    font-size: 11px;
    opacity: 0.6;
    margin-top: 6px;
    font-weight: 500;
}

/* Input Container */
.input-container {
    padding: 24px 30px;
    background: white;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

.input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

textarea {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 15px;
    resize: none;
    font-family: inherit;
    min-height: 56px;
    transition: all var(--transition-fast);
    line-height: 1.5;
}

textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea::placeholder {
    color: var(--color-text-light);
}

.options-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

select {
    padding: 10px 14px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-weight: 500;
    color: var(--color-text-dark);
}

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

select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
    user-select: none;
    font-weight: 500;
    color: var(--color-text-dark);
}

.checkbox-label:hover {
    background: rgba(102, 126, 234, 0.05);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-primary);
}

/* Button Styles */
button {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.clear-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.domain-btn {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

.primary-btn {
    background: linear-gradient(135deg, var(--color-success) 0%, #38a169 100%);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: modalFadeIn 0.3s var(--transition-base);
}

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

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

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

.modal-header {
    padding: 24px 30px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.close {
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    color: white;
    line-height: 1;
    transition: all var(--transition-fast);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 10px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    background: var(--color-bg-light);
}

/* Settings Section */
.settings-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--color-border);
}

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

.settings-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--color-text-dark);
    font-weight: 700;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-dark);
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-fast);
    color: var(--color-text-dark);
}

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

.form-group input[type="text"]:read-only {
    background: var(--color-bg-light);
    color: var(--color-text-light);
    cursor: not-allowed;
}

.form-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--color-border);
    outline: none;
    -webkit-appearance: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.form-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border: none;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--color-text-light);
    font-size: 13px;
}

.form-group code {
    background: var(--color-bg-light);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: var(--color-danger);
}

/* Server Status */
.server-item {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 12px;
    transition: all var(--transition-fast);
}

.server-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.server-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.server-status strong {
    font-size: 15px;
    color: var(--color-text-dark);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(255,255,255,1);
}

.status-connected {
    background: var(--color-success);
    box-shadow: 0 0 0 2px rgba(72, 187, 120, 0.2);
    animation: pulse 2s infinite;
}

.status-disconnected {
    background: var(--color-danger);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.server-url {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: var(--color-text-light);
    margin-bottom: 12px;
    word-break: break-all;
    background: white;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

.server-features {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.feature-badge {
    background: linear-gradient(135deg, #e7f3ff 0%, #d4e9ff 100%);
    color: #0056b3;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(0, 86, 179, 0.2);
}

/* Tabs */
.tab-btn {
    padding: 12px 24px;
    border: none;
    background: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    color: var(--color-text-light);
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-fast);
    position: relative;
}

.tab-btn:hover {
    color: var(--color-primary);
    background: rgba(102, 126, 234, 0.05);
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Billing Cards */
.billing-card {
    background: white;
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--color-primary);
    transition: all var(--transition-fast);
}

.billing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.billing-card h4 {
    margin: 0 0 12px 0;
    color: var(--color-text-light);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.billing-card .value {
    font-size: 36px;
    font-weight: 800;
    color: var(--color-primary);
    margin: 12px 0;
    line-height: 1;
}

.billing-card .sub-value {
    font-size: 14px;
    color: var(--color-text-light);
    font-weight: 500;
}

/* Tool Item */
.tool-item {
    background: white;
    padding: 14px;
    margin-bottom: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.tool-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.tool-item h4 {
    margin: 0 0 6px 0;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 600;
}

.tool-item p {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-light);
    line-height: 1.5;
}

.loading {
    text-align: center;
    color: var(--color-text-light);
    font-style: italic;
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }

    header {
        padding: 24px 20px;
        border-radius: 0;
    }

    header h1 {
        font-size: 24px;
    }

    .message {
        max-width: 90%;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    /* Mobile menu adjustments */
    .sidebar-menu {
        width: 100%;
        right: -100%;
    }

    .menu-toggle {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }

    .hamburger-icon {
        font-size: 24px;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Swiss Transcription Styles */
.status-indicator {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-base);
}

.status-ready {
    background: #e7f3ff;
    color: #0066cc;
}

.status-recording {
    background: #ffe7e7;
    color: #dc3545;
    animation: pulse 2s infinite;
}

.status-processing {
    background: #fff3cd;
    color: #856404;
}

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

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

.record-button {
    transition: all var(--transition-base);
}

.record-button:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.record-button.recording {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    animation: pulse 2s infinite;
}

.visualizer-bar {
    transition: height 0.1s ease;
}

.btn {
    font-family: inherit;
    transition: all var(--transition-fast);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.btn-secondary {
    background: var(--color-text-light);
}

.btn-secondary:hover {
    background: var(--color-text-dark);
}

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

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

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

.btn-success:hover {
    background: #38a169;
}
