/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */
:root {
  --dsm-bg: #0b1220;
  --dsm-panel: #020617;
  --dsm-card: #020617;
  --dsm-surface: #0f172a;
  --dsm-surface-soft: rgba(15, 23, 42, .75);

  --dsm-border: #1e293b;
  --dsm-text: #e5e7eb;
  --dsm-muted: #94a3b8;

  --dsm-primary: #2563eb;
  --dsm-success: #22c55e;
  --dsm-warning: #f59e0b;
  --dsm-danger: #ef4444;

  --dsm-bubble-in: #111827;
  --dsm-bubble-out: #2563eb;

  --dsm-radius: 14px;
  --dsm-radius-lg: 20px;
  --dsm-transition: all .18s ease;
}

body {
  background: var(--dsm-bg);
  color: var(--dsm-text);
  margin: 0;
}


/* ===== SETTINGS LAYOUT ===== */
.settings-container {
  max-width: 900px;
  margin: 0 auto;
}

/* ===== CARDS ===== */
.card {
  background: var(--dsm-card);
  border: 1px solid var(--dsm-border);
  border-radius: 14px;
  color: var(--dsm-text);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--dsm-border);
  color: var(--dsm-text);
}

.card-body {
  color: var(--dsm-text);
}

/* ===== FORM ===== */
.form-label {
  color: var(--dsm-muted);
  font-size: 13px;
}

.form-control {
  background: rgba(15,23,42,.75);
  border: 1px solid rgba(148,163,184,.25);
  color: var(--dsm-text);
}

.form-control:focus {
  background: rgba(15,23,42,.95);
  border-color: rgba(37,99,235,.6);
  box-shadow: 0 0 0 .2rem rgba(37,99,235,.18);
  color: var(--dsm-text);
}

/* textarea igual que input */
textarea.form-control {
  resize: vertical;
}

/* ===== CHECKBOX ===== */
.form-check-input {
  background-color: #020617;
  border: 1px solid var(--dsm-border);
}

.form-check-input:checked {
  background-color: var(--dsm-primary);
  border-color: var(--dsm-primary);
}

.form-check-label {
  color: var(--dsm-muted);
}

/* ===== BUTTONS ===== */
.btn-primary {
  background: var(--dsm-primary);
  border: none;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-success {
  background: var(--dsm-success);
  border: none;
}

.btn-dark {
  background: #020617;
  border: 1px solid var(--dsm-border);
}

.btn-outline-secondary {
  border-color: var(--dsm-border);
  color: var(--dsm-muted);
}

.btn-outline-secondary:hover {
  background: rgba(148,163,184,.1);
  color: #fff;
}

/* ===== TEXT ===== */
.text-muted {
  color: var(--dsm-muted) !important;
}

button{
  border: none;
  background: unset;
}

/* ===== SETTINGS SHELL ===== */
.settings-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 270px 1fr;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 32%),
    linear-gradient(180deg, var(--dsm-panel), var(--dsm-bg));
  color: var(--dsm-text);
}

.settings-sidebar {
  border-right: 1px solid var(--dsm-border);
  background: rgba(2, 6, 23, .88);
  padding: 24px 16px;
}

.settings-sidebar-header {
  margin-bottom: 26px;
}

.settings-sidebar-header h2 {
  color: #fff;
  font-size: 22px;
  margin: 0;
  font-weight: 800;
}

.settings-sidebar-header p {
  color: var(--dsm-muted);
  margin: 4px 0 0;
  font-size: 13px;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-link {
  height: 48px;
  border-radius: var(--dsm-radius);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  color: var(--dsm-muted);
  text-decoration: none;
  transition: var(--dsm-transition);
}

.settings-link:hover,
.settings-link.active {
  background: rgba(37, 99, 235, .14);
  color: #fff;
}

.settings-link i {
  width: 20px;
}

.settings-content {
  padding: 28px;
  overflow-y: auto;
}

/* ===== SETTINGS PAGE ===== */
.settings-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.settings-page-header h1 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 800;
}

.settings-page-header p {
  margin: 6px 0 0;
  color: var(--dsm-muted);
}

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

.settings-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--dsm-radius-lg);
  background: rgba(2, 6, 23, .78);
  border: 1px solid var(--dsm-border);
  color: var(--dsm-text);
  text-decoration: none;
  transition: var(--dsm-transition);
}

.settings-card:hover {
  background: rgba(37, 99, 235, .10);
  border-color: rgba(37, 99, 235, .32);
  color: #fff;
  transform: translateY(-1px);
}

.settings-card i {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, .14);
  color: #93c5fd;
  font-size: 18px;
  flex-shrink: 0;
}

.settings-card strong {
  display: block;
  color: #fff;
  margin-bottom: 4px;
}

.settings-card span {
  display: block;
  color: var(--dsm-muted);
  font-size: 13px;
}


