/* CSS Design System for Autobot Decor AI - SaaS 8 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;700&family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --bg-dark: #07080a;
    --bg-card: rgba(15, 23, 20, 0.7);
    --border-color: rgba(16, 185, 129, 0.2);
    --border-glow: rgba(16, 185, 129, 0.08);
    --primary-emerald: #10b981;
    --primary-mint: #34d399;
    --primary-teal: #0d9488;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --neon-shadow: 0 0 25px rgba(16, 185, 129, 0.35);
    --neon-shadow-mint: 0 0 25px rgba(52, 211, 153, 0.35);
    --glass-blur: blur(18px);
}

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

body {
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 5% 15%, rgba(16, 185, 129, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 95% 85%, rgba(52, 211, 153, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
    color: var(--text-light);
    font-family: 'Outfit', 'Noto Sans Thai', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Container & Header */
.app-container {
    max-width: 1550px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-section h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, var(--primary-emerald), var(--primary-mint));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 40px rgba(16, 185, 129, 0.2);
}

.logo-section p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-top: 0.25rem;
}

.status-badge {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--primary-emerald);
    border-radius: 99px;
    padding: 0.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    color: var(--primary-mint);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.status-dot {
    width: 10px;
    height: 10px;
    background-color: var(--primary-emerald);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-emerald);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    gap: 2rem;
    align-items: start;
}

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

/* Glassmorphism Card Style */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), var(--border-glow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
}

.glass-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 30px rgba(16, 185, 129, 0.15);
}

.card-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-left: 4px solid var(--primary-emerald);
    padding-left: 0.8rem;
}

/* Before / After Image Slider Workspace */
.slider-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    background: #111;
}

.image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    user-select: none;
    cursor: ew-resize;
}

.slider-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

.slider-img.img-before {
    z-index: 1;
}

.slider-img.img-after {
    z-index: 2;
    width: 50%; /* Adjusted dynamically by JS */
    border-right: 2px solid var(--primary-mint);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

/* Handle bar in the center */
.slider-handle {
    position: absolute;
    top: 0;
    left: 50%; /* Adjusted dynamically by JS */
    width: 4px;
    height: 100%;
    background-color: var(--primary-mint);
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 15px var(--primary-mint);
    pointer-events: none;
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: var(--bg-dark);
    border: 2px solid var(--primary-mint);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-mint);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
    cursor: pointer;
    z-index: 4;
}

.slider-label {
    position: absolute;
    top: 15px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 5;
    pointer-events: none;
}

.label-before {
    left: 15px;
    border-left: 3px solid #ff4d4d;
}

.label-after {
    right: 15px;
    border-right: 3px solid var(--primary-emerald);
}

/* Laser Scan Effect */
.laser-scanner {
    position: absolute;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(to right, transparent, var(--primary-mint), transparent);
    box-shadow: 0 0 20px 4px var(--primary-mint);
    z-index: 6;
    top: 0%;
    opacity: 0;
    pointer-events: none;
}

.scanning .laser-scanner {
    animation: scanLaser 2s linear infinite;
}

@keyframes scanLaser {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* File Upload drag and drop zone */
.file-upload-zone {
    border: 2px dashed rgba(16, 185, 129, 0.4);
    border-radius: 14px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: rgba(16, 185, 129, 0.01);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.file-upload-zone:hover {
    border-color: var(--primary-emerald);
    background: rgba(16, 185, 129, 0.05);
    box-shadow: var(--neon-shadow);
}

.upload-icon {
    font-size: 2.8rem;
    color: var(--primary-emerald);
    margin-bottom: 0.8rem;
}

/* Fields & selections */
.config-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.field-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-box label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
}

select, input[type="text"], textarea {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

select:focus, input[type="text"]:focus, textarea:focus {
    border-color: var(--primary-emerald);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

/* Large Metrics Dashboard Row */
.metric-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
}

.metric-card span {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.metric-card h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-mint);
    margin-top: 0.4rem;
    text-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
}

/* Premium Buttons */
.btn {
    background: linear-gradient(135deg, var(--primary-emerald), var(--primary-teal));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 1rem 1.8rem;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    box-shadow: var(--neon-shadow);
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, var(--primary-mint), var(--primary-teal));
}

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

/* Custom Shopping Checklist Table */
.shopping-checklist {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.shopping-checklist th, .shopping-checklist td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.shopping-checklist th {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shopping-checklist tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Custom Checkbox Design */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 1rem;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(255,255,255,0.2);
    border-color: var(--primary-mint);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-emerald);
    border-color: var(--primary-emerald);
    box-shadow: 0 0 8px var(--primary-emerald);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Style for line-through text when checked */
.checkbox-container input:checked ~ .item-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Consultation output styles */
.consultation-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    font-size: 0.98rem;
    color: #e2e8f0;
    min-height: 120px;
    max-height: 280px;
    overflow-y: auto;
}

.consultation-box p {
    margin-bottom: 0.8rem;
}

.consultation-box ul {
    margin-left: 1.5rem;
    margin-bottom: 0.8rem;
}

/* Console logs look */
.console-logs {
    background: rgba(4, 6, 5, 0.95);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: 12px;
    padding: 1.2rem;
    font-family: monospace;
    font-size: 0.9rem;
    color: #a7f3d0;
    height: 150px;
    overflow-y: auto;
    margin-top: 1.5rem;
}

.console-line {
    margin-bottom: 0.4rem;
    display: flex;
    gap: 0.8rem;
}

.console-timestamp {
    color: var(--primary-mint);
}

.console-success {
    color: #10b981;
}

.console-info {
    color: #38bdf8;
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(8px);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    z-index: 999;
    font-weight: 600;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}
