/* VaultDrive Cloud — component styles.
 * The site's precompiled Tailwind is content-purged and never scanned VCloud's
 * JS-generated markup, so the app UI is styled here with a self-contained `vc-`
 * layer rather than Tailwind atoms. Mirrors the VaultDrive desktop layout. */

:root {
  --vc-bg: #f8fafc;          /* slate-50 */
  --vc-panel: #ffffff;
  --vc-border: #e2e8f0;      /* slate-200 */
  --vc-text: #0f172a;        /* slate-900 */
  --vc-text-2: #475569;      /* slate-600 */
  --vc-muted: #94a3b8;       /* slate-400 */
  --vc-green: #047857;       /* emerald-700 */
  --vc-green-50: #ecfdf5;
  --vc-green-100: #d1fae5;
  --vc-green-800: #065f46;
  --vc-topbar-h: 60px;
  --vc-sidebar-w: 320px;
}

* { box-sizing: border-box; }

/* Safety net: nothing in this app should ever cause horizontal page scroll. */
html, body { overflow-x: hidden; max-width: 100vw; }
#vc-app, .vc-app { overflow-x: hidden; max-width: 100vw; }

.vc-body { margin: 0; background: var(--vc-bg); color: var(--vc-text); overflow: hidden; }

/* Search back button — hidden except when the mobile search overlay is open. */
.vc-search-back { display: none; background: transparent; border: none; color: #64748b; padding: 8px; cursor: pointer; font-size: 18px; }

/* Scrollbars */
.vc-sidebar::-webkit-scrollbar, .vc-main::-webkit-scrollbar { width: 8px; height: 8px; }
.vc-sidebar::-webkit-scrollbar-thumb, .vc-main::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
.vc-sidebar::-webkit-scrollbar-track, .vc-main::-webkit-scrollbar-track { background: #f1f5f9; }

/* ---------- Layout shell ---------- */
.vc-app { display: flex; flex-direction: column; height: 100vh; }

.vc-header {
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px; height: var(--vc-topbar-h); flex-shrink: 0;
  background: #fff; border-bottom: 1px solid #e2e8f0;
}
.vc-shell { display: flex; flex: 1; overflow: hidden; }

.vc-sidebar {
  width: var(--vc-sidebar-w); flex-shrink: 0;
  background: var(--vc-panel); border-right: 1px solid var(--vc-border);
  overflow-y: auto;
}
.vc-main { flex: 1; overflow-y: auto; background: var(--vc-bg); padding: 20px 24px; }

/* ---------- Top bar bits ---------- */
.vc-menu-toggle { display: none; background: none; border: 0; color: var(--vc-text-2); font-size: 24px; cursor: pointer; padding: 0 4px; line-height: 1; }
.vc-header-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.vc-brand-text { display: flex; flex-direction: column; line-height: 1; }
.vc-brand-name { font-size: 15px; font-weight: 600; color: #0f172a; letter-spacing: -0.2px; }
.vc-brand-sub { font-size: 10px; color: #64748b; letter-spacing: 0.5px; margin-top: 3px; }
.vc-header-divider { width: 1px; height: 24px; background: #e2e8f0; flex-shrink: 0; }

.vc-header-nav { display: flex; gap: 4px; flex-shrink: 0; }
.vc-nav-tab {
  padding: 6px 14px; background: transparent; border: none; border-radius: 8px;
  color: #64748b; font-size: 13px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; transition: all 0.15s;
}
.vc-nav-tab:hover { color: #0f172a; background: #f8fafc; }
.vc-nav-tab-active { background: #f0fdf4; color: #0F6E56; }
.vc-nav-tab-active:hover { background: #dcfce7; }

.vc-header-search { flex: 1; max-width: 400px; }
.vc-search-wrap { position: relative; }
.vc-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 14px; }
.vc-search-wrap input {
  width: 100%; padding: 8px 12px 8px 34px; font-size: 13px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; outline: none;
}
.vc-search-wrap input:focus { background: #fff; border-color: #0F6E56; box-shadow: 0 0 0 3px rgba(15,110,86,0.1); }

.vc-header-user { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-shrink: 0; }
.vc-file-count { font-size: 12px; color: #64748b; white-space: nowrap; }
.vc-avatar { width: 32px; height: 32px; border-radius: 50%; background: #ecfdf5; color: #0F6E56; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; border: 1px solid #d1fae5; }
.vc-logout { color: #64748b; padding: 8px; cursor: pointer; text-decoration: none; transition: color 0.15s; }
.vc-logout:hover { color: #0f172a; }

/* ---------- Sidebar tree ---------- */
.vc-sidebar-label { padding: 12px; font-size: 11px; font-weight: 600; color: var(--vc-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.vc-tree { padding-bottom: 16px; }
.vc-tree-loading, .vc-tree-empty { text-align: center; font-size: 12px; color: var(--vc-muted); padding: 32px 8px; }

.vc-tenant-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; cursor: pointer; user-select: none;
}
.vc-tenant-row:hover { background: var(--vc-bg); }
.vc-caret { color: var(--vc-muted); font-size: 12px; transition: transform 0.15s ease; flex-shrink: 0; width: 12px; text-align: center; }
.vc-tenant-row.vc-expanded .vc-caret { transform: rotate(90deg); }
.vc-tenant-icon { color: var(--vc-green); font-size: 15px; flex-shrink: 0; }
.vc-tenant-meta { flex: 1; min-width: 0; }
.vc-tenant-name { font-size: 13px; font-weight: 600; color: var(--vc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-tenant-code { font-size: 11px; color: var(--vc-muted); }
.vc-count { font-size: 11px; color: var(--vc-muted); flex-shrink: 0; margin-left: auto; }

.vc-cust-list { display: none; }
.vc-cust-list.vc-open { display: block; }
.vc-cust-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 32px; cursor: pointer;
  border-left: 3px solid transparent;
}
.vc-cust-row:hover { background: var(--vc-bg); }
.vc-cust-row.vc-selected { background: var(--vc-green-50); border-left-color: var(--vc-green); }
.vc-cust-icon { color: var(--vc-muted); font-size: 14px; flex-shrink: 0; }
.vc-cust-meta { flex: 1; min-width: 0; }
.vc-cust-name { font-size: 13px; color: var(--vc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-cust-pan { font-size: 11px; color: var(--vc-muted); font-family: ui-monospace, monospace; }

/* ---------- File list ---------- */
.vc-fl-head { margin-bottom: 16px; }
.vc-fl-title { font-size: 18px; font-weight: 600; color: var(--vc-text); }
.vc-fl-crumb { font-size: 13px; color: var(--vc-text-2); margin-top: 2px; }

.vc-table { background: var(--vc-panel); border: 1px solid var(--vc-border); border-radius: 12px; overflow: hidden; }
.vc-tr {
  display: grid;
  grid-template-columns: 1fr 100px 110px 130px 110px 64px;
  align-items: center; gap: 8px;
  padding: 10px 16px; border-bottom: 1px solid var(--vc-border);
}
.vc-tr:last-child { border-bottom: 0; }
.vc-tr-head { background: var(--vc-bg); }
.vc-th { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--vc-muted); }
.vc-tr-data { font-size: 13px; color: var(--vc-text); }
.vc-tr-data:hover { background: var(--vc-bg); }
.vc-cell-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vc-file-icon { font-size: 16px; flex-shrink: 0; }
.vc-file-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-cell-muted { color: var(--vc-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.vc-badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-weight: 600; color: #fff; white-space: nowrap; }
.vc-badge-whatsapp { background: #16a34a; }  /* green */
.vc-badge-email    { background: #2563eb; }  /* blue */
.vc-badge-upload   { background: #7c3aed; }  /* purple */
.vc-badge-other    { background: #64748b; }  /* slate */

.vc-view { color: var(--vc-green); text-decoration: none; font-size: 15px; }
.vc-view:hover { text-decoration: underline; }

.vc-empty { text-align: center; padding: 64px 16px; color: var(--vc-text-2); }
.vc-empty-icon { width: 56px; height: 56px; border-radius: 50%; background: #f1f5f9; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-size: 26px; color: var(--vc-muted); }

/* ---------- Customer profile header ---------- */
.vc-profile-top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.vc-profile-avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--vc-green-100); color: var(--vc-green-800); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex-shrink: 0; }
.vc-profile-meta { min-width: 0; }
.vc-profile-name { font-size: 17px; font-weight: 700; color: var(--vc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-profile-sub { font-size: 13px; color: var(--vc-text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Cards ---------- */
.vc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: stretch; margin-bottom: 20px; }
.vc-card, .vc-card-slot > .vc-card { background: #fff; border: 0.5px solid var(--vc-border); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; height: 100%; }
.vc-card-slot { display: flex; }
.vc-card-slot > .vc-card { flex: 1; }
.vc-card-muted { opacity: 0.6; }
.vc-card-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--vc-text); margin-bottom: 10px; }
.vc-card-icon { font-size: 15px; }
.vc-card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }

.vc-card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.vc-row-label { color: var(--vc-muted); flex-shrink: 0; }
.vc-row-valwrap { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vc-row-val { color: var(--vc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-row-accent { color: var(--vc-green); font-weight: 600; }
.vc-copy { border: 0; background: none; color: var(--vc-muted); cursor: pointer; padding: 2px; font-size: 13px; line-height: 1; flex-shrink: 0; }
.vc-copy:hover { color: var(--vc-green); }

.vc-sendinfo { background: var(--vc-bg); border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--vc-text-2); line-height: 1.6; margin-bottom: 8px; }

/* ---------- Credit card ---------- */
.vc-credit-loading, .vc-credit-empty { font-size: 13px; color: var(--vc-text-2); display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.vc-credit-hint { font-size: 11px; color: var(--vc-muted); }
.vc-spin { display: inline-block; animation: vc-spin 0.9s linear infinite; }
@keyframes vc-spin { to { transform: rotate(360deg); } }
.vc-score { font-size: 32px; font-weight: 800; line-height: 1; }
.vc-score-label { font-size: 12px; font-weight: 600; margin-top: 2px; }
.vc-bureau { display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: 4px; background: var(--vc-green-50); color: var(--vc-green-800); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; }
.vc-report-date { font-size: 11px; color: var(--vc-muted); margin-top: 6px; }
.vc-report-btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 12px; border-radius: 8px; background: var(--vc-green); color: #fff; font-size: 12px; font-weight: 600; text-decoration: none; align-self: flex-start; }
.vc-report-btn:hover { background: var(--vc-green-800); }
.vc-report-btn-off { background: #e2e8f0; color: #94a3b8; cursor: default; }

/* ---------- Toast ---------- */
#vc-toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.vc-toast { background: #16a34a; color: #fff; font-size: 13px; font-weight: 500; padding: 8px 16px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); opacity: 0; transform: translateY(8px); transition: opacity 0.2s ease, transform 0.2s ease; }
.vc-toast-error { background: #dc2626; }
.vc-toast-show { opacity: 1; transform: translateY(0); }

/* ---------- Welcome ---------- */
.vc-welcome { text-align: center; max-width: 460px; margin: 80px auto 0; padding: 40px 20px; }
.vc-welcome-icon {
  width: 72px; height: 72px; border-radius: 18px;
  background: linear-gradient(135deg, #0F6E56 0%, #0a5342 100%);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 20px; box-shadow: 0 4px 12px rgba(15,110,86,0.2);
}
.vc-welcome-icon i { font-size: 36px; color: #fff; }
.vc-welcome-title { margin: 0 0 8px; font-size: 22px; font-weight: 600; color: #0f172a; letter-spacing: -0.3px; }
.vc-welcome-text { margin: 0 0 24px; font-size: 14px; color: #64748b; line-height: 1.5; }
.vc-welcome-sub { font-size: 14px; color: var(--vc-text-2); margin: 0; }
.vc-welcome-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.vc-stat { padding: 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.vc-stat-value { font-size: 20px; font-weight: 700; line-height: 1; }
.vc-stat-label { font-size: 11px; color: #64748b; margin-top: 4px; }
.vc-welcome-actions { display: flex; gap: 8px; justify-content: center; }
.vc-welcome-btn-primary {
  padding: 10px 20px; background: #0F6E56; color: #fff; border: none; border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
}
.vc-welcome-btn-primary:hover { background: #0d5e49; }

/* ---------- Upload drop zone ---------- */
.vc-drop-zone {
  margin-top: 16px;
  border: 2px dashed var(--vc-border);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.15s;
  background: #f8fafc;
}
.vc-drop-zone.dragover { border-color: #0F6E56; background: #ecfdf5; }
.vc-drop-inner { text-align: center; cursor: pointer; color: #64748b; }
.vc-drop-inner:hover { color: #0F6E56; }
.vc-drop-inner .bi { font-size: 30px; }
.vc-drop-text { font-size: 14px; font-weight: 500; margin-top: 8px; color: #0f172a; }
.vc-drop-hint { font-size: 12px; color: #94a3b8; margin-top: 4px; }

.vc-upload-queue { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.vc-upload-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 12px; align-items: center;
  padding: 8px 12px; background: #fff;
  border: 1px solid var(--vc-border); border-radius: 8px; font-size: 13px;
}
.vc-upload-item-icon { color: #64748b; font-size: 18px; }
.vc-upload-item-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-upload-item-size { font-size: 11px; color: #94a3b8; white-space: nowrap; }
.vc-upload-item-status { font-size: 11px; color: #64748b; white-space: nowrap; }
.vc-upload-item-status.error { color: #dc2626; }
.vc-upload-item-status.success { color: #0F6E56; }
.vc-upload-remove { border: 0; background: none; color: #94a3b8; cursor: pointer; font-size: 14px; padding: 2px; }
.vc-upload-remove:hover { color: #dc2626; }
.vc-upload-progress {
  width: 100%; height: 3px; background: #e2e8f0; border-radius: 2px;
  overflow: hidden; grid-column: 1 / -1; margin-top: 4px;
}
.vc-upload-progress-bar { height: 100%; background: #0F6E56; transition: width 0.2s; }

.vc-upload-actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }
.vc-btn-primary {
  background: #0F6E56; color: #fff; border: none; padding: 8px 20px;
  border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer;
}
.vc-btn-primary:hover { background: #0d5e49; }
.vc-btn-primary:disabled { background: #94a3b8; cursor: not-allowed; }
.vc-btn-secondary {
  background: transparent; color: #64748b; border: 1px solid var(--vc-border);
  padding: 8px 20px; border-radius: 8px; font-size: 13px; cursor: pointer;
}
.vc-btn-secondary:hover { color: #0f172a; }

/* Activity view hides the customer sidebar (feed is cross-tenant, full width). */
.vc-view-activity .vc-sidebar { display: none; }
.vc-view-activity .vc-menu-toggle { display: none; }
.vc-view-activity .vc-search-wrap { visibility: hidden; }

/* ---------- Footer ---------- */
.vc-footer {
  padding: 10px 24px; border-top: 1px solid #e2e8f0; background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: #94a3b8; flex-shrink: 0;
}
.vc-footer-left, .vc-footer-right { display: flex; align-items: center; gap: 12px; }
.vc-footer-brand { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #64748b; }
.vc-footer-sep { color: #cbd5e1; }
.vc-footer a { color: #94a3b8; text-decoration: none; }
.vc-footer a:hover { color: #64748b; }
.vc-footer-version { color: #0F6E56; font-weight: 500; }
@media (max-width: 640px) {
  .vc-footer { flex-direction: column; gap: 6px; padding: 10px 12px; text-align: center; }
  .vc-footer-left { flex-wrap: wrap; justify-content: center; }
}

/* ---------- Activity feed ---------- */
.vc-activity { max-width: 900px; margin: 0 auto; }
.vc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.vc-chip {
  background: #fff; border: 1px solid var(--vc-border); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; color: var(--vc-text-2); cursor: pointer;
}
.vc-chip:hover { border-color: var(--vc-green); color: var(--vc-green); }
.vc-chip-active { background: var(--vc-green); border-color: var(--vc-green); color: #fff; }

.vc-act-group { margin-bottom: 20px; }
.vc-act-period {
  position: sticky; top: 0; z-index: 1;
  background: var(--vc-bg); font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--vc-muted); padding: 8px 0 6px;
}
.vc-act-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  padding: 10px 12px; background: #fff; border: 1px solid var(--vc-border);
  border-radius: 8px; margin-bottom: 6px;
}
.vc-act-icon { font-size: 20px; }
.vc-act-main { min-width: 0; }
.vc-act-line1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.vc-act-file { font-size: 13px; font-weight: 500; color: var(--vc-text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-act-file:hover { color: var(--vc-green); text-decoration: underline; }
.vc-act-line2 { display: flex; align-items: center; gap: 10px; margin-top: 3px; font-size: 12px; color: var(--vc-muted); flex-wrap: wrap; }
.vc-act-cust { color: var(--vc-green); text-decoration: none; font-weight: 500; }
.vc-act-cust:hover { text-decoration: underline; }
.vc-act-time { margin-left: auto; }
.vc-act-tenant { font-size: 11px; color: var(--vc-muted); text-align: right; white-space: nowrap; }

@media (max-width: 640px) {
  .vc-act-row { grid-template-columns: auto 1fr; }
  .vc-act-tenant { grid-column: 2; text-align: left; margin-top: 2px; }
  .vc-act-time { margin-left: 0; }
}

/* ---------- Newly uploaded row flash ---------- */
.vc-file-row-new { animation: vc-flash-new 2s ease-out; }
@keyframes vc-flash-new {
  0%   { background: #d1fae5; }
  100% { background: transparent; }
}

/* ---------- Upload action bar ---------- */
.vc-upload-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px;
  border: 2px dashed var(--vc-border, #cbd5e1); border-radius: 12px;
  background: #f8fafc; cursor: pointer; transition: all 0.15s; margin: 16px 0;
}
.vc-upload-bar:hover:not(.vc-upload-bar-disabled) { border-color: #0F6E56; background: #ecfdf5; }
.vc-upload-bar.dragover { border-color: #0F6E56; background: #ecfdf5; border-style: solid; }
.vc-upload-bar i { font-size: 22px; color: #0F6E56; }
.vc-upload-bar-text { font-size: 14px; font-weight: 600; color: #0f172a; }
.vc-upload-bar-hint { font-size: 12px; color: #64748b; margin-left: auto; }
.vc-upload-bar-disabled { cursor: not-allowed; opacity: 0.6; background: #f1f5f9; border-color: #e2e8f0; }
.vc-upload-bar-disabled i { color: #94a3b8; }
.vc-upload-bar-disabled .vc-upload-bar-text { color: #64748b; }

/* ---------- Upload bottom drawer ---------- */
.vc-drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; pointer-events: none; }
.vc-drawer[aria-hidden="false"] { visibility: visible; pointer-events: auto; }
.vc-drawer-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.4); opacity: 0; transition: opacity 0.2s; }
.vc-drawer[aria-hidden="false"] .vc-drawer-backdrop { opacity: 1; }
.vc-drawer-panel {
  position: absolute; bottom: 0; left: 0; right: 0; max-height: 70vh;
  background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 32px rgba(0,0,0,0.15);
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform 0.25s ease-out;
}
.vc-drawer[aria-hidden="false"] .vc-drawer-panel { transform: translateY(0); }
.vc-drawer-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 24px 16px; border-bottom: 1px solid var(--vc-border);
}
.vc-drawer-title { font-size: 16px; font-weight: 600; color: #0f172a; }
.vc-drawer-subtitle { font-size: 13px; color: #64748b; margin-top: 2px; }
.vc-drawer-close { background: transparent; border: none; color: #64748b; cursor: pointer; padding: 4px 8px; border-radius: 6px; font-size: 16px; }
.vc-drawer-close:hover { background: #f1f5f9; color: #0f172a; }
.vc-drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.vc-drawer-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px; border-top: 1px solid var(--vc-border); background: #f8fafc;
}
.vc-drawer-footer-info { font-size: 13px; color: #64748b; }
.vc-drawer-footer-actions { display: flex; gap: 8px; }
@media (max-width: 640px) { .vc-drawer-panel { max-height: 85vh; } }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) { :root { --vc-sidebar-w: 288px; } }

@media (max-width: 900px) {
  .vc-header { padding: 0 12px; gap: 12px; }
  .vc-brand-sub { display: none; }
  .vc-header-search { max-width: none; }
}
@media (max-width: 640px) {
  .vc-header { padding: 0 10px; gap: 8px; }
  .vc-brand-name { font-size: 13px; }
  .vc-brand-text { display: none; }        /* logo-only brand on phones */
  .vc-file-count { display: none; }
  .vc-avatar { display: none; }            /* user knows who they are; keep logout */
  .vc-header-divider { display: none; }
  .vc-header-nav { display: flex; gap: 2px; }  /* keep tabs reachable (was hidden) */
  .vc-nav-label { display: none; }         /* icon-only tabs */
  .vc-nav-tab { padding: 6px 10px; }

  /* Search collapses to an icon; expanding OVERLAYS the header (fixed) instead of
     pushing siblings off-screen (which caused horizontal scroll). */
  .vc-header-search { max-width: none; flex: 0 0 auto; position: relative; }
  .vc-search-wrap { width: 36px; transition: all 0.2s ease; overflow: hidden; position: relative; }
  .vc-search-wrap input {
    padding: 8px 12px 8px 34px; width: 100%; box-sizing: border-box;
    background: transparent; border-color: transparent; cursor: pointer;
  }
  .vc-search-wrap input::placeholder { color: transparent; }

  .vc-search-wrap.vc-search-expanded {
    position: fixed; top: 0; left: 0; right: 0; width: 100%; height: 60px;
    background: #fff; z-index: 200; padding: 12px; display: flex; align-items: center;
    border-bottom: 1px solid #e2e8f0; box-sizing: border-box;
  }
  .vc-search-wrap.vc-search-expanded input {
    background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; cursor: text;
    height: 36px; padding-left: 84px; padding-right: 12px;
  }
  .vc-search-wrap.vc-search-expanded input::placeholder { color: #94a3b8; }
  .vc-search-wrap.vc-search-expanded .vc-search-back {
    display: inline-flex; align-items: center; justify-content: center;
    margin-right: 4px; flex-shrink: 0;
  }
  .vc-search-wrap.vc-search-expanded .vc-search-icon { left: 60px; top: 50%; transform: translateY(-50%); }
}

@media (max-width: 767px) {
  .vc-menu-toggle { display: block; }
  .vc-main { padding: 16px; }
  .vc-profile-avatar { width: 36px; height: 36px; font-size: 15px; }
  .vc-tr { grid-template-columns: 1fr 84px 64px; }
  .vc-col-hide-mobile { display: none !important; }

  #vc-sidebar {
    position: fixed; top: var(--vc-topbar-h); left: -100%;
    height: calc(100vh - var(--vc-topbar-h)); width: 82%;
    z-index: 30; transition: left 0.2s ease; box-shadow: 2px 0 8px rgba(0,0,0,0.1);
  }
  body.vc-sidebar-open #vc-sidebar { left: 0; }
  body.vc-sidebar-open::after {
    content: ''; position: fixed; inset: var(--vc-topbar-h) 0 0 0;
    background: rgba(0,0,0,0.3); z-index: 20;
  }
}

/* ---------- Login page ---------- */
.vc-login-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #f0fdf4 0%, #F8F8F6 55%);
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', system-ui, sans-serif;
}
.vc-login-container { width: 100%; max-width: 400px; margin: 0 auto; }
.vc-login-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 20px; }
.vc-login-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, #0F6E56 0%, #0a5342 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(15,110,86,0.25);
}
.vc-login-logo span { color: #fff; font-weight: 600; font-size: 16px; }
.vc-login-brand-name { font-size: 18px; font-weight: 600; color: #0f172a; letter-spacing: -0.3px; }
.vc-login-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 32px; box-shadow: 0 4px 16px rgba(15,23,42,0.04);
}
.vc-login-header { text-align: center; margin-bottom: 24px; }
.vc-login-header h1 { margin: 0 0 6px; font-size: 20px; font-weight: 600; letter-spacing: -0.3px; color: #0f172a; }
.vc-login-header p { margin: 0; font-size: 13px; color: #64748b; }
.vc-login-alert {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; background: #fef2f2; border: 1px solid #fecaca;
  border-radius: 8px; margin-bottom: 16px; font-size: 13px; color: #991b1b; line-height: 1.4;
}
.vc-login-alert i { color: #dc2626; margin-top: 2px; font-size: 14px; flex-shrink: 0; }
.vc-login-field { margin-bottom: 14px; }
.vc-login-field label { font-size: 11px; font-weight: 500; color: #64748b; display: block; margin-bottom: 6px; letter-spacing: 0.3px; }
.vc-login-input-wrap { position: relative; }
.vc-login-input-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: 15px; pointer-events: none; }
.vc-login-input-wrap input {
  width: 100%; padding: 10px 12px 10px 36px; font-size: 13px;
  border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #0f172a;
  box-sizing: border-box; transition: border-color 0.15s, box-shadow 0.15s; font-family: inherit;
}
.vc-login-input-wrap input:focus { outline: none; border-color: #0F6E56; box-shadow: 0 0 0 3px rgba(15, 110, 86, 0.1); }
.vc-login-input-wrap.has-error input { border-color: #dc2626; }
.vc-login-input-wrap.has-error input:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1); }
.vc-login-field-error { margin-top: 6px; font-size: 12px; color: #dc2626; display: flex; align-items: center; gap: 4px; }
.vc-login-btn {
  width: 100%; padding: 11px 16px; background: #0F6E56; color: #fff; border: none;
  border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; margin-top: 4px;
  font-family: inherit; transition: background 0.15s;
}
.vc-login-btn:hover { background: #0d5e49; }
.vc-login-btn:active { background: #0a4f3d; }
.vc-login-btn:disabled { background: #94a3b8; cursor: not-allowed; }
.vc-login-signup { text-align: center; margin-top: 20px; font-size: 12px; color: #64748b; }
.vc-login-signup a { color: #0F6E56; font-weight: 500; text-decoration: none; }
.vc-login-signup a:hover { text-decoration: underline; }
.vc-login-features {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin-top: 32px; padding: 20px 0; border-top: 1px solid #e2e8f0;
}
.vc-login-feature { text-align: center; padding: 4px; }
.vc-login-feature i { font-size: 18px; display: block; margin-bottom: 4px; }
.vc-login-feature span { font-size: 10px; color: #64748b; }
.vc-login-footer { text-align: center; margin-top: 12px; font-size: 11px; color: #94a3b8; }
.vc-login-footer a { color: #94a3b8; text-decoration: none; }
.vc-login-footer a:hover { color: #64748b; text-decoration: underline; }
.vc-login-footer-sep { margin: 0 6px; color: #cbd5e1; }

@media (max-width: 480px) {
  .vc-login-page { padding: 24px 16px; }
  .vc-login-card { padding: 24px; }
  .vc-login-features { grid-template-columns: repeat(3, 1fr); gap: 4px; }
  .vc-login-feature span { font-size: 9px; }
  .vc-login-footer { flex-direction: column; }
}

/* ---------- Session-expired banner (Feature A) ---------- */
.vc-session-banner {
  position: sticky; top: 0; z-index: 200;
  background: #fef2f2; border-bottom: 1px solid #fecaca; color: #991b1b;
  padding: 10px 20px; display: flex; align-items: center; gap: 12px; font-size: 13px;
}
.vc-session-banner button {
  margin-left: auto; padding: 6px 14px; background: #dc2626; color: #fff;
  border: none; border-radius: 6px; font-size: 12px; cursor: pointer;
}

/* ---------- Global search dropdown (Feature B) ---------- */
.vc-header-search { position: relative; }
.vc-search-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  max-height: 500px; overflow-y: auto; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15,23,42,0.08); z-index: 50; display: none;
}
.vc-search-dropdown.open { display: block; }
.vc-search-section { padding: 8px 0; }
.vc-search-section + .vc-search-section { border-top: 1px solid #f1f5f9; }
.vc-search-section-header {
  padding: 6px 16px; font-size: 10px; font-weight: 600; color: #64748b;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.vc-search-section-header span { color: #94a3b8; font-weight: 500; margin-left: 4px; }
.vc-search-result { display: flex; align-items: center; gap: 10px; padding: 8px 16px; cursor: pointer; transition: background 0.1s; }
.vc-search-result:hover, .vc-search-result.highlighted { background: #f0fdf4; }
.vc-search-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vc-search-icon.customer { background: #eff6ff; color: #2563eb; }
.vc-search-icon.tenant { background: #ecfdf5; color: #0F6E56; }
.vc-search-icon i { font-size: 14px; }
.vc-search-info { flex: 1; min-width: 0; overflow: hidden; }
.vc-search-name { font-size: 13px; font-weight: 500; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; direction: ltr; }
.vc-search-meta { font-size: 11px; color: #64748b; margin-top: 2px; display: flex; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-search-tenant { font-weight: 500; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vc-search-match { color: #94a3b8; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vc-search-empty { padding: 32px 16px; text-align: center; color: #94a3b8; font-size: 13px; }
.vc-search-empty i { font-size: 24px; display: block; margin-bottom: 8px; }

/* ---------- Header IVR pill ---------- */
.vc-header-ivr {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; font-size: 12px; color: #475569; font-weight: 500; white-space: nowrap;
}
.vc-header-ivr i { font-size: 12px; color: #0F6E56; }
@media (max-width: 900px) {
  .vc-header-ivr { padding: 6px 8px; font-size: 11px; }
}
@media (max-width: 640px) {
  .vc-header-ivr span { display: none; }
  .vc-header-ivr { padding: 6px 8px; }
}

/* ---------- Loading feedback ---------- */
.vc-loader-block { padding: 40px 20px; text-align: center; color: #64748b; }
.vc-loader-block-large { padding: 80px 20px; text-align: center; color: #64748b; }
.vc-loader-text { font-size: 13px; margin-top: 12px; color: #94a3b8; }
.vc-spinner {
  width: 24px; height: 24px; border: 2.5px solid #e2e8f0; border-top-color: #0F6E56;
  border-radius: 50%; display: inline-block; animation: vc-spin 0.7s linear infinite;
}
.vc-spinner-large {
  width: 40px; height: 40px; border: 3px solid #e2e8f0; border-top-color: #0F6E56;
  border-radius: 50%; display: inline-block; animation: vc-spin 0.7s linear infinite;
}
/* (@keyframes vc-spin already defined for the credit-card spinner — reused here) */

/* ---------- Top progress bar ---------- */
.vc-progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; background: transparent;
  z-index: 300; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity 0.15s;
}
.vc-progress-bar.active { opacity: 1; }
.vc-progress-bar-fill {
  height: 100%; width: 30%;
  background: linear-gradient(90deg, transparent 0%, #0F6E56 50%, transparent 100%);
  animation: vc-progress-slide 1.2s ease-in-out infinite;
}
@keyframes vc-progress-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* ---------- File action popup ---------- */
.vc-file-row { cursor: pointer; }
.vc-file-row:hover { background: #f8fafc; }
.vc-file-row-actions-cell { color: #94a3b8; padding: 4px; display: flex; align-items: center; justify-content: center; }
.vc-file-row-actions-cell i { font-size: 16px; }
.vc-file-row:hover .vc-file-row-actions-cell { color: #64748b; }

.vc-file-popup {
  position: absolute; min-width: 220px; background: #fff; border: 1px solid #e2e8f0;
  border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,0.12); z-index: 150; display: none; overflow: hidden;
}
.vc-file-popup[aria-hidden="false"] { display: block; }
.vc-file-popup-header { padding: 12px 14px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; gap: 8px; background: #f8fafc; }
.vc-file-popup-header i { color: #64748b; font-size: 14px; flex-shrink: 0; }
.vc-file-popup-name { font-size: 12px; color: #475569; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vc-file-popup-actions { display: flex; flex-direction: column; padding: 4px; }
.vc-file-popup-action {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: transparent;
  border: none; border-radius: 6px; cursor: pointer; font-size: 13px; color: #0f172a; text-align: left; transition: background 0.1s;
}
.vc-file-popup-action:hover { background: #f0fdf4; }
.vc-file-popup-action > i:first-child { color: #0F6E56; font-size: 15px; width: 18px; }
.vc-file-popup-action span { flex: 1; }
.vc-file-popup-hint { color: #94a3b8; font-size: 11px; }

.vc-file-popup-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,0.3); z-index: 140; display: none; }
.vc-file-popup-backdrop[aria-hidden="false"] { display: block; }

@media (max-width: 640px) {
  .vc-file-popup {
    position: fixed; top: auto !important; left: 0 !important; right: 0 !important; bottom: 0;
    width: 100%; min-width: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -8px 24px rgba(15,23,42,0.15);
    max-height: 60vh; overflow-y: auto; animation: vc-file-popup-slide-up 0.2s ease-out;
  }
  .vc-file-popup-header { padding: 16px; }
  .vc-file-popup-actions { padding: 8px 8px 20px; }
  .vc-file-popup-action { padding: 12px 14px; font-size: 14px; }
}
@keyframes vc-file-popup-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ---------- One-time welcome modal ---------- */
.vc-welcome-modal { position: fixed; inset: 0; z-index: 400; display: none; }
.vc-welcome-modal[aria-hidden="false"] { display: block; }
.vc-welcome-modal-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,0.45); }
.vc-welcome-modal[aria-hidden="false"] .vc-welcome-modal-backdrop { animation: vc-welcome-fade 0.28s ease both; }

/* Rectangular 40:60 split card */
.vc-welcome-modal-card {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: calc(100% - 40px); max-width: 620px; background: #fff; border-radius: 16px;
  box-shadow: 0 24px 70px rgba(15,23,42,0.30); overflow: hidden;
  display: flex; align-items: stretch;
  animation: vc-welcome-pop 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}
/* 40% brand panel */
.vc-welcome-modal-side {
  flex: 0 0 40%; background: linear-gradient(150deg, #0F6E56 0%, #0a5342 100%);
  color: #fff; padding: 34px 26px; display: flex; flex-direction: column;
  align-items: flex-start; justify-content: center; gap: 6px;
}
.vc-welcome-modal-logo-img { display: block; margin-bottom: 10px; animation: vc-welcome-logo 0.55s ease 0.15s both; }
.vc-welcome-modal-brand-name { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.vc-welcome-modal-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; color: #a7f3d0; text-transform: uppercase; }
/* 60% content panel */
.vc-welcome-modal-main { flex: 1 1 60%; padding: 34px 30px; display: flex; flex-direction: column; justify-content: center; }
.vc-welcome-modal-title { margin: 0 0 10px; font-size: 21px; font-weight: 600; color: #0f172a; letter-spacing: -0.3px; line-height: 1.25; }
.vc-welcome-modal-text { margin: 0 0 22px; font-size: 13.5px; line-height: 1.55; color: #64748b; }
.vc-welcome-modal-btn {
  align-self: flex-start; padding: 11px 24px; background: #0F6E56; color: #fff; border: none;
  border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.15s;
}
.vc-welcome-modal-btn:hover { background: #0d5e49; }

@media (max-width: 560px) {
  .vc-welcome-modal-card { flex-direction: column; max-width: 400px; }
  .vc-welcome-modal-side { flex: none; flex-direction: row; align-items: center; gap: 10px; padding: 20px 24px; }
  .vc-welcome-modal-logo-img { margin-bottom: 0; width: 36px; height: 36px; }
  .vc-welcome-modal-eyebrow { display: none; }
  .vc-welcome-modal-main { padding: 24px 24px 26px; }
  .vc-welcome-modal-btn { align-self: stretch; text-align: center; }
}

@keyframes vc-welcome-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vc-welcome-pop {
  0%   { opacity: 0; transform: translate(-50%, -42%) scale(0.92); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes vc-welcome-logo {
  0%   { opacity: 0; transform: scale(0.6); }
  60%  { transform: scale(1.12); }
  100% { opacity: 1; transform: scale(1); }
}

/* ---------- Download all (ZIP) ---------- */
.vc-docs-heading { display: flex; justify-content: space-between; align-items: center; }
.vc-download-all-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
  background: #fff; color: #0F6E56; border: 1px solid #d1fae5; border-radius: 8px;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s;
}
.vc-download-all-btn:hover { background: #ecfdf5; border-color: #0F6E56; }
.vc-download-all-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.vc-download-all-btn.loading { cursor: wait; }
.vc-download-all-btn.loading i { animation: vc-spin 0.7s linear infinite; }
@media (max-width: 640px) {
  .vc-docs-heading { flex-direction: column; align-items: flex-start; gap: 8px; }
  .vc-download-all-btn span { display: none; }
  .vc-download-all-btn { padding: 8px 10px; }
}

/* ---------- Thumbnails + grid/list view ---------- */
.vc-docs-actions { display: flex; align-items: center; gap: 10px; }
.vc-view-toggle { display: inline-flex; border: 1px solid var(--vc-border); border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.vc-view-btn { background: #fff; border: none; padding: 7px 10px; cursor: pointer; color: var(--vc-muted); font-size: 14px; display: inline-flex; align-items: center; }
.vc-view-btn + .vc-view-btn { border-left: 1px solid var(--vc-border); }
.vc-view-btn:hover { background: #f8fafc; color: var(--vc-text-2); }
.vc-view-btn.active { background: #f0fdf4; color: #0F6E56; }

/* Thumbnail (list = 40x40; icon fallback box). */
img.vc-thumb { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: #f1f5f9; display: block; }
.vc-thumb.vc-thumb-icon { width: 40px; height: 40px; border-radius: 6px; background: #f1f5f9; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.vc-thumb.vc-thumb-icon i { font-size: 18px; }

/* Grid view */
.vc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.vc-grid-tile { background: #fff; border: 1px solid var(--vc-border); border-radius: 10px; overflow: hidden; cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s; }
.vc-grid-tile:hover { box-shadow: 0 4px 12px rgba(15,23,42,0.08); border-color: #cbd5e1; }
.vc-grid-thumb { width: 100%; height: 110px; background: #f8fafc; display: flex; align-items: center; justify-content: center; overflow: hidden; }
img.vc-thumb.vc-thumb-grid, .vc-thumb.vc-thumb-grid { width: 100%; height: 110px; border-radius: 0; }
img.vc-thumb.vc-thumb-grid { object-fit: cover; display: block; }
.vc-thumb.vc-thumb-grid.vc-thumb-icon { background: #f0fdf4; }
.vc-thumb.vc-thumb-grid.vc-thumb-icon i { font-size: 34px; }
.vc-grid-meta { padding: 8px 10px; }
.vc-grid-name { font-size: 12px; font-weight: 500; color: var(--vc-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc-grid-date { font-size: 11px; color: var(--vc-muted); margin-top: 2px; }

/* ---------- Thumbnail enlarge preview (hover / long-press) ---------- */
.vc-thumb-preview {
  position: absolute; display: none; z-index: 250;
  background: #fff; border: 0.5px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 8px 28px rgba(15,23,42,0.18); padding: 6px;
  pointer-events: none;   /* desktop: never intercept the mouse */
}
.vc-thumb-preview img { display: block; max-width: 450px; max-height: 450px; object-fit: contain; border-radius: 8px; }
/* Mobile: centered overlay + dim backdrop */
.vc-thumb-preview.vc-thumb-preview-mobile {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 260; padding: 8px; pointer-events: none;
}
.vc-thumb-preview.vc-thumb-preview-mobile img { max-width: 80vw; max-height: 80vh; }
.vc-thumb-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,0.4); z-index: 255; display: none; }
.vc-thumb-backdrop.open { display: block; }
