/* ===============================
   Ask Your HVAC Pro - Styles
   Clean, simple, professional
   =============================== */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    min-height: 100vh;
    color: #333;
}

/* ===============================
   Auth Page (Login/Signup)
   =============================== */

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

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

.auth-logo {
    display: block;
    margin: 0 auto 20px auto;
    width: 120px;
    height: 120px;
    border-radius: 20px;
}

.auth-box h1 {
    text-align: center;
    color: #1e3a5f;
    margin-bottom: 4px;
    font-size: 28px;
}

.auth-box h2 {
    text-align: center;
    color: #2d5a87;
    margin-bottom: 4px;
    font-size: 20px;
    font-weight: 500;
}

.auth-box .subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #444;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2d5a87;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-1px);
}

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

.btn-primary {
    background: linear-gradient(135deg, #2d5a87 0%, #1e3a5f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.toggle-text {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

.toggle-text a {
    color: #2d5a87;
    text-decoration: none;
    font-weight: 600;
}

.toggle-text a:hover {
    text-decoration: underline;
}

.error-message {
    background: #fee;
    color: #c00;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

/* User type selection on signup */
.user-type-group {
    display: none;
}

.user-type-group.show {
    display: block;
}

/* Math challenge on signup */
.math-challenge-group {
    display: none;
}

.math-challenge-group.show {
    display: block;
}

.math-challenge-group label {
    font-weight: 600;
    color: #1e3a5f;
}

.math-challenge-group input {
    width: 100px;
}

/* ===============================
   Chat Page
   =============================== */

.chat-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: #1e3a5f;
    color: white;
    display: flex;
    flex-direction: column;
}

/* Sidebar Brand/Logo */
.sidebar-brand {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    color: white;
    flex: 1;
}

/* Close sidebar button (mobile only) */
.close-sidebar-btn {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.close-sidebar-btn:hover {
    color: white;
}

/* User Info Section */
.sidebar-user {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-user-row {
    display: flex;
    align-items: center;
}

.user-type-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-transform: capitalize;
    margin-bottom: 8px;
}

.questions-left {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

/* New Chat Button */
.new-chat-btn {
    margin: 15px;
    padding: 12px;
    background: #3d7ab8;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.new-chat-btn:hover {
    background: #4a8fd4;
}

/* Conversations Section */
.conversations-section {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.section-header .section-label {
    padding: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
}

.select-mode-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.7);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.select-mode-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 10px 10px 10px;
}

.conversation-item {
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 4px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    color: rgba(255,255,255,0.9);
}

.conversation-item .conv-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-item .conv-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.conversation-item .conv-delete-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.4);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
}

.conversation-item:hover .conv-delete-btn {
    opacity: 1;
}

.conversation-item .conv-delete-btn:hover {
    color: #ff6b6b;
}

.delete-selected-btn {
    margin: 10px;
    padding: 10px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.delete-selected-btn:hover {
    background: #ff5252;
}

.conversation-item:hover {
    background: rgba(255,255,255,0.1);
}

.conversation-item.active {
    background: rgba(255,255,255,0.2);
    color: white;
    font-weight: 500;
}

.no-conversations {
    padding: 15px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    font-style: italic;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-btn {
    width: 100%;
    padding: 10px 15px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255,255,255,0.8);
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    transition: background 0.2s;
    margin-bottom: 4px;
}

.sidebar-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-btn.logout:hover {
    background: rgba(255,100,100,0.2);
    color: #fcc;
}

/* Main Chat Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.chat-header {
    padding: 15px 25px;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h3 {
    color: #1e3a5f;
    font-size: 16px;
}

.header-badge {
    font-size: 12px;
    background: #e8f0f8;
    padding: 6px 12px;
    border-radius: 20px;
    color: #2d5a87;
    text-transform: capitalize;
}

.chat-messages-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.chat-messages {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 20px;
    background: #fafbfc;
}

.message {
    max-width: 70%;
    margin-bottom: 15px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
}

.message.user {
    background: #2d5a87;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message.assistant {
    background: white;
    color: #333;
    margin-right: auto;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.message.loading {
    background: white;
    color: #666;
    font-style: italic;
}

.message.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Chat Input */
.chat-input-area {
    padding: 20px;
    background: white;
    border-top: 1px solid #e0e0e0;
}

.chat-input-container {
    display: flex;
    gap: 10px;
    max-width: 900px;
    margin: 0 auto;
}

.chat-input-container input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.chat-input-container input:focus {
    outline: none;
    border-color: #2d5a87;
}

/* Voice Button */
.voice-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-btn:hover {
    border-color: #2d5a87;
    background: #f0f7ff;
}

.voice-btn.active {
    border-color: #e74c3c;
    background: #fdeaea;
    animation: pulse-border 1.5s infinite;
}

.voice-btn.speaking-mode {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
    animation: pulse-blue 1.5s infinite;
}

@keyframes pulse-blue {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.5); }
    50% { box-shadow: 0 0 0 10px rgba(59, 130, 246, 0); }
}

