:root {
    --primary: #111b21;
    --surface: #202c33;
    --bg-chat: #0b141a;
    --text-main: #e9edef;
    --text-sub: #8696a0;
    --accent: #00a884;
    --border: #222d34;
    --highlight: #2a3942;
    --danger: #ef4444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg-chat); color: var(--text-main); height: 100vh; overflow: hidden; display: flex; flex-direction: column; }

/* Auth */
#auth-page { width: 100vw; height: 100vh; display: flex; justify-content: center; align-items: center; background: var(--primary); }
.auth-card { background: var(--surface); padding: 40px; border-radius: 10px; width: 350px; text-align: center; }
.auth-card input { width: 100%; padding: 12px; margin-bottom: 15px; border-radius: 5px; border: none; background: var(--highlight); color: white; outline: none; }
.auth-card button { width: 100%; padding: 12px; border: none; border-radius: 5px; background: var(--accent); color: white; font-weight: bold; cursor: pointer; }

/* Layout - Mobile Smartphone Style */
#app-layout { width: 100vw; height: 100vh; display: none; position: relative; overflow: hidden; background: var(--primary); }

/* Sidebar (Home Screen) */
.sidebar { width: 100%; height: 100%; background: var(--primary); display: flex; flex-direction: column; position: absolute; top: 0; left: 0; transition: transform 0.3s; z-index: 5; }
.sidebar.hidden { transform: translateX(-100%); }
.sidebar-header { padding: 15px; background: var(--surface); display: flex; justify-content: space-between; align-items: center; }
.sidebar-header h2 { font-size: 16px; margin: 0; }
.search-bar { padding: 10px 15px; border-bottom: 1px solid var(--border); }
.search-bar input { width: 100%; padding: 8px 12px; background: var(--surface); border: none; border-radius: 8px; color: var(--text-main); outline: none; }
.user-list { flex: 1; overflow-y: auto; }
.user-item { padding: 15px; border-bottom: 1px solid var(--border); cursor: pointer; display: flex; align-items: center; gap: 15px; transition: background 0.2s; }
.user-item:hover, .user-item.active { background: var(--highlight); }
.user-avatar { width: 45px; height: 45px; border-radius: 50%; background: var(--accent); display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 18px; color: white; }
.user-info { flex: 1; overflow: hidden; }
.user-info .email { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info .status { font-size: 13px; color: var(--text-sub); }

/* Main Panel (Chat Screen) */
.main-panel { width: 100%; height: 100%; display: flex; flex-direction: column; background: var(--bg-chat); position: absolute; top: 0; left: 100%; transition: transform 0.3s; z-index: 10; }
.main-panel.active { transform: translateX(-100%); }
.empty-state { display: none; } /* Not used in mobile view */
.chat-header { padding: 15px 20px; background: var(--surface); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); color: white; }
.chat-header-info { display: flex; align-items: center; gap: 15px; }
.back-btn { font-size: 24px; cursor: pointer; padding-right: 5px; color: var(--text-main); }
.chat-actions button, .btn { padding: 8px 15px; background: var(--accent); border: none; border-radius: 5px; color: white; cursor: pointer; font-weight: bold; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; }
.chat-actions a.btn { background: #3b82f6; margin-right: 10px; }

/* Pricing Grid - Gallery View */
.pricing-content { flex: 1; overflow-y: auto; padding: 15px; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.design-card { background: var(--surface); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.design-img { width: 100%; height: 180px; object-fit: cover; }
.design-info { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.design-id { font-weight: bold; font-size: 14px; }
.default-price { font-size: 11px; color: var(--text-sub); background: rgba(255,255,255,0.05); padding: 4px 6px; border-radius: 4px; margin-bottom: 5px; }
.price-input-group { display: flex; flex-direction: column; gap: 5px; margin-top: 5px; }
.price-input-group label { font-size: 11px; color: var(--accent); font-weight: bold; display: none; }
.price-input-group input { width: 100%; padding: 8px; background: var(--primary); border: 1px solid var(--border); border-radius: 4px; color: var(--text-main); font-weight: bold; outline: none; font-size: 13px; }
.price-input-group input:focus { border-color: var(--accent); }
.save-btn { width: 100%; padding: 8px; background: var(--accent); color: white; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; transition: 0.2s; font-size: 12px; }

/* View & Edit Modes */
.price-view-mode { display: flex; justify-content: space-between; align-items: center; background: rgba(0, 168, 132, 0.1); padding: 8px; border-radius: 4px; border: 1px solid rgba(0, 168, 132, 0.2); }
.price-view-mode .amount { font-size: 15px; font-weight: bold; color: var(--accent); }
.edit-btn { background: transparent; border: none; color: var(--text-sub); cursor: pointer; font-size: 16px; }
.edit-btn:hover { color: var(--text-main); }
.save-btn:hover { filter: brightness(1.1); }
.save-btn.saved { background: var(--highlight); color: var(--text-main); }
.save-btn.saved::after { content: ' \2713'; } /* Checkmark */

/* Default Prices Page Specific */
body.default-page { overflow-y: auto; }
.header-bar { padding: 20px; background: var(--surface); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.container { padding: 20px; max-width: 1400px; margin: 0 auto; width: 100%; }

/* Image Modal */
.image-modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100vw; height: 100vh; background-color: rgba(0,0,0,0.9); flex-direction: column; justify-content: center; align-items: center; }
.image-modal.active { display: flex; }
.image-modal img { max-width: 90%; max-height: 80vh; object-fit: contain; border-radius: 8px; }
.modal-close { position: absolute; top: 20px; right: 30px; color: white; font-size: 35px; font-weight: bold; cursor: pointer; }

/* Design Search inside Chat */
.design-search-container { padding: 10px 20px; background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 20; }
.design-search-input { width: 100%; padding: 12px; background: var(--primary); border: 1px solid var(--border); border-radius: 6px; color: var(--text-main); font-size: 14px; outline: none; }
.design-search-dropdown { display: none; position: absolute; top: 100%; left: 20px; right: 20px; background: var(--surface); border: 1px solid var(--border); border-top: none; max-height: 300px; overflow-y: auto; z-index: 50; box-shadow: 0 4px 10px rgba(0,0,0,0.5); border-radius: 0 0 6px 6px; }
.design-search-dropdown.active { display: block; }
.dropdown-item { padding: 10px 15px; display: flex; align-items: center; gap: 15px; cursor: pointer; border-bottom: 1px solid var(--border); }
.dropdown-item:hover { background: var(--highlight); }
.dropdown-img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
.dropdown-info { flex: 1; display: flex; flex-direction: column; }
.dropdown-title { font-weight: bold; font-size: 14px; color: var(--text-main); }
.dropdown-sub { font-size: 12px; color: var(--text-sub); }

/* Make design images clickable */
.design-img { cursor: pointer; transition: opacity 0.2s; }
.design-img:hover { opacity: 0.8; }
.design-name { font-size: 12px; color: var(--accent); line-height: 1.2; }
