/*
 * ASEKO Assistant - Modern Design System
 * Complete CSS file for all pages (index, login, settings)
 * Version: 2.0
 * Compatible with: Chrome 60+, Firefox 60+, Safari 12+
 */

/* ========================================
   FONTS & IMPORTS
   ======================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ========================================
   CSS RESET & BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ======================================== */
:root {
    /* Clean Apple-inspired Colors */
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f9f9f9;
    --gray-100: #f0f0f0;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --blue: #007AFF;
    --blue-hover: #0056CC;
    --green: #34C759;
    --red: #FF3B30;
    --orange: #FF9500;
    
    /* Spacing System (8px grid) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    
    /* Typography Scale */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-3xl: 30px;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BASE STYLES
   ======================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.5;
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */

/* Container */
.container {
    max-width: 1200px;
    width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header,
.main-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--space-lg);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-xs);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo,
.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--black);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.logo:hover,
.logo-icon:hover {
    transform: scale(1.05);
}

.logo svg,
.logo-icon svg {
    width: 18px;
    height: 18px;
    color: var(--white);
}

.logo-text h1,
.title-section h1 {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--black);
    letter-spacing: -0.025em;
}

.logo-text .subtitle,
.subtitle {
    color: var(--gray-600);
    font-size: var(--text-sm);
    margin-top: var(--space-xs);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn,
.settings-btn,
.login-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    height: 40px;
    font-family: inherit;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--blue-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-200);
    border-color: var(--gray-400);
}

.btn-danger {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.2);
    color: var(--red);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(255, 59, 48, 0.15);
    border-color: var(--red);
}

.btn-small {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
    height: 28px;
}

.settings-btn {
    background: var(--white);
    border: 1px solid var(--gray-300);
    color: var(--black);
}

.settings-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

/* Login Button */
.login-button {
    width: 100%;
    height: 48px;
    background: var(--blue);
    color: var(--white);
    font-size: var(--text-base);
    justify-content: center;
}

.login-button:hover:not(:disabled) {
    background: var(--blue-hover);
    transform: translateY(-1px);
}

.login-button:disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   CARDS
   ======================================== */
.card,
.product-selection-card,
.chat-card,
.settings-section,
.login-container {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xs);
    transition: var(--transition-slow);
}

.card:hover,
.product-selection-card:hover,
.chat-card:hover {
    box-shadow: var(--shadow-sm);
}

.card h4 {
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--black);
    margin-bottom: var(--space-md);
    letter-spacing: -0.025em;
}