/* Conversation Mode Button */
.conversation-mode-btn {
    border-color: #10b981;
}

.conversation-mode-btn:hover {
    border-color: #059669;
    background: #ecfdf5;
}

.conversation-mode-btn.active {
    border-color: #10b981;
    background: #10b981;
    animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

@keyframes pulse-border {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(231, 76, 60, 0); }
}

/* Speech-to-Text Button (Free tier) */
.speech-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: white;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.speech-btn:hover {
    border-color: #8b5cf6;
    background: #f5f3ff;
}

.speech-btn.active {
    border-color: #8b5cf6;
    background: #8b5cf6;
    color: white;
    animation: pulse-purple 1.5s infinite;
}

@keyframes pulse-purple {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(139, 92, 246, 0); }
}

/* Voice Status Indicator */
.voice-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: #1e3a5f;
    color: white;
    border-radius: 25px;
    margin-top: 10px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.voice-status.hidden {
    display: none;
}

.voice-indicator {
    position: relative;
    width: 16px;
    height: 16px;
}

.voice-pulse {
    width: 16px;
    height: 16px;
    background: #4ade80;
    border-radius: 50%;
    animation: voice-pulse 1s infinite;
}

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

.voice-status.speaking .voice-pulse {
    background: #60a5fa;
}

.voice-status.speaking {
    background: #3b82f6;
    animation: hint-pulse 1.5s infinite;
}

@keyframes hint-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

#voiceStatusText {
    font-size: 14px;
    font-weight: 500;
}

.stop-voice-btn {
    padding: 6px 12px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 12px;
    cursor: pointer;
}

.stop-voice-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Message with audio */
.message.assistant .audio-controls {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.replay-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.replay-btn:hover {
    opacity: 1;
}

.send-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #2d5a87 0%, #1e3a5f 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
}

.send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(30, 58, 95, 0.3);
}

.send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Empty State */
.empty-state {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    text-align: center;
    padding: 40px;
    background: #fafbfc;
    z-index: 1;
}

.empty-state.hidden {
    display: none;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #1e3a5f;
}

.empty-state p {
    font-size: 16px;
    max-width: 400px;
}

/* Sample Prompts */
.sample-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
    max-width: 500px;
}

.sample-prompt {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    color: #1e3a5f;
    cursor: pointer;
    transition: all 0.2s;
}

.sample-prompt:hover {
    border-color: #2d5a87;
    background: #f0f7ff;
    transform: translateY(-2px);
}

.sample-prompt.info-note {
    background: #f8f9fa;
    border: 2px dashed #6c757d;
    color: #495057;
    cursor: default;
    font-size: 13px;
    padding: 12px 16px;
}

.sample-prompt.info-note:hover {
    transform: none;
    border-color: #6c757d;
    background: #f8f9fa;
}

/* Welcome Modal */
.modal-welcome {
    max-width: 480px;
}

.modal-header-welcome {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    border-bottom: none;
}

.modal-header-welcome h2 {
    color: white !important;
    font-size: 22px;
}

.welcome-intro {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
}

.welcome-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.welcome-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f5f7fa;
    border-radius: 8px;
}

.welcome-icon {
    font-size: 20px;
}

.welcome-tips {
    background: #fff8e6;
    border-radius: 8px;
    padding: 14px;
    border-left: 4px solid #f5a623;
}

.welcome-tips p {
    margin: 0 0 8px 0;
    color: #333;
}

.welcome-tips ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
}

.welcome-tips li {
    margin: 4px 0;
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
    width: 100%;
}

/* ===============================
   Responsive / Mobile
   =============================== */

/* Mobile menu toggle button */
.mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: #1e3a5f;
    color: white;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.sidebar-overlay.show {
    display: block;
}

@media (max-width: 768px) {
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
    }
    
    /* Show close button in sidebar */
    .close-sidebar-btn {
        display: block;
    }
    
    /* Sidebar becomes slide-out drawer */
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 100;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .chat-main {
        width: 100%;
    }
    
    .chat-header {
        justify-content: flex-start;
        gap: 15px;
    }
    
    .message {
        max-width: 85%;
    }
    
    /* Adjust input area */
    .chat-input-container {
        flex-wrap: nowrap;
    }
    
    .chat-input-container input {
        min-width: 0;
    }
    
    .send-btn {
        padding: 14px 18px;
    }
}

