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

:root {
  --primary: #0369a1;
  --primary-light: #0ea5e9;
  --primary-bg: #f0f9ff;
  --accent: #f59e0b;
  --success: #10b981;
  --whatsapp: #25d366;
  --danger: #ef4444;
  --text: #1e293b;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --card: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }

/* ============= BG DECORATION ============= */
.bg-decoration { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-circle { position: absolute; border-radius: 50%; opacity: 0.04; }
.bg-circle-1 { width: 600px; height: 600px; background: var(--primary); top: -200px; right: -100px; }
.bg-circle-2 { width: 400px; height: 400px; background: var(--accent); bottom: -100px; left: -100px; }
.bg-circle-3 { width: 300px; height: 300px; background: var(--primary-light); top: 50%; left: 50%; transform: translate(-50%, -50%); }

.container { max-width: 1100px; margin: 0 auto; padding: 20px; position: relative; z-index: 1; }

/* ============= HEADER ============= */
.header { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; margin-bottom: 16px; flex-wrap: wrap; gap: 16px; }
.logo { display: flex; align-items: center; gap: 14px; }
.logo-icon { font-size: 36px; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }
.logo h1 { font-size: 26px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.tagline { font-size: 13px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.agent-name { font-weight: 600; font-size: 13px; color: var(--primary); }
.agent-branch { font-size: 12px; color: var(--text-muted); }

/* Language Selector */
.lang-select { padding: 6px 10px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; font-family: inherit; cursor: pointer; background: var(--card); color: var(--text); }
.lang-select:focus { border-color: var(--primary-light); outline: none; }

/* Auth Badge */
.auth-badge { display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 500; }
.auth-badge.connected { background: #ecfdf5; color: #065f46; }
.auth-badge.disconnected { background: #fef2f2; color: #991b1b; }
.auth-dot { width: 8px; height: 8px; border-radius: 50%; }
.connected .auth-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
.disconnected .auth-dot { background: var(--danger); }

/* ============= NAVIGATION TABS ============= */
.nav-tabs { display: flex; gap: 4px; margin-bottom: 24px; background: var(--card); border-radius: var(--radius); padding: 4px; box-shadow: var(--shadow); overflow-x: auto; }
.nav-tab { padding: 10px 20px; border: none; background: transparent; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-radius: var(--radius-sm); transition: all var(--transition); white-space: nowrap; font-family: inherit; }
.nav-tab:hover { background: var(--primary-bg); color: var(--primary); }
.nav-tab.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(3,105,161,0.3); }

/* ============= BUTTONS ============= */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; border: none; cursor: pointer; transition: all var(--transition); text-decoration: none; white-space: nowrap; font-family: inherit; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(3,105,161,0.3); }
.btn-primary:hover { background: #02609a; box-shadow: 0 4px 12px rgba(3,105,161,0.4); }
.btn-search { background: var(--primary-light); color: #fff; padding: 10px 28px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-search:hover { background: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-muted); padding: 8px 14px; }
.btn-ghost:hover { background: var(--border); color: var(--text); }
.btn-email { background: var(--primary); color: #fff; }
.btn-email:hover { background: #02609a; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { background: #20bd5a; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ============= SEARCH ============= */
.search-section { margin-bottom: 36px; }
.search-box { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-md); }
.search-input-wrap { display: flex; align-items: center; border: 2px solid var(--border); border-radius: var(--radius-sm); transition: border-color var(--transition); overflow: hidden; }
.search-input-wrap:focus-within { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(14,165,233,0.15); }
.search-icon { margin: 0 12px; color: var(--text-muted); flex-shrink: 0; }
.search-input-wrap input { flex: 1; border: none; outline: none; padding: 14px 0; font-size: 16px; font-family: inherit; color: var(--text); background: transparent; }
.search-input-wrap input::placeholder { color: #94a3b8; }
.search-hint { margin-top: 10px; font-size: 13px; color: var(--text-muted); }

/* ============= SECTIONS ============= */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.section-header h2 { font-size: 20px; font-weight: 700; }
.section-header-actions { display: flex; gap: 10px; align-items: center; }
.results-section { margin-bottom: 36px; }

/* ============= FILES GRID ============= */
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.file-card { background: var(--card); border-radius: var(--radius); padding: 20px; cursor: pointer; border: 2px solid transparent; box-shadow: var(--shadow); transition: all var(--transition); position: relative; overflow: hidden; }
.file-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--primary-light), var(--accent)); opacity: 0; transition: opacity var(--transition); }
.file-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.file-card:hover::before { opacity: 1; }
.file-card .file-icon { font-size: 28px; margin-bottom: 10px; display: block; }
.file-card .file-name { font-weight: 600; font-size: 15px; color: var(--text); line-height: 1.4; margin-bottom: 6px; word-break: break-word; }
.file-card .file-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; align-items: center; }
.file-card .file-folder { display: inline-block; background: var(--primary-bg); color: var(--primary); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; margin-top: 8px; }

.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }

/* ============= MODAL ============= */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); }
.modal-content { position: relative; background: var(--card); border-radius: 16px; width: 90%; max-width: 760px; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: modalIn 0.3s ease; }
.modal-sm { max-width: 480px; }
.modal-lg { max-width: 900px; }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 18px; font-weight: 700; }
.modal-close { width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--bg); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: all var(--transition); }
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; align-items: center; flex-wrap: wrap; }
.modal-header-actions { display: flex; align-items: center; gap: 8px; }