/* Settings specific cards */
.settings-section {
    padding: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

/* Login specific */
.login-container {
    max-width: 400px;
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.4s ease-out;
}

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

/* ========================================
   CUSTOM DROPDOWN
   ======================================== */
.custom-select {
    position: relative;
    width: 100%;
}

.select-trigger {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    color: var(--black);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 48px;
    transition: var(--transition);
}

.select-trigger:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

.select-trigger.active {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.select-trigger span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.select-trigger .placeholder {
    color: var(--gray-500);
}

.select-arrow {
    width: 16px;
    height: 16px;
    color: var(--gray-500);
    flex-shrink: 0;
    transition: var(--transition);
}

.select-trigger.active .select-arrow {
    transform: rotate(180deg);
    color: var(--blue);
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 480px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    margin-top: var(--space-xs);
}

.select-options.show {
    opacity: 0.9;
    visibility: visible;
    transform: translateY(0);
}

.select-option {
    padding: 8px var(--space-lg);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-100);
}

.select-option:last-child {
    border-bottom: none;
}

.select-option:hover {
    background: var(--gray-50);
    color: var(--blue);
}

.select-option.selected {
    background: var(--blue);
    color: var(--white);
}

.select-option.selected:hover {
    background: var(--blue-hover);
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

/* Standard form groups */
.form-group {
    margin-bottom: var(--space-lg);
}

/* Standard inputs (non-floating) */
.form-group input:not([placeholder=" "]),
.form-group textarea:not([placeholder=" "]) {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    color: var(--black);
    font-size: var(--text-base);
    font-family: inherit;
    transition: var(--transition);
    height: 48px;
}

.form-group input:not([placeholder=" "])::placeholder,
.form-group textarea:not([placeholder=" "])::placeholder {
    color: var(--gray-500);
}

.form-group input:not([placeholder=" "]):hover,
.form-group textarea:not([placeholder=" "]):hover {
    border-color: var(--gray-400);
}

.form-group input:not([placeholder=" "]):focus,
.form-group textarea:not([placeholder=" "]):focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Floating Labels Form Groups */
.form-group {
    position: relative;
}

.form-group input[placeholder=" "],
.form-group textarea[placeholder=" "] {
    width: 100%;
    padding: var(--space-lg) var(--space-lg) var(--space-md) var(--space-lg);
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    color: var(--black);
    font-size: var(--text-base);
    font-family: inherit;
    transition: var(--transition);
    min-height: 56px;
}

.form-group textarea[placeholder=" "] {
    resize: vertical;
    min-height: 80px;
}

.form-group input[placeholder=" "]:hover,
.form-group textarea[placeholder=" "]:hover {
    border-color: var(--gray-400);
}

.form-group input[placeholder=" "]:focus,
.form-group textarea[placeholder=" "]:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-group label {
    position: absolute;
    left: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: var(--text-base);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
    padding: 0 4px;
}

.form-group input[placeholder=" "]:focus + label,
.form-group input[placeholder=" "]:not(:placeholder-shown) + label,
.form-group textarea[placeholder=" "]:focus + label,
.form-group textarea[placeholder=" "]:not(:placeholder-shown) + label {
    top: 0;
    transform: translateY(-50%);
    font-size: var(--text-xs);
    color: var(--blue);
    font-weight: 500;
}

.form-group input[placeholder=" "]:not(:focus):not(:placeholder-shown) + label,
.form-group textarea[placeholder=" "]:not(:focus):not(:placeholder-shown) + label {
    color: var(--gray-600);
}

/* ========================================
   CHAT INTERFACE
   ======================================== */

/* Main Content Layout */
.main-content {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: var(--space-lg);
    flex: 1;
}

/* Chat Card */
.chat-card {
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.messages::-webkit-scrollbar {
    width: 6px;
}

.messages::-webkit-scrollbar-track {
    background: transparent;
}

.messages::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

.welcome-message {
    color: var(--gray-500);
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-align: center;
}

.message {
    margin-bottom: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    max-width: 75%;
    animation: slideIn 0.3s ease-out;
    font-size: var(--text-base);
    line-height: 1.5;
}

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

.message.user {
    background: var(--blue);
    color: var(--white);
    margin-left: auto;
    border-bottom-right-radius: var(--radius-sm);
}

.message.assistant {
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--black);
    border-bottom-left-radius: var(--radius-sm);
}

/* Typing Indicator */
.typing-indicator {
    background: var(--white);
    border: 1px solid var(--gray-200);
    color: var(--black);
    margin-bottom: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    max-width: 75%;
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom-left-radius: var(--radius-sm);
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-500);
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingAnimation {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Input Group with Integrated Button */
.input-group {
    position: relative;
    width: 100%;
}

.message-input {
    width: 100%;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    padding: var(--space-md) 60px var(--space-md) var(--space-lg);
    line-height: 1.5;
    box-sizing: border-box;
    outline: none;
    background: var(--white);
    color: var(--black);
    font-size: var(--text-base);
    font-family: inherit;
    height: 48px;
    transition: var(--transition);
}

.message-input:hover:not(:disabled) {
    border-color: var(--gray-400);
}

.message-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.message-input:disabled {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--gray-500);
    cursor: not-allowed;
}

.send-button {
    position: absolute;
    right: 3px;
    top: 3px;
    bottom: 3px;
    border: 0;
    background: var(--blue);
    color: var(--white);
    outline: none;
    margin: 0;
    padding: 0;
    border-radius: var(--radius-lg);
    z-index: 2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    transition: var(--transition);
}

.send-button:hover:not(:disabled) {
    background: var(--blue-hover);
}

.send-button:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

/* ========================================
   SETTINGS PAGE COMPONENTS
   ======================================== */

/* Settings Header */
.settings-header {
    margin-bottom: var(--space-2xl);
}

.settings-header h2 {
    font-size: var(--text-3xl);
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--black);
    letter-spacing: -0.025em;
}

.settings-description {
    color: var(--gray-600);
    font-size: var(--text-base);
}

/* Section Headers */
.section-title {
    font-size: var(--text-xl);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    color: var(--black);
    font-weight: 600;
}

.section-title svg {
    color: var(--gray-600);
}

.section-description {
    color: var(--gray-600);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

/* Product Management */
.product-management-actions {
    margin-bottom: var(--space-xl);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-xl);
}

.product-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: relative;
    transition: var(--transition);
}