/* ===============================
   Modal Styles
   =============================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: #1e3a5f;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #888;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Settings Sections */
.settings-section {
    margin-bottom: 20px;
}

.settings-section label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.settings-input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.settings-input:focus {
    outline: none;
    border-color: #2d5a87;
}

.settings-hint {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.settings-hint.upgrade {
    color: #e67e22;
}

/* Radio Group for Response Detail */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option:hover {
    border-color: #2d5a87;
    background: #f8fafc;
}

.radio-option input[type="radio"] {
    margin-right: 10px;
    accent-color: #2d5a87;
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: #1e3a5f;
    font-weight: 600;
}

.radio-option:has(input:checked) {
    border-color: #2d5a87;
    background: #f0f7ff;
}

.radio-label {
    font-size: 14px;
    color: #333;
}

.radio-hint {
    width: 100%;
    font-size: 12px;
    color: #888;
    margin-left: 24px;
    margin-top: 2px;
}

.settings-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 20px 0;
}

/* Profile Picture */
.profile-picture-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-picture-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #1e3a5f;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.profile-picture {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.profile-picture.show {
    display: block;
}

.profile-picture-initial {
    font-size: 32px;
    color: white;
    font-weight: 600;
}

.profile-picture-initial.hidden {
    display: none;
}

/* Buttons */
.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

.btn-text {
    background: none;
    border: none;
    color: #2d5a87;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 0;
    display: block;
}

.btn-text:hover {
    text-decoration: underline;
}

.btn-text.btn-danger {
    color: #c00;
}

/* Small Modal (for Change Password, etc.) */
.modal-small {
    max-width: 360px;
}

/* Error and Success Text */
.error-text {
    color: #c00;
    font-size: 14px;
    margin-top: 12px;
    padding: 10px;
    background: #ffe6e6;
    border-radius: 6px;
}

.success-text {
    color: #0a6c0a;
    font-size: 14px;
    margin-top: 12px;
    padding: 10px;
    background: #e6ffe6;
    border-radius: 6px;
}

/* Danger Modal Styles */
.modal-header-danger {
    background: #fee;
    border-bottom: 2px solid #c00;
}

.modal-header-danger h2 {
    color: #900;
}

.danger-warning {
    background: #fff5f5;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
}

.danger-warning p {
    margin: 0 0 8px 0;
    color: #900;
}

.danger-warning ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
    color: #666;
}

.danger-warning li {
    margin: 4px 0;
}

.btn-danger-solid {
    background: #c00;
    color: white;
    border: none;
}

.btn-danger-solid:hover:not(:disabled) {
    background: #a00;
}

.btn-danger-solid:disabled {
    background: #ccc;
    color: #888;
    cursor: not-allowed;
}

/* Sidebar Profile Picture */
.sidebar-profile-pic {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-right: 10px;
}

.sidebar-profile-pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.sidebar-profile-pic img.show {
    display: block;
}

.sidebar-profile-pic .initial {
    font-size: 14px;
    color: white;
    font-weight: 600;
}


/* ===============================
   Upgrade Button & Modal Styles
   =============================== */

