/* ==========================================================================
   KnowMyBuild Superadmin — design tokens & components
   ========================================================================== */

:root {
  --color-bg: #f6f3ea;
  --color-surface: #ffffff;
  --color-surface-2: #fbf9f3;
  --color-text: #23241f;
  --color-text-muted: #7c7a6b;
  --color-border: #e7e2d3;

  --color-primary: #cb9a3c;
  --color-primary-dark: #b3852c;
  --color-primary-soft: #f6e9cd;

  --color-secondary: #3e4a31;
  --color-secondary-dark: #2b3524;
  --color-secondary-soft: #e7ebe0;

  --color-success: #3f7d4f;
  --color-success-soft: #e3f1e6;
  --color-danger: #b3452b;
  --color-danger-soft: #f7e5df;
  --color-info: #3e6fa6;
  --color-info-soft: #e2ecf5;
  --color-warning: #cb9a3c;
  --color-warning-soft: #f6e9cd;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(35, 36, 31, 0.06);
  --shadow-md: 0 10px 30px rgba(43, 53, 36, 0.08);
  --sidebar-width: 264px;
  --topbar-height: 72px;
}

* { box-sizing: border-box; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 0.925rem;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 { color: var(--color-text); font-weight: 700; }

.text-muted-soft { color: var(--color-text-muted) !important; }

/* ---------------------------------- Layout ------------------------------ */

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
  color: #f2f1e8;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 1030;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 1.6rem 1.5rem 1.35rem;
  border-bottom: 1px solid rgba(242, 241, 232, 0.08);
  margin-bottom: 0.5rem;
}

.sidebar-brand .sidebar-logo { width: 150px; max-width: 100%; height: auto; display: block; }
.sidebar-brand .sub {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(242, 241, 232, 0.55);
  padding-left: 0.15rem;
}

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.5rem 0.9rem; }

.sidebar-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(242, 241, 232, 0.45);
  padding: 0.9rem 0.75rem 0.35rem;
}

.nav-link-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0.8rem;
  border-radius: var(--radius-sm);
  color: rgba(242, 241, 232, 0.82);
  font-weight: 600;
  font-size: 0.87rem;
  margin-bottom: 0.15rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link-item i { font-size: 1.05rem; width: 20px; text-align: center; }

.nav-link-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

.nav-link-item.active {
  background: var(--color-primary);
  color: var(--color-secondary-dark);
}

.nav-link-item .badge-count {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border-radius: 999px;
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
}

.nav-link-item.active .badge-count { background: rgba(43, 53, 36, 0.18); color: var(--color-secondary-dark); }

.sidebar-footer { padding: 1rem 1.25rem 1.4rem; border-top: 1px solid rgba(255, 255, 255, 0.08); }

.main-wrap { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: var(--topbar-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.75rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.topbar .page-heading { font-weight: 800; font-size: 1.15rem; }
.topbar .page-heading small { display: block; font-size: 0.76rem; color: var(--color-text-muted); font-weight: 500; }

.sidebar-toggle-btn {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  width: 38px;
  height: 38px;
  display: none;
  align-items: center;
  justify-content: center;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.6rem 0.35rem 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--color-border);
}

.topbar-user .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.8rem;
}

.content-area { padding: 1.75rem; flex: 1; }

/* ---------------------------------- Cards -------------------------------- */