/* ============= PREVIEW CONTENT ============= */
.preview-content { font-size: 14px; line-height: 1.7; color: var(--text); }
.preview-content h1, .preview-content h2, .preview-content h3 { color: var(--primary); margin: 16px 0 8px; }
.preview-content ul, .preview-content ol { padding-left: 20px; margin: 8px 0; }
.preview-content li { margin: 4px 0; }
.preview-content table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.preview-content table th, .preview-content table td { padding: 8px 12px; border: 1px solid var(--border); text-align: left; }
.preview-content table th { background: var(--primary-bg); font-weight: 600; color: var(--primary); }
.preview-content p { margin: 8px 0; }
.preview-raw { white-space: pre-wrap; font-family: 'Inter', sans-serif; background: var(--bg); padding: 20px; border-radius: var(--radius-sm); }

/* ============= SEND OPTIONS ============= */
.send-options { width: 100%; }
.send-options h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.send-form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: flex; gap: 10px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.send-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.input { padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; color: var(--text); transition: border-color var(--transition); width: 100%; }
.input:focus { outline: none; border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(14,165,233,0.15); }

/* ============= TOAST ============= */
.toast { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); padding: 12px 24px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; z-index: 2000; box-shadow: var(--shadow-lg); animation: toastIn 0.3s ease; }
.toast.success { background: #065f46; color: #fff; }
.toast.error { background: #991b1b; color: #fff; }
.toast.info { background: var(--primary); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ============= LOADING ============= */
.loading-spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { text-align: center; padding: 40px; color: var(--text-muted); }
.skeleton { background: linear-gradient(90deg, var(--border) 25%, #f1f5f9 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============= AI SECTION ============= */
.ai-section { margin-bottom: 36px; }
.ai-box { background: linear-gradient(135deg, #eff6ff 0%, #fefce8 100%); border: 2px solid #bfdbfe; border-radius: var(--radius); padding: 24px; }
.ai-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.ai-icon { font-size: 32px; }
.ai-header h2 { font-size: 20px; font-weight: 800; color: var(--primary); }
.ai-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.ai-form { display: flex; flex-direction: column; gap: 12px; }
.ai-form-row { display: flex; gap: 12px; }
.ai-days-input { max-width: 90px; }
.btn-ai { background: linear-gradient(135deg, #7c3aed, #2563eb); color: #fff; padding: 12px 28px; box-shadow: 0 2px 10px rgba(124,58,237,0.3); align-self: flex-start; }
.btn-ai:hover { box-shadow: 0 4px 16px rgba(124,58,237,0.4); }
.btn-ai-sm { display: inline-flex; align-items: center; gap: 4px; padding: 6px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; border: none; cursor: pointer; transition: all var(--transition); background: linear-gradient(135deg, #7c3aed, #2563eb); color: #fff; }
.btn-ai-sm:hover { box-shadow: 0 2px 8px rgba(124,58,237,0.3); }
.btn-ai-sm:disabled { opacity: 0.5; cursor: not-allowed; }
.ai-result { margin-top: 20px; background: var(--card); border-radius: var(--radius-sm); padding: 24px; border: 1px solid var(--border); max-height: 500px; overflow-y: auto; }
.ai-result h2, .ai-result h3 { color: var(--primary); margin: 14px 0 8px; }
.ai-result ul, .ai-result ol { padding-left: 20px; margin: 8px 0; }
.ai-result li { margin: 4px 0; }
.ai-result p { margin: 8px 0; }
.ai-result-actions { display: flex; gap: 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }

/* ============= PASTE & ORGANIZE ============= */
.paste-section { margin-bottom: 36px; }
.paste-box { background: linear-gradient(135deg, #fdf2f8 0%, #eff6ff 100%); border: 2px solid #e9d5ff; border-radius: var(--radius); padding: 24px; }
.paste-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.paste-icon { font-size: 32px; }
.paste-header h2 { font-size: 20px; font-weight: 800; color: var(--primary); }
.paste-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.paste-form { display: flex; flex-direction: column; gap: 12px; }
.paste-textarea { resize: vertical; min-height: 140px; font-family: inherit; line-height: 1.6; white-space: pre-wrap; }

/* ============= FEATURES INTRODUCTION ============= */
.features-section { margin-bottom: 36px; }
.features-box { background: linear-gradient(135deg, #fef3c7 0%, #fce7f3 50%, #ede9fe 100%); border: 2px solid #fbbf24; border-radius: var(--radius); padding: 28px; }
.features-header { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.features-icon { font-size: 32px; }
.features-header h2 { font-size: 20px; margin: 0; color: var(--text); }
.features-subtitle { font-size: 14px; color: var(--text-muted); margin: 4px 0 0; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.feature-card { background: rgba(255,255,255,0.85); border-radius: var(--radius-sm); padding: 18px; border: 1px solid rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; }
.feature-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.feature-icon { font-size: 26px; display: block; margin-bottom: 8px; }
.feature-card h3 { font-size: 15px; font-weight: 700; margin: 0 0 6px; color: var(--text); }
.feature-card p { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.features-footer { text-align: center; padding: 14px 20px; background: rgba(255,255,255,0.7); border-radius: var(--radius-sm); font-size: 14px; color: var(--text-muted); }
.features-footer strong { color: var(--text); }

/* ============= BRANCH INSIGHTS ============= */
.branch-section { margin-bottom: 36px; }
.branch-box { background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%); border: 2px solid #a7f3d0; border-radius: var(--radius); padding: 24px; }
.branch-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.branch-icon { font-size: 32px; }
.branch-header h2 { font-size: 20px; font-weight: 800; color: var(--primary); }
.branch-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.branch-layout { display: flex; gap: 24px; align-items: flex-start; }
.branch-select-wrap { flex: 0 0 280px; display: flex; flex-direction: column; gap: 8px; }
.branch-select-wrap label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.branch-dropdown { padding: 12px 14px; font-size: 14px; appearance: auto; cursor: pointer; background: var(--card); }
.branch-insight { flex: 1; min-width: 0; }
.insight-card { background: var(--card); border-radius: var(--radius-sm); padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.insight-table { display: flex; flex-direction: column; margin-bottom: 14px; }
.insight-table-header { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); padding: 0 0 8px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.insight-table-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
.insight-table-row:last-child { border-bottom: none; }
.insight-dest { font-size: 15px; font-weight: 700; color: var(--primary); }
.insight-period { font-size: 14px; color: var(--text); }
.insight-pkg { font-size: 14px; color: var(--text); font-weight: 600; }
.dest-rank { color: var(--text-muted); font-weight: 600; font-size: 13px; }
.insight-tip { font-size: 13px; color: var(--text-muted); background: var(--primary-bg); padding: 10px 14px; border-radius: var(--radius-sm); border-left: 3px solid var(--primary-light); line-height: 1.5; }
.insight-animate { animation: insightSlideIn 0.35s ease; }
@keyframes insightSlideIn { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

/* ============= CLIENTS ============= */
.clients-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.client-card { background: var(--card); border-radius: var(--radius); padding: 16px; cursor: pointer; border: 2px solid transparent; box-shadow: var(--shadow); transition: all var(--transition); display: flex; gap: 14px; align-items: center; }
.client-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); }
.client-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.client-avatar-lg { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 24px; flex-shrink: 0; }
.client-info { flex: 1; min-width: 0; }
.client-card-name { font-weight: 700; font-size: 15px; }
.client-card-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; }
.client-card-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.client-detail-header { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.client-prefs { font-size: 12px; color: var(--text-muted); background: var(--primary-bg); padding: 4px 8px; border-radius: 4px; margin-top: 4px; display: inline-block; }
.client-search-wrap { display: flex; gap: 4px; }

/* ============= TIMELINE ============= */
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline-item { display: flex; gap: 12px; padding: 12px; background: var(--bg); border-radius: var(--radius-sm); }
.timeline-badge { width: 36px; height: 36px; border-radius: 50%; background: var(--primary-bg); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.timeline-content { flex: 1; }
.timeline-title { font-weight: 600; font-size: 14px; }
.timeline-detail { font-size: 12px; color: var(--text-muted); }
.timeline-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.empty-timeline { text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px; }

/* ============= TEMPLATES ============= */
.templates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.template-card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); transition: all var(--transition); border: 2px solid transparent; }
.template-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); }
.template-emoji { font-size: 36px; margin-bottom: 8px; }
.template-card-name { font-weight: 700; font-size: 16px; margin-bottom: 4px; }
.template-card-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 10px; margin-bottom: 8px; }
.template-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.template-tag { background: var(--primary-bg); color: var(--primary); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.template-card-footer { display: flex; justify-content: space-between; align-items: center; }
.template-usage { font-size: 12px; color: var(--text-muted); }

/* ============= BOOKINGS ============= */
.bookings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.booking-card { background: var(--card); border-radius: var(--radius); padding: 16px; cursor: pointer; box-shadow: var(--shadow); transition: all var(--transition); border: 2px solid transparent; }
.booking-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); }
.booking-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.booking-card-name { font-weight: 700; font-size: 15px; }
.booking-card-meta { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; }
.booking-badge { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.booking-status-draft { background: #f1f5f9; color: #475569; }
.booking-status-partial { background: #fef3c7; color: #92400e; }
.booking-status-confirmed { background: #d1fae5; color: #065f46; }
.booking-status-cancelled { background: #fee2e2; color: #991b1b; }
.booking-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.booking-items { display: flex; flex-direction: column; gap: 12px; }
.booking-item { background: var(--bg); border-radius: var(--radius-sm); padding: 14px; }
.booking-item-main { display: flex; justify-content: space-between; margin-bottom: 8px; }
.booking-item-desc { font-weight: 600; }
.booking-item-type { font-size: 12px; color: var(--text-muted); background: var(--primary-bg); padding: 2px 8px; border-radius: 4px; }
.booking-item-details { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; margin-bottom: 8px; }
.booking-item-status { display: flex; gap: 8px; align-items: center; }
.booking-status-select { width: 120px; padding: 6px 8px; font-size: 12px; }

/* ============= PRICING ============= */
.pricing-section-modal { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.pricing-section-modal h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; color: var(--primary); }
.pricing-controls { margin-bottom: 16px; }
.pricing-row { display: grid; grid-template-columns: 2fr 1fr 1fr 60px 1fr 40px; gap: 8px; align-items: center; margin-bottom: 6px; }
.pricing-header-row { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.pricing-row .input { padding: 6px 8px; font-size: 13px; }
.pricing-line-total { font-weight: 600; text-align: right; font-size: 13px; }
.pricing-summary { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.pricing-summary-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pricing-totals { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 8px; }
.pricing-total-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.pricing-grand-total { font-weight: 700; font-size: 16px; border-top: 2px solid var(--primary); padding-top: 8px; margin-top: 4px; color: var(--primary); }

/* ============= ANALYTICS ============= */
.analytics-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.analytics-card { background: var(--card); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); }
.analytics-card-value { font-size: 32px; font-weight: 800; color: var(--primary); }
.analytics-card-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.analytics-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.chart-card { background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.chart-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 12px; }
.chart-container { height: 280px; position: relative; }
.analytics-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.analytics-table th, .analytics-table td { padding: 10px 12px; border: 1px solid var(--border); text-align: left; }
.analytics-table th { background: var(--primary-bg); font-weight: 600; color: var(--primary); }

/* ============= RESPONSIVE ============= */
@media (max-width: 768px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-summary { grid-template-columns: repeat(2, 1fr); }
  .analytics-charts { grid-template-columns: 1fr; }
  .pricing-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .header { flex-direction: column; align-items: flex-start; }
  .header-actions { width: 100%; justify-content: space-between; }
  .files-grid { grid-template-columns: 1fr; }
  .send-buttons { flex-direction: column; }
  .modal-content { width: 95%; margin: 10px; }
  .logo h1 { font-size: 22px; }
  .nav-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .features-grid { grid-template-columns: 1fr; }
  .analytics-summary { grid-template-columns: 1fr 1fr; }
  .branch-layout { flex-direction: column; }
  .branch-select-wrap { flex: none; width: 100%; }
}
@media (max-width: 480px) {
  .analytics-summary { grid-template-columns: 1fr; }
  .activity-summary { grid-template-columns: 1fr 1fr; }
}

/* ============= ADMIN PANEL ============= */

.admin-subtabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 2px solid var(--border); padding-bottom: 8px; }
.admin-subtab { padding: 8px 18px; border: none; background: none; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-muted); border-radius: var(--radius-sm) var(--radius-sm) 0 0; transition: var(--transition); font-family: inherit; }
.admin-subtab:hover { background: var(--primary-bg); color: var(--primary); }
.admin-subtab.active { background: var(--primary); color: white; }

.admin-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.admin-toolbar h3 { font-size: 16px; font-weight: 600; }

/* Admin Table */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table thead th { background: var(--primary-bg); color: var(--primary); padding: 10px 12px; text-align: left; font-weight: 600; white-space: nowrap; border-bottom: 2px solid var(--border); }
.admin-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tbody tr:hover { background: #f8faff; }
.admin-table tbody tr.row-inactive { opacity: 0.5; background: #fef2f2; }

.agent-info { display: flex; flex-direction: column; }
.agent-info strong { font-size: 13px; }
.agent-info small { color: var(--text-muted); font-size: 11px; }

/* Role Badge */
.role-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.role-admin { background: #ede9fe; color: #7c3aed; }
.role-agent { background: #ecfdf5; color: #059669; }
.role-super_admin { background: #fef3c7; color: #b45309; }

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; margin-right: 6px; vertical-align: middle; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #cbd5e1; transition: 0.3s; border-radius: 22px; }
.toggle-slider:before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: white; transition: 0.3s; border-radius: 50%; }
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(18px); }
.toggle-switch input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

.status-text { font-size: 11px; font-weight: 500; }
.status-active { color: var(--success); }
.status-inactive { color: var(--danger); }

/* Permissions Checkboxes */
.perms-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.perm-check { display: flex; align-items: center; gap: 3px; font-size: 11px; cursor: pointer; white-space: nowrap; }
.perm-check input { width: 14px; height: 14px; accent-color: var(--primary); }
.perm-check span { color: var(--text-muted); }

/* Activity Summary Cards */
.activity-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.activity-card { background: var(--card); border-radius: var(--radius); padding: 20px; text-align: center; box-shadow: var(--shadow); border-left: 4px solid transparent; }
.activity-card-blue { border-left-color: var(--primary); }
.activity-card-green { border-left-color: var(--success); }
.activity-card-red { border-left-color: var(--danger); }
.activity-card-purple { border-left-color: #7c3aed; }
.activity-card-value { font-size: 28px; font-weight: 800; color: var(--text); }
.activity-card-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* Activity Filters */
.activity-filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.activity-filters .input { max-width: 200px; padding: 6px 10px; font-size: 13px; }

/* Admin Section Block */
.admin-section-block { margin-bottom: 28px; }
.admin-section-block h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: var(--text); }

/* Action Badges */
.action-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.action-login { background: #ecfdf5; color: #059669; }
.action-logout { background: #f0f9ff; color: #0369a1; }
.action-failed { background: #fef2f2; color: #dc2626; }
.action-blocked { background: #fffbeb; color: #d97706; }

.audit-type { font-size: 12px; font-weight: 500; text-transform: capitalize; }

.btn-xs { padding: 4px 8px; font-size: 12px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.text-muted { color: var(--text-muted); font-size: 13px; }

@media (max-width: 768px) {
  .activity-summary { grid-template-columns: 1fr 1fr; }
  .admin-table { font-size: 12px; }
  .perms-cell { flex-direction: column; }
  .query-stats { grid-template-columns: repeat(3, 1fr); }
  .query-filters { flex-direction: column; }
  .query-filters .input { max-width: 100%; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
}

/* ============= QUERY DESK ============= */

/* Query Stats */
.query-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }
.query-stat-card { background: var(--card); border-radius: var(--radius-sm); padding: 16px; text-align: center; box-shadow: var(--shadow); border-top: 3px solid transparent; }
.stat-new { border-top-color: #3b82f6; }
.stat-progress { border-top-color: #f59e0b; }
.stat-quoted { border-top-color: #10b981; }
.stat-confirmed { border-top-color: #059669; }
.stat-urgent { border-top-color: #ef4444; }
.query-stat-value { font-size: 24px; font-weight: 800; }
.query-stat-label { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }

/* Query Filters */
.query-filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.query-filters .input { max-width: 180px; padding: 6px 10px; font-size: 13px; }

/* Query Cards */
.query-list { display: flex; flex-direction: column; gap: 12px; }
.query-card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); cursor: pointer; transition: var(--transition); border-left: 4px solid var(--border); }
.query-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.query-card.query-urgent { border-left-color: #ef4444; background: #fffbfb; }
/* Workflow spec — unread state. Bold + slight tint so newly-active
   queries stand out without colliding with the high-priority style. */
.query-card.query-unread { border-left-color: #0369a1; background: #f0f9ff; }
.query-card.query-unread .query-number,
.query-card.query-unread .query-dest { font-weight: 800; color: #0c4a6e; }
.query-card.query-unread.query-urgent { border-left-color: #dc2626; background: #fff1f2; }

.query-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.query-number { font-weight: 700; font-size: 13px; color: var(--primary); font-family: monospace; }

.query-status-badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.status-new { background: #dbeafe; color: #2563eb; }
.status-received { background: #e0f2fe; color: #0284c7; }
.status-in_progress { background: #fef3c7; color: #d97706; }
.status-quoted { background: #d1fae5; color: #059669; }
.status-confirmed { background: #ecfdf5; color: #047857; }
.status-closed { background: #f1f5f9; color: #64748b; }

.priority-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; }
.priority-badge.priority-high, .priority-badge.priority-urgent { background: #fef2f2; color: #dc2626; }
.priority-badge.priority-medium { background: #fffbeb; color: #d97706; }
.priority-badge.priority-low { background: #f0f9ff; color: #0284c7; }
.priority-label { font-size: 11px; font-weight: 600; }
.priority-label.priority-high { color: #dc2626; }
.priority-label.priority-medium { color: #d97706; }
.priority-label.priority-low { color: #0284c7; }

/* Stage badges */
.query-stage-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.stage-enquiry { background: #eff6ff; color: #2563eb; }
.stage-confirmed { background: #f0fdf4; color: #16a34a; }
.stage-closed { background: #f1f5f9; color: #64748b; }

/* TAT badges */
.tat-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; }
.tat-ok { background: #f0fdf4; color: #16a34a; }
.tat-warning { background: #fffbeb; color: #d97706; }
.tat-overdue { background: #fef2f2; color: #dc2626; animation: pulse-red 1.5s infinite; }
@keyframes pulse-red { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* Status badges v2 */
.status-new_enquiry { background: #e0f2fe; color: #0369a1; }
.status-acknowledged_pending { background: #fef3c7; color: #b45309; }
.status-partially_resolved { background: #fce7f3; color: #be185d; }
.status-resolved { background: #dcfce7; color: #15803d; }

/* Contact card in msg */
.msg-contact { font-size: 11px; color: #0369a1; }

.query-card-body { margin-bottom: 8px; }
.query-dest { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.query-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.query-info-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; margin-bottom: 4px; }
.query-agent { color: var(--text-muted); }
.query-assigned { color: var(--primary); }
.query-unassigned { color: var(--danger); font-style: italic; font-size: 12px; }
.query-client { font-size: 12px; color: var(--text-muted); }
.query-type-label { font-size: 12px; font-weight: 500; }

.query-card-footer { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 8px; margin-top: 4px; }

/* Form Rows */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }

/* Query Detail */
.query-detail-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.query-detail-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.query-detail-actions { display: flex; gap: 8px; align-items: center; }
.query-status-select { padding: 4px 8px; font-size: 12px; max-width: 150px; }

.query-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin-bottom: 20px; background: var(--primary-bg); border-radius: var(--radius-sm); padding: 16px; }
.qd-row { display: flex; flex-direction: column; }
.qd-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.qd-value { font-size: 14px; font-weight: 500; }

.query-requirements { margin-bottom: 20px; }
.query-requirements h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.query-requirements p { background: #f8fafc; border-radius: var(--radius-sm); padding: 12px; font-size: 13px; line-height: 1.6; border: 1px solid var(--border); }

.query-pricing { margin-bottom: 20px; background: #f0fdf4; border-radius: var(--radius-sm); padding: 16px; border: 1px solid #bbf7d0; }
.query-pricing h4 { margin-bottom: 8px; }
.query-pricing pre { font-size: 12px; white-space: pre-wrap; }

/* Query Thread */
.query-thread { margin-top: 20px; }
.query-thread h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.query-messages { max-height: 400px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; padding: 12px; background: #f8fafc; border-radius: var(--radius-sm); border: 1px solid var(--border); }

.query-msg { padding: 10px 14px; border-radius: var(--radius-sm); max-width: 85%; }
.msg-branch { background: white; border: 1px solid var(--border); align-self: flex-start; }
.msg-central { background: #eff6ff; border: 1px solid #bfdbfe; align-self: flex-end; }

.msg-header { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.msg-header strong { font-size: 13px; }
.msg-role { font-size: 10px; padding: 1px 6px; border-radius: 8px; background: #f1f5f9; color: var(--text-muted); }
.msg-time { font-size: 10px; color: var(--text-muted); margin-left: auto; }
.msg-body { font-size: 13px; line-height: 1.5; }
.msg-attachments { margin-top: 6px; font-size: 11px; color: var(--primary); }

.query-reply { display: flex; flex-direction: column; gap: 8px; }
.query-reply textarea { font-family: inherit; }
.query-reply-actions { display: flex; gap: 8px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 48px; margin-bottom: 12px; }

/* ====== DMC RATES ====== */
.dmc-badge { font-size: 11px; padding: 3px 10px; border-radius: 12px; font-weight: 600; }
.dmc-connected { background: #d4edda; color: #155724; }
.dmc-disconnected { background: #f8d7da; color: #721c24; }

.dmc-search-bar { background: var(--glass-bg); border-radius: 12px; padding: 20px; margin-bottom: 16px; border: 1px solid var(--glass-border); }
.dmc-search-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.dmc-field { flex: 1; min-width: 180px; position: relative; }
.dmc-field-sm { flex: 0 0 100px; min-width: 100px; }
.dmc-field label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.dmc-field input, .dmc-field select { width: 100%; padding: 10px 12px; border: 1px solid var(--glass-border); border-radius: 8px; font-size: 14px; background: white; }
.dmc-field input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(0,102,204,0.1); }

.dmc-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: white; border: 1px solid var(--glass-border); border-radius: 8px; max-height: 250px; overflow-y: auto; z-index: 100; box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.dmc-dropdown-item { padding: 10px 14px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #f0f0f0; }
.dmc-dropdown-item:hover { background: #f0f7ff; }
.dmc-dropdown-item:last-child { border-bottom: none; }
.dmc-city-services { font-size: 12px; }
.dmc-no-results { color: var(--text-muted); font-style: italic; cursor: default; }

.dmc-summary { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 13px; color: var(--text-muted); }
.dmc-pagination { display: flex; gap: 4px; }
.dmc-pagination button { padding: 4px 10px; border: 1px solid var(--glass-border); border-radius: 6px; background: white; cursor: pointer; font-size: 12px; }
.dmc-pagination button.active { background: var(--primary); color: white; border-color: var(--primary); }
.dmc-pagination button:hover:not(.active) { background: #f0f7ff; }

.dmc-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.dmc-hotel-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; padding: 18px; cursor: pointer; transition: all 0.2s; }
.dmc-hotel-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.08); border-color: var(--primary); }
.dmc-hotel-stars { color: #f5a623; font-size: 14px; margin-bottom: 6px; }
.dmc-hotel-name { font-size: 15px; font-weight: 600; margin: 0 0 6px; line-height: 1.3; }
.dmc-hotel-address { font-size: 12px; color: var(--text-muted); margin: 0 0 10px; line-height: 1.4; max-height: 34px; overflow: hidden; }
.dmc-hotel-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11px; color: var(--text-secondary); margin-bottom: 10px; }
.dmc-hotel-meta span { white-space: nowrap; }

.dmc-loading { text-align: center; padding: 60px 20px; grid-column: 1 / -1; }
.dmc-loading .spinner { width: 32px; height: 32px; border: 3px solid #e0e0e0; border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

.dmc-empty { text-align: center; padding: 60px 20px; color: var(--text-muted); grid-column: 1 / -1; }
.dmc-empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }

/* DMC Detail Modal */
.modal-lg { max-width: 800px; }
.dmc-detail-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.dmc-gallery-img { width: 100%; height: 140px; object-fit: cover; border-radius: 8px; }
.dmc-detail-info { }
.dmc-detail-stars { color: #f5a623; font-size: 16px; margin-bottom: 8px; font-weight: 600; }
.dmc-detail-address { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.dmc-detail-desc { margin-bottom: 16px; }
.dmc-detail-desc h4, .dmc-detail-contact h4, .dmc-detail-facilities h4, .dmc-detail-map h4 { font-size: 13px; text-transform: uppercase; color: var(--text-muted); margin: 0 0 6px; }
.dmc-detail-desc p { font-size: 13px; line-height: 1.5; color: var(--text-primary); }
.dmc-detail-contact { margin-bottom: 16px; }
.dmc-detail-contact p { font-size: 13px; margin: 2px 0; }
.dmc-detail-facilities { margin-bottom: 16px; }
.dmc-facilities-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.dmc-facility-tag { background: #f0f7ff; color: var(--primary); padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 500; }
.dmc-detail-map { margin-bottom: 8px; }
.dmc-detail-map p { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }

/* DMC Star Categories */
.dmc-star-category { grid-column: 1 / -1; margin-bottom: 20px; }
.dmc-star-header { font-size: 16px; color: #f5a623; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 2px solid #f5a623; }
.dmc-star-count { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.dmc-star-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }

/* DMC Price Cards */
.dmc-card-top { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; flex-wrap: wrap; }
.dmc-deal-badge { background: #ff6b35; color: white; font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.dmc-refund-badge { background: #d4edda; color: #155724; font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.dmc-hotel-board { font-size: 12px; color: var(--primary); margin: 0 0 8px; font-weight: 500; }
.dmc-card-actions { display: flex; gap: 6px; margin-top: 10px; }
.dmc-card-actions .btn { font-size: 12px; padding: 4px 12px; }
.dmc-price-box { background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%); border-radius: 8px; padding: 10px 14px; margin-top: 10px; }
.dmc-price-main { font-size: 20px; font-weight: 700; color: #0066cc; }
.dmc-price-detail { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

@media (max-width: 768px) {
  .dmc-search-row { flex-direction: column; }
  .dmc-field, .dmc-field-sm { min-width: 100% !important; flex: 1 !important; }
  .dmc-results { grid-template-columns: 1fr; }
  .dmc-detail-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ============= SETTINGS / MASTERS ============= */
.settings-subtab-content { margin-top: 16px; }
.master-list { display: flex; flex-direction: column; gap: 12px; }
.master-card { display: flex; align-items: center; gap: 16px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; padding: 18px 20px; cursor: pointer; transition: all 0.2s; }
.master-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.06); transform: translateX(4px); }
.master-card-icon { font-size: 32px; }
.master-card-info { flex: 1; }
.master-card-name { font-weight: 700; font-size: 16px; color: var(--text); }
.master-card-desc { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.master-card-arrow { font-size: 20px; color: var(--text-muted); }
/* ============= NOTIFICATIONS & PROFILE ============= */
.notification-bell { position: relative; cursor: pointer; font-size: 20px; padding: 4px 8px; }
.notification-count { position: absolute; top: -2px; right: -2px; background: #dc2626; color: #fff; font-size: 10px; font-weight: 700; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.notification-panel { position: absolute; top: 60px; right: 100px; width: 340px; background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.15); z-index: 1000; max-height: 400px; overflow-y: auto; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--glass-border); }
.notif-item { padding: 10px 16px; border-bottom: 1px solid var(--glass-border); cursor: pointer; font-size: 13px; transition: background 0.2s; }
.notif-item:hover { background: var(--primary-bg); }
.notif-warning { border-left: 3px solid #f59e0b; }
.notif-danger { border-left: 3px solid #dc2626; }
.notif-info { border-left: 3px solid #3b82f6; }
.profile-dropdown-wrap { position: relative; }
.profile-dropdown { position: absolute; top: 40px; right: 0; width: 240px; background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.15); z-index: 1000; padding: 12px 0; }
.profile-info { padding: 8px 16px; }
.profile-link { display: block; padding: 8px 16px; font-size: 13px; color: var(--text); cursor: pointer; transition: background 0.2s; text-decoration: none; }
.profile-link:hover { background: var(--primary-bg); }

/* ============= HOME DASHBOARD ============= */
.home-welcome { background: linear-gradient(135deg, #0369a1, #0ea5e9); border-radius: 16px; padding: 28px 32px; color: #fff; margin-bottom: 24px; }
.home-welcome h2 { margin: 0 0 4px; font-size: 22px; }
.home-welcome p { margin: 0; font-size: 14px; opacity: 0.9; }
.home-quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 28px; }
.home-action-tile { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; padding: 20px 16px; text-align: center; cursor: pointer; transition: all 0.2s; }
.home-action-tile:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.home-action-icon { display: block; font-size: 28px; margin-bottom: 8px; }
.home-action-label { font-size: 13px; font-weight: 600; color: var(--text); }
.home-summary-section { margin-bottom: 28px; }
.home-summary-section h3 { margin: 0 0 14px; font-size: 17px; }
.home-summary-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.home-summary-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; padding: 18px; text-align: center; cursor: pointer; transition: all 0.2s; }
.home-summary-card:hover { border-color: var(--primary); }
.home-summary-value { font-size: 28px; font-weight: 700; color: var(--primary); }
.home-summary-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.home-summary-alert { border-color: #fca5a5; }
.home-summary-alert .home-summary-value { color: #dc2626; }
.home-templates-section { margin-bottom: 24px; }
.home-templates-section h3 { margin: 0; font-size: 17px; }

.client-type-badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 10px; background: var(--primary-bg); color: var(--primary); font-weight: 600; margin-top: 2px; }

/* ============= QUOTATION ============= */
.qt-section { margin-bottom: 20px; }
.qt-section h4 { margin: 0 0 12px; color: var(--primary); font-size: 15px; }
.qt-pricing-bar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.qt-pricing-bar .form-group { flex: 1; min-width: 100px; }
.qt-line-item { background: var(--bg); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; position: relative; }
.qt-line-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 6px; }
.qt-line-row .form-group { margin-bottom: 0; }
.qt-line-row .form-group label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; }
.qt-line-row .form-group input, .qt-line-row .form-group select { padding: 6px 8px; font-size: 13px; }
.qt-calculated { padding: 7px 0; font-weight: 700; color: var(--primary); font-size: 14px; }
.qt-total { color: #065f46; }
.qt-remove-btn { position: absolute; top: 8px; right: 8px; color: #dc2626 !important; }
.qt-totals { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; padding: 16px 20px; margin: 16px 0; }
.qt-totals-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--text-muted); }
.qt-totals-row span:last-child { font-weight: 600; color: var(--text); }
.qt-grand-total { font-size: 18px; border-top: 2px solid var(--primary); padding-top: 12px; margin-top: 8px; }
.qt-grand-total span { color: var(--primary) !important; font-weight: 700 !important; }
.qt-internal { font-size: 12px; opacity: 0.7; }
.qt-margin { font-size: 13px; color: #065f46; }
.qt-margin span:last-child { color: #065f46 !important; }

/* ============= REPORTS ============= */
/* Booking Margin */
.booking-margin-bar { display: flex; gap: 20px; flex-wrap: wrap; background: linear-gradient(135deg, #f0fdf4, #ecfdf5); border: 1px solid #86efac; border-radius: 12px; padding: 16px 20px; margin: 16px 0; }
.booking-margin-item { text-align: center; flex: 1; min-width: 100px; }
.booking-margin-label { display: block; font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; }
.booking-margin-value { display: block; font-size: 18px; font-weight: 700; color: #0369a1; margin-top: 4px; }

.report-toolbar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.report-table-wrap { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report-table th { text-align: left; padding: 10px 12px; background: var(--primary-bg); font-size: 11px; text-transform: uppercase; color: var(--primary); letter-spacing: 0.5px; border-bottom: 2px solid var(--glass-border); white-space: nowrap; }
.report-table td { padding: 8px 12px; border-bottom: 1px solid var(--glass-border); }
.report-table tbody tr:hover { background: var(--primary-bg); }
.report-footer { text-align: right; padding: 8px 12px; font-size: 12px; color: var(--text-muted); }
.reports-subtab { padding: 8px 18px; border: none; background: var(--bg); border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-muted); transition: all 0.2s; margin-right: 8px; }
.reports-subtab.active { background: var(--primary); color: #fff; }

.settings-subtab { padding: 8px 18px; border: none; background: var(--bg); border-radius: 8px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--text-muted); transition: all 0.2s; margin-right: 8px; }
.settings-subtab.active { background: var(--primary); color: #fff; }

/* ============= BOOKING ENHANCEMENTS ============= */
.booking-filters { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.booking-filters .input { max-width: 200px; }
.booking-item-icon { font-size: 18px; margin-right: 8px; }
.booking-status-assigned { background: #dbeafe; color: #1e40af; }
.booking-status-in_progress { background: #fef3c7; color: #92400e; }
.booking-status-quoted { background: #dbeafe; color: #1e40af; }
.booking-status-closed { background: #f1f5f9; color: #475569; }
.booking-primary-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin: 12px 0; padding: 16px 20px; background: linear-gradient(135deg, #0369a1, #0ea5e9); border-radius: 12px; }
.booking-primary-actions .btn { font-weight: 600; }
.booking-primary-actions-left { display: flex; gap: 10px; flex-wrap: wrap; }
.booking-primary-actions-right { display: flex; gap: 8px; }
.booking-quote-sent-banner { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; border-radius: 8px; padding: 10px 16px; margin: 0 0 12px; font-size: 13px; }
.booking-summary-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 16px 0; }
.booking-summary-item { background: var(--bg); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.booking-summary-label { display: block; font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.booking-summary-value { display: block; font-weight: 600; }
.booking-type-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.booking-type-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-bg); border-radius: 20px; padding: 6px 14px; font-size: 13px; }
.booking-type-total { font-weight: 700; color: var(--primary); }
.booking-assign-section { background: linear-gradient(135deg, #f0f9ff, #e8f4fd); border-radius: var(--radius-sm); padding: 16px; margin: 16px 0; }
.booking-assign-section h4 { margin: 0 0 12px; color: var(--primary); }
.booking-assign-row { display: flex; gap: 8px; align-items: center; }
.booking-assign-status { margin: 8px 0 0; font-size: 13px; color: var(--text-muted); }
.booking-status-workflow { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; margin: 16px 0; }
.booking-status-workflow h4 { margin: 0 0 12px; }
.booking-status-row { display: flex; gap: 8px; align-items: center; }
.booking-thread { margin: 16px 0; }
.booking-thread h4 { margin: 0 0 12px; }
.quote-mode-options { display: flex; flex-direction: column; gap: 8px; }
.quote-mode-option { cursor: pointer; }
.quote-mode-option input { display: none; }
.quote-mode-card { border: 2px solid var(--glass-border); border-radius: var(--radius-sm); padding: 12px 16px; transition: all 0.2s; }
.quote-mode-card strong { display: block; margin-bottom: 4px; }
.quote-mode-card p { margin: 0; font-size: 12px; color: var(--text-muted); }
.quote-mode-option input:checked + .quote-mode-card { border-color: var(--primary); background: var(--primary-bg); }

/* ============= TRACKER ============= */
.tracker-status-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-bottom: 24px; }
.tracker-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; padding: 16px; text-align: center; }
.tracker-card-value { font-size: 28px; font-weight: 700; }
.tracker-card-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.tracker-card-draft .tracker-card-value { color: #475569; }
.tracker-card-assigned .tracker-card-value { color: #1e40af; }
.tracker-card-progress .tracker-card-value { color: #92400e; }
.tracker-card-quoted .tracker-card-value { color: #0369a1; }
.tracker-card-confirmed .tracker-card-value { color: #065f46; }
.tracker-card-overdue { border-color: #fca5a5; background: #fef2f2; }
.tracker-card-overdue .tracker-card-value { color: #dc2626; }
.tracker-card-sent .tracker-card-value { color: #7c3aed; }
.tracker-section { margin-bottom: 28px; }
.tracker-section h3 { margin: 0 0 16px; font-size: 18px; }
.tracker-tat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tracker-tat-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; padding: 18px; }
.tracker-tat-header { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.tracker-tat-sla { font-size: 11px; color: var(--text-muted); margin-bottom: 10px; }
.tracker-tat-value { font-size: 22px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.tat-badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.tat-green { background: #d1fae5; color: #065f46; }
.tat-amber { background: #fef3c7; color: #92400e; }
.tat-red { background: #fee2e2; color: #991b1b; }
.tracker-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tracker-table th { text-align: left; padding: 10px 12px; background: var(--bg); font-size: 11px; text-transform: uppercase; color: var(--text-muted); border-bottom: 2px solid var(--glass-border); }
.tracker-table td { padding: 10px 12px; border-bottom: 1px solid var(--glass-border); }
.tracker-table tbody tr:hover { background: var(--primary-bg); }
.tracker-row-overdue { background: #fff1f2 !important; }
.tracker-quote-summary { display: flex; gap: 20px; margin-bottom: 16px; }
.tracker-quote-stat { text-align: center; padding: 12px 24px; background: var(--glass-bg); border-radius: 10px; border: 1px solid var(--glass-border); }
.tracker-quote-stat strong { display: block; font-size: 24px; color: var(--primary); }
.tracker-quote-stat span { font-size: 12px; color: var(--text-muted); }

/* DMC autocomplete (used inside the Quotation DMC picker) */
.dmc-autocomplete { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); max-height: 240px; overflow-y: auto; z-index: 10; }
.dmc-ac-item { padding: 8px 12px; cursor: pointer; font-size: 14px; border-bottom: 1px solid #f1f5f9; }
.dmc-ac-item:hover { background: #f0f9ff; }
.dmc-ac-item:last-child { border-bottom: none; }
.dmc-ac-empty { padding: 12px; color: #9ca3af; font-size: 13px; text-align: center; }