.product-card:hover {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
}

.product-info h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--black);
    margin-bottom: var(--space-xs);
}

.product-stats {
    color: var(--gray-600);
    font-size: var(--text-sm);
}

.delete-cross-corner {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: transparent;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    width: 24px;
    height: 24px;
}

.delete-cross-corner:hover {
    color: var(--red);
    background: rgba(255, 59, 48, 0.1);
}

/* Files List */
.files-section {
    margin-bottom: var(--space-xl);
}

.files-list {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:hover {
    background: var(--gray-50);
}

.file-info {
    flex: 1;
}

.file-name {
    color: var(--black);
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.file-date {
    color: var(--gray-600);
    font-size: var(--text-xs);
}

.file-actions {
    display: flex;
    gap: var(--space-sm);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
}

.upload-area:hover {
    border-color: var(--blue);
    background: rgba(0, 122, 255, 0.05);
}

.upload-area.dragover {
    border-color: var(--blue);
    background: rgba(0, 122, 255, 0.1);
    transform: scale(1.02);
}

.upload-title {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.upload-subtitle {
    font-size: var(--text-sm);
    color: var(--gray-500);
}

/* System Information */
.system-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.info-card {
    background: var(--gray-50);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.info-card h4 {
    color: var(--black);
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.info-value {
    color: var(--black);
    font-size: var(--text-xl);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray-400);
    transition: all 0.3s ease;
}

.status-dot.healthy {
    background: var(--green);
}

.status-dot.error {
    background: var(--red);
}

.status-dot.checking {
    background: var(--yellow);
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from {
        opacity: 0.4;
    }
    to {
        opacity: 1;
    }
}

.info-subtitle {
    color: var(--gray-600);
    font-size: var(--text-xs);
    margin-top: var(--space-xs);
}

/* ========================================
   MODAL COMPONENTS
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease-out;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.modal-header h3 {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--black);
}

.close-modal {
    background: none;
    border: none;
    font-size: var(--text-xl);
    color: var(--gray-500);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--gray-700);
    background: var(--gray-100);
}

.modal-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-xl);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Loading Spinner */
.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Messages */
.message {
    text-align: center;
    font-size: var(--text-sm);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.message.error {
    color: var(--red);
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.message.success {
    color: var(--green);
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.message.hidden {
    opacity: 0;
    transform: translateY(-10px);
}

/* Theme Controls */
.theme-controls,
.language-theme-controls {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    display: flex;
    gap: var(--space-sm);
}

.control-select {
    background: var(--white);
    border: 1px solid var(--gray-300);
    color: var(--black);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: var(--transition);
}

.control-select:hover {
    border-color: var(--gray-400);
}

.control-select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* ========================================
   LOGIN PAGE SPECIFIC
   ======================================== */

/* Login page body styling */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    min-height: 100vh;
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.login-header .logo {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
}

.login-header .logo svg {
    width: 32px;
    height: 32px;
}

.login-header h1 {
    font-size: var(--text-3xl);
    font-weight: 600;
    color: var(--black);
    margin-bottom: var(--space-sm);
    letter-spacing: -0.025em;
}

.login-header p {
    color: var(--gray-600);
    font-size: var(--text-base);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet and below */
@media (max-width: 968px) {
    .container {
        width: 100%;
        padding: var(--space-md);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .system-info-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: var(--space-md);
        align-items: flex-start;
    }
    
    .logo-text h1,
    .title-section h1 {
        font-size: var(--text-xl);
    }
    
    .message.user,
    .message.assistant {
        max-width: 90%;
    }
    
    .modal-content {
        margin: var(--space-md);
        width: calc(100% - 2rem);
        padding: var(--space-xl);
    }
    
    .login-container {
        margin: var(--space-md);
        max-width: calc(100% - 2rem);
    }
    
    .theme-controls,
    .language-theme-controls {
        top: var(--space-md);
        right: var(--space-md);
        flex-direction: column;
    }
    
    .login-header h1 {
        font-size: var(--text-2xl);
    }
    
    .settings-header h2 {
        font-size: var(--text-2xl);
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .container {
        padding: var(--space-sm);
    }
    
    .card,
    .product-selection-card,
    .chat-card,
    .settings-section {
        padding: var(--space-lg);
    }
    
    .modal-content {
        padding: var(--space-lg);
    }
}