/* ========================================================== */
/* VARIÁVEIS E GERAL */
/* ========================================================== */
:host {
  --brand: #E33DCF; 
  --blue: #030FAA; 
  --text: #111214; 
  --muted: rgba(17, 18, 20, 0.65); 
  
  --success-bg: rgba(25, 135, 84, 0.1);
  --success-text: #198754;
  --warn-bg: rgba(255, 193, 7, 0.15);
  --warn-text: #b58100;
  --danger-bg: rgba(220, 53, 69, 0.1);
  --danger-text: #dc3545;
  
  --radius-xl: 22px;
  --radius-lg: 16px;
  --shadow-card: 0 22px 46px rgba(17, 18, 20, 0.10);
  --glass-bg: rgba(255, 255, 255, 0.82);
  --glass-border: 1px solid rgba(227, 61, 207, 0.16);

  display: block;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  box-sizing: border-box;
}

/* LAYOUT PRINCIPAL */
.users-page {
  min-height: 100vh;
  padding: 0 12px;
  display: flex;
  align-items: flex-start; 
  justify-content: center;
  position: relative;
  overflow-y: auto;
  background:
    radial-gradient(900px 420px at 20% 10%, rgba(227, 61, 207, 0.14), transparent 60%),
    radial-gradient(820px 380px at 80% 30%, rgba(227, 61, 207, 0.08), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #f5f5f7 70%);
  
  &::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: rgba(255, 255, 255, 0.25);
  }
}

.page-blob {
  position: fixed; pointer-events: none; border-radius: 999px; 
  filter: blur(34px); opacity: 0.55; z-index: 0;
  background: radial-gradient(circle at 30% 30%, rgba(227,61,207,0.55), rgba(227,61,207,0.06));
  animation: floaty 10s ease-in-out infinite;
  &.blob-1 { width: 420px; height: 420px; top: -140px; left: -140px; }
  &.blob-2 { width: 520px; height: 520px; top: -220px; right: -240px; animation-duration: 12s; }
  &.blob-3 { width: 360px; height: 360px; bottom: -180px; left: 25%; animation-duration: 14s; }
  &.blob-4 { width: 520px; height: 520px; bottom: -260px; right: -260px; animation-duration: 16s; opacity: .45; }
}

@keyframes floaty {
  0%    { transform: translate(0, 0) scale(1); }
  50%   { transform: translate(18px, 10px) scale(1.03); }
  100% { transform: translate(0, 0) scale(1); }
}

.container-geral-responsive { 
    width: 100%; 
    max-width: 1180px; /* Igual ao Mureg */
    position: relative; 
    z-index: 1; 
    margin-top: 40px;
    margin-bottom: 200px;
}

.geral-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--glass-bg);
  border: var(--glass-border);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  position: relative;
  display: flex; flex-direction: column;
  min-height: 80vh; 
  &::before {
    content: ''; position: absolute; inset: 1px; border-radius: calc(var(--radius-xl) - 1px);
    pointer-events: none; border: 1px solid rgba(255, 255, 255, 0.65); opacity: 0.75;
  }
}

/* HEADER */
.geral-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(17, 18, 20, 0.06);
  background: linear-gradient(180deg, rgba(227,61,207,0.06), rgba(255,255,255,0.2));
  flex-shrink: 0;
}

.header-row-top {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  @media (max-width: 768px) { grid-template-columns: 1fr; text-align: center; gap: 16px; .title-badge { justify-self: center; margin-bottom: 8px; } .header-actions { justify-self: center; } }
}

.title-badge {
  justify-self: start; display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px;
  border-radius: 999px; background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(227, 61, 207, 0.22); backdrop-filter: blur(10px);
  color: var(--text); font-size: 13px; font-weight: 800;
  i { color: var(--brand); }
}

.header-title { justify-self: center; display: flex; flex-direction: column; align-items: center; text-align: center; }
.title { font-size: 26px; font-weight: 950; letter-spacing: -0.3px; color: var(--text); margin-top: 10px; margin-bottom: 0; }
.subtitle { color: rgba(17, 18, 20, 0.65); font-weight: 700; }
.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;

  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    white-space: nowrap;
  }
}