.card-surface {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.stat-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.35rem;
  display: block;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
  height: 100%;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.stat-card-body {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.stat-card .icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--color-primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-card .stat-content {
  flex-grow: 1;
  min-width: 0;
}

.stat-card .value {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.stat-card .label {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.stat-card .stat-sub {
  font-size: 0.73rem;
  color: var(--color-text-muted);
  margin-top: 0.15rem;
  opacity: 0.85;
}

/* ---------------------------------- Buttons ------------------------------ */

.btn { border-radius: var(--radius-sm); font-weight: 700; font-size: 0.86rem; padding: 0.55rem 1.1rem; }

.btn-primary {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #2b2410;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #201a0b;
}

.btn-outline-secondary {
  border-color: var(--color-border);
  color: var(--color-text);
  background: var(--color-surface);
}
.btn-outline-secondary:hover { background: var(--color-surface-2); color: var(--color-text); border-color: var(--color-border); }

.btn-soft-danger { background: var(--color-danger-soft); color: var(--color-danger); border: 1px solid transparent; }
.btn-soft-danger:hover { background: var(--color-danger); color: #fff; }

.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }

/* ---------------------------------- Forms -------------------------------- */

.form-label { font-weight: 700; font-size: 0.82rem; color: var(--color-text); margin-bottom: 0.35rem; }

.form-control, .form-select {
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  padding: 0.6rem 0.85rem;
  font-size: 0.88rem;
  background: var(--color-surface-2);
}

.form-control:focus, .form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
  background: var(--color-surface);
}

.form-check-input:checked { background-color: var(--color-primary); border-color: var(--color-primary); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--color-primary-soft); }

.invalid-feedback { font-size: 0.78rem; }
.is-invalid { border-color: var(--color-danger) !important; }

/* ---------------------------------- Tables ------------------------------- */

.table-toolbar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.65rem;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1.25rem;
  width: 100%;
}

.search-box {
  position: relative;
  flex: 0 1 360px;
  min-width: 220px;
}
.search-box i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}
.search-box input {
  padding-left: 2.35rem;
  height: 38px;
  font-size: 0.85rem;
}

.filter-select {
  width: auto;
  min-width: 170px;
  max-width: 240px;
  flex-shrink: 0;
  height: 38px;
  font-size: 0.85rem;
}

.toolbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.toolbar-actions .btn {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.85rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .table-toolbar {
    flex-wrap: wrap;
  }
  .search-box {
    flex: 1 1 100%;
    max-width: 100%;
  }
}

/* Active/inactive toggle switch inside list tables */
.table-clean .form-switch {
  min-height: 0;
  padding-left: 2.25rem;
  margin-bottom: 0;
}
.table-clean .form-switch .form-check-input {
  width: 2.1rem;
  height: 1.15rem;
  margin-left: -2.25rem;
  cursor: pointer;
}
.table-clean .form-select-sm {
  height: 28px;
  padding: 0.15rem 1.75rem 0.15rem 0.5rem;
  font-size: 0.78rem;
  min-height: 0;
}

/* Drag-and-drop row reordering */
.drag-handle-cell {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  text-align: center;
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}
.drag-handle {
  cursor: grab;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  display: inline-flex;
  padding: 0.1rem;
}
.drag-handle:active { cursor: grabbing; }
.drag-handle.disabled {
  color: var(--color-border);
  cursor: not-allowed;
}
table.table-clean tbody tr.sortable-ghost {
  opacity: 0.45;
  background: var(--color-primary-soft);
}
table.table-clean tbody tr.sortable-chosen {
  background: var(--color-surface-2);
}
.section-drag-handle {
  cursor: grab;
  color: var(--color-text-muted);
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.3rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background-color 0.15s;
}
.section-drag-handle:hover {
  color: var(--color-text);
  background: rgba(0, 0, 0, 0.06);
}
.section-drag-handle:active {
  cursor: grabbing;
}
.section-card.sortable-ghost {
  opacity: 0.4;
  outline: 2px dashed var(--color-primary) !important;
  outline-offset: -2px;
}
.section-card.sortable-chosen {
  box-shadow: var(--shadow-md) !important;
}