/* Upgrade Button in Sidebar */
.upgrade-btn {
    width: 100%;
    padding: 10px 16px;
    margin-top: 12px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upgrade-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

/* Upgrade Modal */
.modal-upgrade {
    max-width: 700px;
}

.upgrade-intro {
    text-align: center;
    color: #666;
    margin-bottom: 24px;
}

.plan-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.plan-card {
    flex: 1;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    position: relative;
}

.plan-card.plan-featured {
    border-color: #3b82f6;
    background: #eff6ff;
}

.plan-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.plan-header {
    text-align: center;
    margin-bottom: 20px;
}

.plan-header h3 {
    margin: 0 0 8px 0;
    color: #1f2937;
    font-size: 20px;
}

.plan-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.plan-price .price {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
}

.plan-price .period {
    font-size: 14px;
    color: #6b7280;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.plan-features li {
    padding: 8px 0;
    color: #374151;
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.plan-features li:last-child {
    border-bottom: none;
}

.plan-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plan-actions .btn {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
}

.plan-actions .btn-secondary {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
    font-size: 12px;
}

.plan-actions .btn-secondary:hover {
    background: #f3f4f6;
}

.trial-note {
    text-align: center;
    color: #059669;
    font-size: 14px;
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/* Mobile responsive for plan cards */
@media (max-width: 600px) {
    .plan-cards {
        flex-direction: column;
    }
    
    .modal-upgrade {
        max-width: 95%;
    }
}

/* ===============================
   ElevenLabs Widget Positioning
   =============================== */
elevenlabs-convai {
    bottom: 100px !important;
}

@media (max-width: 768px) {
    elevenlabs-convai {
        bottom: 90px !important;
    }
}

/* ===============================
   App Store Links
   =============================== */
.app-store-links {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.app-store-text {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 12px;
}

.app-store-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.app-store-btn img {
    height: 40px;
    width: auto;
    transition: opacity 0.2s;
}

.app-store-btn:last-child {
    margin-left: -10px;
}

.app-store-btn:last-child img {
    height: 59px;
    margin: -10px 0;
}

.app-store-btn:hover img {
    opacity: 0.8;
}


/* ===============================
   Equipment Profile Styles
   =============================== */

/* My Equipment Button in Sidebar */
.my-equipment-btn {
    margin: 0 15px 15px 15px;
    padding: 12px;
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    width: calc(100% - 30px);
}

.my-equipment-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
}

/* Equipment Modal */
.modal-equipment {
    max-width: 600px;
    max-height: 90vh;
}

.modal-header-equipment {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
}

.modal-header-equipment h2 {
    color: white;
}

/* Equipment List View */
.equipment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.equipment-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.equipment-card:hover {
    border-color: #2d5a87;
    background: #f0f7ff;
}

.equipment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.equipment-nickname {
    font-size: 16px;
    font-weight: 600;
    color: #1e3a5f;
}

.equipment-edit-btn {
    background: none;
    border: none;
    color: #2d5a87;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
}

.equipment-edit-btn:hover {
    text-decoration: underline;
}

.equipment-summary {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.equipment-summary span {
    display: inline-block;
    margin-right: 16px;
}

.add-equipment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: white;
    border: 2px dashed #ccc;
    border-radius: 12px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.add-equipment-btn:hover {
    border-color: #2d5a87;
    color: #2d5a87;
    background: #f0f7ff;
}

/* Equipment Form */
.equipment-form .form-section {
    margin-bottom: 24px;
}

.equipment-form .form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e3a5f;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f0f8;
}

.equipment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.equipment-form .form-row.single {
    grid-template-columns: 1fr;
}

.equipment-form .form-group {
    display: flex;
    flex-direction: column;
}

.equipment-form .form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #444;
    margin-bottom: 6px;
}

.equipment-form .form-group label .optional {
    color: #999;
    font-weight: 400;
}

.equipment-form .form-group input,
.equipment-form .form-group select {
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.equipment-form .form-group input:focus,
.equipment-form .form-group select:focus {
    outline: none;
    border-color: #2d5a87;
}

.equipment-form .input-with-status {
    position: relative;
}

.equipment-form .input-with-status input {
    width: 100%;
    padding-right: 40px;
}

.equipment-form .input-status {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}

.equipment-form .hint {
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.equipment-form .detected {
    font-size: 12px;
    color: #10b981;
    margin-top: 4px;
    font-weight: 500;
}

/* AI Analysis Section */
.ai-analysis {
    background: #f0f7ff;
    border: 2px solid #2d5a87;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ai-analysis.warning {
    background: #fff8e6;
    border-color: #f5a623;
}

.ai-analysis-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #1e3a5f;
}

.ai-analysis.warning .ai-analysis-header {
    color: #b45309;
}

.ai-analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ai-analysis-item {
    background: white;
    padding: 10px 12px;
    border-radius: 8px;
}

.ai-analysis-item .label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.ai-analysis-item .value {
    font-size: 15px;
    font-weight: 600;
    color: #1e3a5f;
}

.known-issues-list {
    margin: 0;
    padding-left: 20px;
    color: #666;
    line-height: 1.8;
}

/* Sizing Note */
.sizing-note {
    background: #fff8e6;
    border-left: 4px solid #f5a623;
    padding: 12px;
    margin-top: 16px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    line-height: 1.5;
}

.sizing-note strong {
    color: #1e3a5f;
}

.procalcs-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    color: #2d5a87;
    text-decoration: none;
    font-weight: 600;
}

.procalcs-cta:hover {
    text-decoration: underline;
}

/* Empty Equipment State */
.equipment-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.equipment-empty h3 {
    color: #1e3a5f;
    margin-bottom: 10px;
}

.equipment-empty p {
    margin-bottom: 20px;
}

/* Loading spinner */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .equipment-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .ai-analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-equipment {
        max-width: 95%;
        margin: 10px;
    }
}


/* ===============================
   Notification Preferences Styles
   =============================== */

.notification-group {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.notification-group-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2d5a87;
}

.checkbox-option .checkbox-label {
    font-size: 14px;
    color: #333;
}

.checkbox-option:hover .checkbox-label {
    color: #2d5a87;
}

.pro-only {
    border-left: 3px solid #2d5a87;
    margin-left: 0;
}