/* Buttons */
.btn-brand {
  background-color: var(--brand); border-color: var(--brand); color: #fff; font-weight: 900; border-radius: 12px; transition: transform 0.2s, box-shadow 0.2s;
  &:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(227, 61, 207, 0.25); filter: brightness(1.05); }
}
.btn-glass {
  border-radius: 12px; font-weight: 900; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(3, 15, 170, 0.25); color: var(--blue);
  &:hover { transform: translateY(-2px); border-color: var(--brand); background: #fff; }
}

/* ✅ KPIs (ESTILO MUREG) */
.users-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 16px;
    width: 100%;

    @media (max-width: 992px) { grid-template-columns: repeat(2, 1fr); }
    @media (max-width: 576px) { grid-template-columns: 1fr; }
}
  
.kpi {
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(17,18,20,0.08);
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(8px);
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);

    &:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(227, 61, 207, 0.1);
        background: #fff;
        border-color: var(--brand);
    }

    .lbl {
        font-size: 0.72rem;
        font-weight: 900;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: var(--muted);
        &.text-success { color: var(--success-text) !important; }
        &.text-brand { color: var(--brand) !important; }
    }

    .val {
        font-size: 1.25rem;
        font-weight: 950;
        color: var(--text);
        &.text-success { color: var(--success-text) !important; }
        &.text-brand { color: var(--brand) !important; }
    }
}

/* Controls */
.controls { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.filter-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(17, 18, 20, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(17, 18, 20, 0.04);
}

.filter-tab {
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  color: rgba(17, 18, 20, 0.62);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  min-height: 34px;

  &:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(17, 18, 20, 0.08);
    transform: translateY(-1px);
  }

  &:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(227, 61, 207, 0.14);
  }

  &.active {
    background: #fff;
    color: var(--brand);
    border-color: rgba(227, 61, 207, 0.16);
    box-shadow: 0 2px 8px rgba(227, 61, 207, 0.15);
  }
}

.tipo-filter-tabs {
  .filter-tab {
    min-width: 122px;
  }
}

@media (max-width: 700px) {
  .tipo-filter-tabs {
    width: 100%;
    justify-content: stretch;
  }

  .tipo-filter-tabs .filter-tab {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 10px;
    font-size: 0.8rem;
  }
}

.search-group {
  max-width: 270px; border-radius: 12px; overflow: hidden; display: flex; align-items: stretch; background: #fff;  border: 1px solid rgba(17, 18, 20, 0.15);  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); transition: all 0.2s ease;
  &:focus-within { border-color: var(--brand); box-shadow: 0 4px 12px rgba(227, 61, 207, 0.15); transform: translateY(-1px); }
  .input-group-text { background: transparent; border: none; color: var(--muted); padding-left: 14px; padding-right: 8px; display: flex; align-items: center; i { font-size: 1rem; } }
  .form-control { border: none; background: transparent; padding: 10px 0; font-size: 0.9rem; color: var(--text); box-shadow: none; &::placeholder { color: rgba(17, 18, 20, 0.4); font-weight: 500; } &:focus { outline: none; } }
  .btn-clear { background: transparent; border: none; color: var(--muted); padding: 0 12px; display: flex; align-items: center; cursor: pointer; transition: color 0.2s; &:hover { color: #dc3545; } i { font-size: 1rem; } }
}

.select-glass {
  background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(17, 18, 20, 0.15); border-radius: 12px;
  color: var(--blue); font-weight: 800; font-size: 0.9rem; text-align: left;
  padding: 8px 36px 8px 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04); cursor: pointer; transition: all 0.2s ease; width: 100%;
  &:hover { background: #fff; border-color: var(--blue); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(3, 15, 170, 0.1); }
  &:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(227, 61, 207, 0.15); }
}
.select-wrapper { position: relative; display: inline-block; min-width: 90px; }
.select-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); font-size: 0.75rem; transition: transform 0.2s ease; }
.select-wrapper:hover .select-icon { color: var(--blue); }