.reorder-hint {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.table-responsive-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

table.table-clean { margin-bottom: 0; }
table.table-clean thead th {
  background: var(--color-surface-2);
  color: #4b5563;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  border-bottom: 1px solid var(--color-border);
  padding: 0.55rem 0.85rem;
  white-space: nowrap;
  vertical-align: middle;
}
table.table-clean tbody td {
  padding: 0.48rem 0.85rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.84rem;
  line-height: 1.35;
}
table.table-clean tbody tr:last-child td { border-bottom: none; }
table.table-clean tbody tr:hover { background: var(--color-surface-2); }
table.table-clean td.text-end,
table.table-clean th.text-end {
  white-space: nowrap;
}

.cell-title { font-weight: 600; color: var(--color-text); line-height: 1.25; }
.cell-sub { font-size: 0.74rem; color: var(--color-text-muted); line-height: 1.2; margin-top: 1px; }

.avatar-thumb {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--color-surface-2); border: 1px solid var(--color-border);
}
.avatar-thumb-fallback {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--color-secondary-soft); color: var(--color-secondary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.75rem;
}

/* ----------------------------- Table Action Buttons ----------------------- */

.table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  white-space: nowrap;
  flex-wrap: nowrap;
  vertical-align: middle;
}

.btn-action {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.82rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: #64748b;
  transition: all 0.15s ease-in-out;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.btn-action:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

.btn-action-view:hover {
  background: #eff6ff;
  color: #2563eb;
  border-color: #bfdbfe;
}

.btn-action-edit:hover {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #bbf7d0;
}

.btn-action-delete {
  color: #94a3b8;
}
.btn-action-delete:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

/* Fallback for .btn-icon inside table cells */
.table-clean td.text-end .btn-icon {
  width: 28px;
  height: 28px;
  font-size: 0.82rem;
  border-radius: 6px;
}

/* ---------------------------------- Badges ------------------------------- */

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.badge-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-neutral { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }
.badge-gold { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-green { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-red { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.badge-blue { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.badge-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 500;
  background: #f8f9fa;
  color: #374151;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
  line-height: 1.25;
}

.badge-config-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.71rem;
  font-weight: 500;
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-config-pill-more {
  display: inline-flex;
  align-items: center;
  font-size: 0.69rem;
  font-weight: 600;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  white-space: nowrap;
}

.btn-compact-add {
  height: 28px;
  padding: 0 0.65rem;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 6px;
  background: var(--color-primary-soft);
  color: #7c5713;
  border: 1px solid rgba(203, 154, 60, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
}
.btn-compact-add:hover {
  background: var(--color-primary);
  color: #2b2410;
  border-color: var(--color-primary-dark);
  box-shadow: 0 1px 3px rgba(203, 154, 60, 0.25);
}


/* ---------------------------------- Pagination ---------------------------- */

.pagination-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.1rem; flex-wrap: wrap; gap: 0.75rem;
}
.pagination-bar .page-link {
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  margin: 0 0.15rem;
}
.pagination-bar .page-item.active .page-link {
  background: var(--color-primary); border-color: var(--color-primary); color: #2b2410;
}
.pagination-bar .page-item.disabled .page-link { color: var(--color-text-muted); background: var(--color-surface-2); }

/* ---------------------------------- Empty state --------------------------- */

.empty-state { text-align: center; padding: 3.5rem 1.5rem; color: var(--color-text-muted); }
.empty-state i { font-size: 2.4rem; color: var(--color-border); margin-bottom: 0.75rem; display: block; }

/* ---------------------------------- Toasts -------------------------------- */

.toast-stack { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 1080; display: flex; flex-direction: column; gap: 0.6rem; }

.toast-custom {
  min-width: 300px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.toast-custom .toast-icon {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.toast-custom.toast-success .toast-icon { color: var(--color-success); }
.toast-custom.toast-error .toast-icon { color: var(--color-danger); }
.toast-custom .toast-body-text { font-size: 0.84rem; font-weight: 600; line-height: 1.4; flex: 1; }
.toast-custom .btn-close { font-size: 0.7rem; flex-shrink: 0; }

/* ---------------------------------- Auth / login split -------------------- */

.auth-shell { min-height: 100vh; display: flex; }

.auth-visual {
  flex: 1.1;
  position: relative;
  background: linear-gradient(160deg, #4c5a3c 0%, var(--color-secondary) 45%, var(--color-secondary-dark) 100%);
  color: #f5f3e9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  overflow: hidden;
}

.auth-visual .brand { display: flex; align-items: center; gap: 0.65rem; position: relative; z-index: 2; }
.auth-visual .brand .auth-logo { width: 220px; max-width: 100%; height: auto; display: block; }

.auth-visual .copy { position: relative; z-index: 2; max-width: 460px; }
.auth-visual .copy .eyebrow {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.75rem; font-weight: 700; color: var(--color-primary);
  background: rgba(203, 154, 60, 0.15); padding: 0.3rem 0.75rem; border-radius: 999px; margin-bottom: 1rem;
}
.auth-visual .copy h1 { color: #fff; font-size: 2rem; line-height: 1.25; margin-bottom: 0.75rem; }
.auth-visual .copy p { color: rgba(245, 243, 233, 0.75); font-size: 0.95rem; }

.auth-visual .hills { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; opacity: 0.9; }
.auth-visual .footnote { position: relative; z-index: 2; font-size: 0.78rem; color: rgba(245, 243, 233, 0.55); }

.auth-form-side {
  flex: 1;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem;
}

.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.auth-card .lead-text { color: var(--color-text-muted); margin-bottom: 1.75rem; font-size: 0.9rem; }

.auth-divider { display: flex; align-items: center; gap: 0.75rem; color: var(--color-text-muted); font-size: 0.78rem; margin: 1.25rem 0; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }

@media (max-width: 991px) {
  .auth-visual { display: none; }
}

/* ---------------------------------- Responsive sidebar -------------------- */

@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-md); }
  .sidebar.show { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .sidebar-toggle-btn { display: inline-flex; }
  .sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(23, 27, 17, 0.45); z-index: 1025; display: none;
  }
  .sidebar-backdrop.show { display: block; }
}

@media (max-width: 575px) {
  .content-area { padding: 1.1rem; }
  .topbar { padding: 0 1.1rem; }
}

/* ---------------------------------- Gallery & Image Management ----------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.85rem;
}
.gallery-item-card {
  position: relative;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  transition: all 0.2s ease;
}
.gallery-item-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}
.gallery-thumb {
  width: 100%;
  height: 95px;
  object-fit: cover;
  border-radius: calc(var(--radius-sm) - 2px);
  display: block;
}
.file-preview-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.75rem;
}
.file-preview-item {
  position: relative;
  width: 85px;
  height: 85px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #000;
}
.file-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file-preview-item .badge-size {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}
.file-preview-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: all 0.15s ease;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.file-preview-remove:hover {
  background: var(--color-danger, #ef4444);
  border-color: var(--color-danger, #ef4444);
  color: #ffffff;
  transform: scale(1.15);
}
.file-size-hint {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}
.image-current-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-top: 0.5rem;
}

/* Clearable Image Preview with Cross Symbol */
.image-preview-wrapper {
  position: relative;
  display: inline-block;
  border-radius: var(--radius-sm, 6px);
  overflow: hidden;
  transition: all 0.2s ease;
  vertical-align: middle;
}
.image-preview-wrapper img {
  display: block;
  border-radius: var(--radius-sm, 6px);
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.btn-image-clear-cross {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  padding: 0;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
.btn-image-clear-cross:hover {
  background: var(--color-danger, #ef4444);
  border-color: var(--color-danger, #ef4444);
  color: #ffffff;
  transform: scale(1.15);
}
.image-preview-wrapper.is-cleared img {
  filter: grayscale(100%) blur(1px);
  opacity: 0.3;
}
.image-cleared-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 8;
  padding: 0.25rem;
  text-align: center;
  backdrop-filter: blur(2px);
}
.image-cleared-overlay .badge {
  font-size: 0.7rem;
}
.btn-undo-clear {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
}