/* ===== WORKSPACE ===== */

.settings-workspace {
  display: flex;
  align-items: center;
  gap: 12px;

  padding-bottom: 22px;
  margin-bottom: 22px;

  border-bottom: 1px solid rgba(148,163,184,.08);
}

.workspace-avatar {
  width: 48px;
  height: 48px;

  border-radius: 16px;

  background:
    linear-gradient(
      135deg,
      rgba(37,99,235,.95),
      rgba(59,130,246,.65)
    );

  display: grid;
  place-items: center;

  color: white;
  font-weight: 700;
  font-size: 18px;

  flex-shrink: 0;

  box-shadow:
    0 10px 25px rgba(37,99,235,.22);
}

.workspace-meta {
  min-width: 0;
}

.workspace-meta h2 {
  margin: 0;

  color: #fff;

  font-size: 16px;
  font-weight: 700;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workspace-meta p {
  margin: 3px 0 0;

  color: var(--dsm-muted);

  font-size: 12px;
}

.dsm-side-modal {
  position: fixed;

  top: 0;
  right: 0;

  width: 520px;
  max-width: 100%;

  height: 100dvh;

  background: var(--dsm-panel);

  border-left: 1px solid var(--dsm-border);

  z-index: 9999;

  display: flex;
  flex-direction: column;

  box-shadow:
    -20px 0 40px rgba(0,0,0,.45);
}

.dsm-side-modal-header {
  padding: 20px;

  border-bottom: 1px solid var(--dsm-border);

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.dsm-side-modal-header h4 {
  margin: 0;
  color: #fff;
}

.dsm-side-modal-header p {
  margin-top: 4px;
  color: var(--dsm-muted);
  font-size: 13px;
}

.dsm-side-modal-body {
  flex: 1;

  overflow-y: auto;

  padding: 20px;
}
/* ===== DSM OFFCANVAS / TOOLS PANELS ===== */
.dsm-offcanvas {
  width: 380px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 34%),
    var(--dsm-panel);
  color: var(--dsm-text);
  border-right: 1px solid var(--dsm-border);
}

.dsm-offcanvas .offcanvas-header {
  padding: 18px;
  border-bottom: 1px solid var(--dsm-border);
}

.dsm-offcanvas .offcanvas-title,
.dsm-offcanvas h5 {
  color: #fff;
  font-weight: 800;
}

.dsm-offcanvas .offcanvas-body {
  padding: 16px;
}

/* ===== PROFILE TOOLS ===== */
.tools-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px 14px;
  border-radius: 14px;

  color: var(--dsm-text);
  text-decoration: none;

  transition: var(--dsm-transition);
}

.tools-item:hover {
  background: rgba(37, 99, 235, .12);
  color: #fff;
}

.tools-item i {
  width: 22px;
  color: var(--dsm-muted);
  font-size: 16px;
}

.tools-item:hover i {
  color: #93c5fd;
}

.tools-item-danger {
  color: #fca5a5;
}

.tools-item-danger i {
  color: #fca5a5;
}

.tools-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== QUICK REPLIES PANEL ===== */
.quick-reply-card {
  padding: 13px;
  border-radius: 16px;
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .16);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .16);
}

.quick-reply-card code {
  color: #93c5fd;
  font-weight: 800;
  font-size: 13px;
}

.quick-reply-card p {
  margin: 8px 0 12px;
  color: var(--dsm-muted);
  font-size: 13px;
  line-height: 1.35;
}

.quick-reply-card:hover {
  border-color: rgba(37, 99, 235, .35);
  background: rgba(15, 23, 42, .9);
}

/* ===== LABELS PANEL ===== */
#labelsPanel {
  width: 380px;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, .10), transparent 34%),
    var(--dsm-panel);
  color: var(--dsm-text);
  border-right: 1px solid var(--dsm-border);
}

#labelsPanel .offcanvas-header {
  border-bottom: 1px solid var(--dsm-border);
}

#labelsPanel .offcanvas-body {
  padding: 16px;
}

#labelsList > .d-flex {
  padding: 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, .55);
  border: 1px solid rgba(148, 163, 184, .12);
}

/* ===== DROPDOWN DARK FIX ===== */
.dropdown-menu {
  background: var(--dsm-panel);
  border: 1px solid var(--dsm-border);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0,0,0,.35);
}

.dropdown-item {
  color: var(--dsm-text);
  border-radius: 10px;
}

.dropdown-item:hover {
  background: rgba(37, 99, 235, .12);
  color: #fff;
}

.dropdown-divider {
  border-color: rgba(148, 163, 184, .14);
}
/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .settings-shell {
    grid-template-columns: 1fr;
  }

  .settings-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--dsm-border);
  }

  .settings-content {
    padding: 18px;
  }
    .settings-grid {
    grid-template-columns: 1fr;
  }
}