/* Animation */
.animate-fade-in { animation: simpleFadeIn 0.5s ease-out forwards; }
@keyframes simpleFadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* BODY & GROUPS */
.geral-body { padding: 0; background: transparent; flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.groups-container { padding: 16px; overflow-y: auto; height: 100%; }
.group-list { display: flex; flex-direction: column; gap: 12px; }
.empty-group { background: rgba(255,255,255,0.7); border: 1px dashed rgba(17,18,20,0.12); border-radius: 16px; padding: 18px; text-align: center; font-weight: 800; color: var(--muted); }

.client-group-card {
  background: #fff; border-radius: 16px; border: 1px solid rgba(17,18,20,0.08); overflow: hidden; transition: all 0.3s ease;
  &:hover { border-color: var(--brand); box-shadow: 0 4px 12px rgba(227,61,207,0.1); }
  &.expanded { border-color: var(--brand); box-shadow: 0 8px 24px rgba(227,61,207,0.12); }
}
.group-header { padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; background: linear-gradient(180deg, #fff, #fdfdfd); &:hover .group-toggle-icon { color: var(--brand); } }
.group-info { display: flex; flex-direction: column; gap: 6px; }
.group-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-pill { font-size: 0.7rem; padding: 4px 10px; border-radius: 999px; font-weight: 800; text-transform: uppercase; 
    &.total { background: rgba(3,15,170,0.1); color: var(--blue); } 
    &.ok { background: var(--success-bg); color: var(--success-text); } 
}
.group-toggle-icon { font-size: 1.2rem; color: var(--muted); transition: transform 0.3s ease; }
.client-group-card.expanded .group-toggle-icon { transform: rotate(180deg); color: var(--brand); }
.group-body { border-top: 1px solid rgba(17,18,20,0.06); background: #fbfbfc; animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

.chip-muted { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 800; color: rgba(17,18,20,0.55); padding: 4px 10px; border-radius: 999px; background: rgba(17,18,20,0.04); border: 1px solid rgba(17,18,20,0.06); }
.inner-table-wrap { max-height: 450px; overflow-y: auto; }

/* TABLE */
.table-wrap { overflow-x: auto; overflow-y: auto; height: 100%; }
.table-modern {
  width: 100%; min-width: 1000px; border-collapse: separate; border-spacing: 0;
  thead th { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); border-bottom: 2px solid rgba(227, 61, 207, 0.15); padding: 12px; color: rgba(17, 18, 20, 0.7); font-size: 0.8rem; font-weight: 950; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; cursor: pointer; transition: color 0.2s; text-align: center !important; &:hover { color: var(--brand); } }
  tbody tr { transition: background-color 0.2s; border-bottom: 1px solid rgba(17,18,20,0.05); &:hover { background-color: rgba(227, 61, 207, 0.05); } td { border-bottom: 1px solid rgba(17,18,20,0.04); } }
  td { padding: 12px; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.875rem; color: var(--text); text-align: center !important; }
}
.text-brand { color: var(--brand) !important; }
.text-blue { color: var(--blue) !important; }
.fw-black { font-weight: 950; }
.td-clip { overflow: hidden; text-overflow: ellipsis; max-width: 250px; }
.empty-state { background: rgba(255,255,255,0.4); }

.actions-col { min-width: 152px; }

.action-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.btn-icon { 
    width: 32px; height: 32px; border: none; background: transparent; border-radius: 8px; 
    display: flex; align-items: center; justify-content: center; 
    color: rgba(17,18,20,0.5); transition: all 0.2s; cursor: pointer;
    &:hover { background: rgba(17,18,20,0.05); color: var(--text); transform: translateY(-1px); } 
    &.primary:hover { color: var(--blue); background: rgba(3,15,170,0.1); } 
    &.danger:hover { color: #dc3545; background: rgba(220, 53, 69, 0.12); }
}

/* FOOTER */
.geral-footer { padding: 14px 24px; border-top: 1px solid rgba(17, 18, 20, 0.06); display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; flex-shrink: 0; @media (max-width: 768px) { justify-content: center; text-align: center; } }
.pagination-modern .page-link { color: var(--blue); font-weight: 900; border-radius: 10px; border: 1px solid rgba(17,18,20,0.1); background: rgba(255,255,255,0.6); margin: 0 2px; &:hover { transform: translateY(-1px); border-color: var(--brand); color: var(--brand); } }
.pagination-modern .page-item.active .page-link { background-color: var(--blue); border-color: var(--blue); color: #fff; }

/* MODALS */
.modal-backdrop-custom { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 9990; backdrop-filter: blur(4px); }
.modal-custom { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 9995; padding: clamp(12px, 2.2vw, 20px); }
.modal-card { background: #ffffff; border: 1px solid rgba(255,255,255,0.8); border-radius: 20px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); overflow: hidden; display: flex; flex-direction: column; animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); width: min(850px, 100%); max-height: 90vh; min-height: 0; }
.modal-xl-custom { width: min(1050px, 95vw); max-height: 86vh; }
@keyframes modalPop { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { padding: 16px 24px; border-bottom: 1px solid rgba(0,0,0,0.06); background: #fff; display: flex; justify-content: space-between; align-items: center; .modal-title { font-size: 1.1rem; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 12px; } .icon-bg { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; &.primary-soft { background: rgba(3, 15, 170, 0.1); color: var(--blue); } &.danger-soft { background: rgba(220, 53, 69, 0.12); color: #dc3545; } } .btn-icon { color: var(--muted); background: transparent; font-size: 1.2rem; border:none; cursor: pointer; &:hover { color: var(--brand); } } } 
.modal-body { padding: 24px; overflow-y: auto; flex: 1; min-height: 0; &.bg-light-gray { background-color: #f8f9fa; } }
.modal-body .box-body { overflow: visible; }
.modal-footer { flex-shrink: 0; }

.modal-card.create-modal { width: min(1080px, 95vw); max-height: 86vh; }
.modal-card.create-modal .modal-header { background: linear-gradient(180deg, rgba(227, 61, 207, 0.08), #ffffff 70%); }
.modal-card.create-modal .modal-body { background: linear-gradient(180deg, rgba(248, 249, 250, 0.96), rgba(255, 255, 255, 0.98)); }
.modal-card.create-modal .edit-sections { gap: 14px; }
.modal-card.create-modal .detail-box { border: 1px solid rgba(227, 61, 207, 0.14); box-shadow: 0 10px 24px rgba(17, 18, 20, 0.06); }
.modal-card.create-modal .box-header { color: var(--brand); background: linear-gradient(135deg, rgba(227, 61, 207, 0.1), rgba(3, 15, 170, 0.07)); }
.modal-card.create-modal .box-body { background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(250, 250, 252, 0.96)); }
.modal-card.create-modal .form-field label { color: rgba(17, 18, 20, 0.68); }
.modal-card.create-modal .form-control,
.modal-card.create-modal .form-select { min-height: 40px; }
.modal-card.create-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 14px 20px !important;
  background: linear-gradient(180deg, #ffffff, rgba(248, 249, 251, 0.95));
}
.modal-card.create-modal .modal-footer .btn {
  border-radius: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}
.modal-card.create-modal .modal-footer .btn.me-2 { margin-right: 0 !important; }

@media (max-width: 700px) {
  .modal-card { border-radius: 16px; }
  .modal-header { padding: 12px 16px; }
  .modal-body { padding: 16px; }
  .modal-card.create-modal .modal-footer { flex-direction: column-reverse; }
  .modal-card.create-modal .modal-footer .btn { width: 100%; min-width: 0; }

  .modal-card.create-modal summary.box-header {
    padding: 10px 12px;

    span {
      font-size: 0.72rem;
      line-height: 1.2;
      gap: 7px;
    }

    i:not(.transition-icon) {
      width: 20px;
      height: 20px;
      border-radius: 6px;
      font-size: 0.8rem;
    }
  }

  .form-field.field-line {
    order: initial;
    grid-column: span 2;
  }

  .form-field.field-line .form-control {
    min-height: 42px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
  }

  .form-field.field-item {
    align-items: flex-start;
  }

  .form-field.field-item .form-control {
    width: 100%;
    max-width: none;
    min-height: 38px;
    text-align: left;
    font-size: 0.82rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
  }

  .user-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .user-modal-grid .span-2,
  .user-modal-grid .field-tipo,
  .user-modal-grid .field-line,
  .user-modal-grid .field-rg {
    grid-column: span 2 !important;
  }

  .user-modal-grid .field-item,
  .user-modal-grid .field-cpf-cnpj,
  .user-modal-grid .field-celular,
  .user-modal-grid .field-telefone {
    grid-column: span 1 !important;
    min-width: 0;
  }

  .user-modal-grid .field-item .field-hint {
    display: none;
  }

  .user-modal-grid .field-tipo .form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-height: 42px;
    border-radius: 12px;
    border-color: rgba(3, 15, 170, 0.18);
    background:
      linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,248,251,0.98));
    box-shadow: 0 2px 8px rgba(3, 15, 170, 0.06);
    padding-right: 34px;
    font-weight: 800;
    color: var(--blue);
    background-image:
      linear-gradient(45deg, transparent 50%, rgba(17,18,20,0.55) 50%),
      linear-gradient(135deg, rgba(17,18,20,0.55) 50%, transparent 50%);
    background-position:
      calc(100% - 16px) calc(50% - 2px),
      calc(100% - 11px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
  }

  .user-modal-grid .field-tipo .form-control:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(227,61,207,0.14);
  }

  .user-modal-grid .field-cpf-cnpj .form-control,
  .user-modal-grid .field-item .form-control {
    min-height: 40px;
    font-size: 0.84rem;
    font-variant-numeric: tabular-nums;
  }

  .user-modal-grid .field-rg .form-control {
    min-height: 40px;
    font-size: 0.88rem;
    max-width: 100%;
  }

  .contact-modal-grid .field-celular .form-control,
  .contact-modal-grid .field-telefone .form-control {
    width: 100%;
    min-width: 0;
    min-height: 40px;
  }
}

/* FORM & DETAILS */
.details-dashboard { display: grid; grid-template-columns: 1fr; gap: 20px; }
div.detail-box { background: #fff; border-radius: 16px; border: 1px solid rgba(0,0,0,0.05); box-shadow: 0 2px 8px rgba(0,0,0,0.02); overflow: hidden; height: 100%; display: flex; flex-direction: column; }
div.box-header {
  padding: 10px 16px;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  background: linear-gradient(135deg, rgba(227, 61, 207, 0.08), rgba(59, 130, 246, 0.08));
  display: flex;
  align-items: center;
}

div.box-body { padding: 16px; }

.edit-sections { display: grid; gap: 12px; }
.edit-sections .detail-box { border: 1px solid rgba(17, 18, 20, 0.08); box-shadow: 0 8px 22px rgba(17, 18, 20, 0.06); }

summary.box-header {
  cursor: pointer;
  user-select: none;
  list-style: none;
  border-radius: 14px 14px 0 0;
  transition: background 0.2s ease, color 0.2s ease;

  i:not(.transition-icon) {
    color: var(--brand);
    margin-right: 6px;
  }

  &::-webkit-details-marker { display: none; }
}

.modal-card.create-modal summary.box-header {
  padding: 11px 14px;
  border-bottom-color: rgba(227, 61, 207, 0.08);
  background: linear-gradient(135deg, rgba(227, 61, 207, 0.10), rgba(3, 15, 170, 0.06));

  span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: 0.76rem;
    line-height: 1.2;
    color: rgba(17, 18, 20, 0.84);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 900;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  i:not(.transition-icon) {
    width: 22px;
    height: 22px;
    margin-right: 0;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(227, 61, 207, 0.12);
    color: var(--brand);
    flex-shrink: 0;
  }
}

.transition-icon { transition: transform 0.25s ease, color 0.25s ease; color: var(--muted); }
details[open] .transition-icon { transform: rotate(180deg); color: var(--brand); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;

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

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;

  label {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(17,18,20,0.64);
  }

  &.span-2 { grid-column: span 2; }
}

.field-hint {
  display: block;
  font-size: 0.66rem;
  line-height: 1.2;
  color: rgba(17, 18, 20, 0.52);
  font-weight: 700;
}

.form-field.field-auto .form-control {
  background: rgba(245, 245, 247, 0.9);
  border-color: rgba(17, 18, 20, 0.1);
  color: rgba(17, 18, 20, 0.72);
}

.form-field.field-auto .form-control[readonly] {
  cursor: default;
}

.details-dashboard .form-field > div {
  border: 1px solid rgba(17, 18, 20, 0.08);
  border-radius: 12px;
  background: rgba(245, 245, 247, 0.65);
  min-height: 42px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 700;
  color: var(--text);
}

.form-control,
.form-select {
  border-radius: 10px;
  border: 1px solid rgba(17,18,20,0.15);
  background: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;

  &:hover { border-color: rgba(17, 18, 20, 0.38); }
  &:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(227,61,207,0.15);
    outline: none;
    transform: translateY(-1px);
  }
}

.confirm-delete {
  border: 1px solid rgba(220, 53, 69, 0.16);
  background: #fff;
  border-radius: 14px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 12px;

  p { font-weight: 700; color: rgba(17, 18, 20, 0.85); }
}

.confirm-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 53, 69, 0.12);
  color: #dc3545;
  flex-shrink: 0;
}
