/* style.css - Sistema Farmacéutico v3.5 - VERSIÓN OPTIMIZADA */

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --border-focus: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --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(--gradient-primary);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* ==================== LOGIN STYLES ==================== */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    position: relative;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.logo {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: var(--shadow-md);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.login-header h1 {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    width: 20px;
    height: 20px;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--bg-primary);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg-primary);
}

.form-group input::placeholder {
    color: var(--text-light);
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.eye-icon {
    opacity: 0.5;
    transition: opacity 0.2s;
}

.form-options {
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-right: 0.5rem;
    transition: all 0.2s;
}

.checkbox-container:hover .checkmark {
    background-color: var(--bg-tertiary);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.btn-primary {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    background: #fef2f2;
    color: var(--error-color);
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    font-size: 0.875rem;
    border-left: 3px solid var(--error-color);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.separator {
    color: var(--text-light);
    margin: 0 0.75rem;
}

.version-info {
    color: var(--text-light);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* Background Animation */
.background-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    pointer-events: none;
}

.shape-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 10%;
    right: 10%;
    animation: float 8s ease-in-out infinite reverse;
}

.shape-3 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* ==================== CHAT STYLES ==================== */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--bg-secondary);
}

.chat-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.header-left h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.database-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    background: #059669;
    transform: translateY(-1px);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--bg-secondary);
    border-color: var(--error-color);
    color: var(--error-color);
}

/* Messages Container */
.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1rem;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    scroll-behavior: smooth;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.5s ease-in;
}

.welcome-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: wave 1s ease-in-out;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.welcome-message h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.welcome-message p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.feature-text {
    font-size: 0.875rem;
    color: var(--text-primary);
    text-align: center;
}

/* Suggestions */
.suggestions {
    margin: 2rem 0;
}

.suggestions h3 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.suggestion-chip {
    padding: 0.75rem 1.25rem;
    margin: 0.25rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    display: inline-block;
}

.suggestion-chip:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Tips Container */
.tips-container {
    display: grid;
    gap: 1rem;
    margin-top: 2rem;
}

.tip-card {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--primary-light);
    border-left: 3px solid var(--primary-color);
    border-radius: var(--radius-md);
    text-align: left;
}

.tip-icon {
    font-size: 1.5rem;
}

.tip-content {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.tip-content strong {
    color: var(--primary-color);
}

/* Message Styles */
.message {
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.message-user {
    display: flex;
    justify-content: flex-end;
}

.message-assistant {
    display: flex;
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    word-wrap: break-word;
    position: relative;
}

.message-user .message-content {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

.message-assistant .message-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 0.25rem;
}

.message-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-color);
}

.emoji-large {
    font-size: 1.5rem;
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* ==================== SQL DISPLAY STYLES - OPTIMIZADO v3.5 ==================== */

.sql-container {
    margin-top: 1rem;
    background: #282c34;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.sql-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.sql-header:hover {
    background: var(--primary-hover);
}

.sql-icon {
    font-size: 1rem;
}

.sql-title {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
}

.sql-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.sql-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sql-content {
    max-height: 500px;
    overflow: auto;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    position: relative;
    opacity: 1;
}

.sql-content.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.sql-code {
    margin: 0;
    padding: 1rem;
    background: #282c34;
    color: #abb2bf;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    overflow-x: auto;
    white-space: pre;
}

.sql-code code {
    background: none;
    padding: 0;
    color: inherit;
}

.sql-copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(4px);
    z-index: 10;
    font-weight: 500;
}

.sql-copy-btn:hover {
    background: var(--primary-hover);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.sql-copy-btn:active {
    transform: scale(0.95);
}

/* Results Table */
.results-table-container {
    margin-top: 1rem;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.results-table th {
    background: var(--bg-tertiary);
    padding: 0.75rem;
    text-align: left;
    font-weight: 500;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.results-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.results-table tr.even {
    background: var(--bg-secondary);
}

.results-table tr:hover {
    background: var(--primary-light);
}

.results-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    font-style: italic;
}

/* Suggestions Bar */
.suggestions-bar {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    max-width: 900px;
    margin: 0 auto;
    gap: 1rem;
}

.suggestions-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.suggestions-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.suggestion-chip-small {
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    font-size: 0.8125rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-chip-small:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Input Area */
.input-container {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    box-shadow: 0 -4px 6px -1px rgb(0 0 0 / 0.05);
}

.input-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto 0.5rem;
    font-size: 0.875rem;
}

.deep-search-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
    background: var(--border-color);
    border-radius: 24px;
    transition: background 0.3s;
}

.deep-search-toggle input {
    display: none;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: var(--shadow-sm);
}

.deep-search-toggle input:checked + .toggle-switch {
    background: var(--success-color);
}

.deep-search-toggle input:checked + .toggle-switch::after {
    transform: translateX(24px);
}

.toggle-label {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.char-count {
    color: var(--text-secondary);
}

.input-wrapper {
    display: flex;
    gap: 0.75rem;
    max-width: 900px;
    margin: 0 auto;
}

.message-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    font-family: inherit;
    transition: all 0.2s;
}

.message-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-send {
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.btn-send:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input-hints {
    max-width: 900px;
    margin: 0.5rem auto 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Loading Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: slideIn 0.3s ease-out;
}

.spinner-large {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

.loading-subtext {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    display: none;
    z-index: 9999;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.show {
    display: flex;
}

.toast.hide {
    animation: slideOutRight 0.3s ease-out;
}

@keyframes slideOutRight {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--error-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-info {
    border-left: 4px solid var(--info-color);
}

/* History Separator */
.history-separator {
    text-align: center;
    margin: 1rem 0;
    position: relative;
}

.history-separator span {
    background: var(--bg-secondary);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.history-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border-color);
    z-index: -1;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-card {
        padding: 2rem;
        margin: 1rem;
    }
    
    .feature-cards {
        grid-template-columns: 1fr 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .suggestions-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-action span,
    .btn-logout span {
        display: none;
    }
    
    .input-container {
        padding: 0.75rem;
    }
    
    .sql-code {
        font-size: 0.75rem;
        padding: 0.75rem;
    }
    
    .sql-copy-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.6875rem;
    }
    
    .results-table {
        font-size: 0.75rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .message-content {
        max-width: 90%;
        font-size: 0.875rem;
    }
    
    .toast {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .btn-send {
        min-width: 40px;
        padding: 0.5rem;
    }
    
    .sql-container {
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.hidden {
    display: none !important;
}