/* ============================================================
   Local Dashboard — Modern Slate Glass (padrão -4)
   Superfícies sólidas Material + tiles 56px + busca cyan
   ============================================================ */

:root {
  /* cores */
  --bg: #0f131d;
  --surface-container: #1c1f2a;
  --surface-container-high: #262a35;
  --surface-container-highest: #313540;

  --on-surface: #ffffff;
  --on-variant: rgba(255, 255, 255, 0.7);
  --outline: rgba(255, 255, 255, 0.55);
  --outline-variant: #464554;

  --primary: #c0c1ff;
  --cyan: #06b6d4;
  --cyan-hover: #22d3ee;
  --tertiary: #10b981;
  --tertiary-soft: #6ee7b7;
  --error: #ef4444;
  --error-soft: #fca5a5;
  --error-container: rgba(239, 68, 68, 0.18);

  /* tipografia */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* raio */
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-full: 9999px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--on-surface);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  display: none;
}

::selection {
  background: var(--primary);
  color: #1000a9;
}

.material-symbols-outlined {
  font-variation-settings: "opsz" 20;
}

/* ---------- utilidades ---------- */

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   START PAGE
   ============================================================ */

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bg-layer.visible {
  opacity: 1;
}

.bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 19, 29, 0.45) 0%,
    rgba(15, 19, 29, 0.72) 100%
  );
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.corner-btns {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
}

.corner-group {
  position: relative;
}

.settings-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  padding: 6px;
  border-radius: var(--r-md);
  background: rgba(30, 33, 42, 0.88);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 40;
}

.settings-menu[hidden] {
  display: none;
}

.settings-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 18px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.settings-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.settings-item .material-symbols-outlined {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
}

.settings-item:hover .material-symbols-outlined {
  color: #ffffff;
}

.settings-provider {
  flex-direction: column;
  align-items: stretch;
  cursor: default;
  margin-bottom: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0;
}

.settings-provider:hover {
  background: transparent;
}

.settings-provider-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
}

.settings-provider-label .material-symbols-outlined {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
}

.segmented {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.seg-btn {
  flex: 1;
  padding: 6px 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--font-sans);
  font-size: 12px;
  line-height: 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.seg-btn:hover {
  color: #ffffff;
}

.seg-btn.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.bg-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.bg-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}

.bg-btn:active {
  transform: scale(0.94);
}

.bg-btn .material-symbols-outlined {
  font-size: 20px;
}

.startpage {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 32px;
  z-index: 1;
  user-select: none;
  -webkit-user-select: none;
}

.cast {
  position: relative;
  width: 100%;
  max-width: 860px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- HERO: clock & date ---------- */

.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 20px;
}

.brand {
  margin-bottom: 8px;
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 18px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.clock-cluster {
  display: flex;
  align-items: baseline;
  justify-content: center;
}

.clock {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Helvetica, Arial, sans-serif;
  font-size: 88px;
  line-height: 96px;
  font-weight: 200;
  letter-spacing: -0.04em;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.clock-colon {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Helvetica Neue",
    Helvetica, Arial, sans-serif;
  font-size: 88px;
  line-height: 96px;
  font-weight: 200;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.4);
  padding: 0 4px;
  animation: colon-pulse 1.6s ease-in-out infinite;
}

@keyframes colon-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

.date-row {
  margin-top: 6px;
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- SEARCH PILL ---------- */

.search-zone {
  width: 100%;
  max-width: 560px;
  margin-bottom: 24px;
}

.search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border-radius: var(--r-md);
  background: var(--surface-container);
  border: 1px solid rgba(70, 69, 84, 0.4);
  transition: background 0.2s, border-color 0.2s;
}

.search-box:hover {
  background: var(--surface-container-high);
}

.search-box:focus-within {
  background: var(--surface-container-high);
  border-color: var(--primary);
}

.search-icon {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
  transition: color 0.2s;
}

.search-box:focus-within .search-icon {
  color: #ffffff;
}

.search-box input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 20px;
  letter-spacing: -0.01em;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.hotkey {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  line-height: 14px;
  font-weight: 500;
  flex-shrink: 0;
  user-select: none;
}

.add-fav-btn {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border: 1px solid rgba(70, 69, 84, 0.4);
  border-radius: var(--r-md);
  background: var(--surface-container);
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.add-fav-btn:hover {
  background: var(--surface-container-high);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.add-fav-btn:active {
  transform: scale(0.96);
}

.add-fav-btn .material-symbols-outlined {
  font-size: 22px;
}

/* ---------- SEGMENTED CONTROL TABS ---------- */

.tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.tab-btn.drag-over {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(124, 189, 255, 0.4);
}

.tab-sep {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 4px;
}

.tab-add {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tab-add:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.tab-add .material-symbols-outlined {
  font-size: 16px;
}

/* ---------- NEWS FEED ---------- */

.news-grid {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: stretch;
  width: 100%;
  max-width: 760px;
  margin-bottom: 20px;
}

.resize-handle.news-resize,
.resize-handle.news-resize.active {
  right: 50%;
  bottom: -12px;
  transform: translateX(50%);
}

.news-zone {
  flex: 1;
  min-width: 0;
  padding: 14px 18px;
  border-radius: 20px;
  background: rgba(28, 31, 42, 0.32);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.news-zone[hidden] {
  display: none;
}

.news-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.news-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.news-refresh {
  width: 26px;
  height: 26px;
}

.news-refresh:hover .material-symbols-outlined {
  animation: spin 0.6s linear;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.news-list {
  display: flex;
  flex-direction: column;
}

.news-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: background 0.15s, border-radius 0.15s;
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

.news-title-text {
  flex: 1;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 18px;
  font-weight: 500;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-meta {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 12px;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}

.news-loading,
.news-error {
  padding: 14px 2px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- FAVORITES AREA ---------- */

.fav-area {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fav-shelf {
  position: relative;
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--fav-shelf-pad, 28px);
  border-radius: 24px;
  background: rgba(28, 31, 42, 0.32);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.resize-handle {
  position: absolute;
  right: 16px;
  bottom: 12px;
  width: 36px;
  height: 20px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  transition: background 0.15s, border-color 0.15s;
}

.resize-handle[hidden] {
  display: none;
}

.resize-handle .resize-icon {
  width: 16px;
  height: 16px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

.resize-handle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.resize-handle.active {
  background: rgba(255, 255, 255, 0.26);
  border-color: var(--cyan);
}

.resize-handle.active .resize-icon {
  color: #ffffff;
}

.group-panel {
  display: none;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: var(--tile-gap, 14px);
  width: 100%;
  max-width: none;
}

.group-panel.active {
  display: flex;
}

/* --- tile dinâmico (escala via --tile-* vars) --- */

.fav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--tile-pad, 6px);
  width: var(--tile-col, 72px);
}

.fav-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tile-size, 56px);
  height: var(--tile-size, 56px);
  flex-shrink: 0;
  border-radius: var(--tile-border, var(--r-md));
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  overflow: hidden;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.fav-tile img {
  position: relative;
  z-index: 1;
  width: var(--tile-icon, 30px);
  height: var(--tile-icon, 30px);
  border-radius: calc(var(--tile-border, var(--r-md)) * 0.5);
  object-fit: contain;
}

.fav-tile .letter {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: var(--tile-letter, 18px);
  font-weight: 600;
}

.fav-item:hover .fav-tile {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(calc(var(--tile-pad, 6px) * -1));
}

.fav-item.dragging .fav-tile {
  opacity: 0.35;
  transform: translateY(calc(var(--tile-pad, 6px) * -1));
}

.fav-item.drag-target .fav-tile {
  box-shadow: 0 0 0 2px var(--primary);
}

.fav-name {
  max-width: var(--tile-col, 72px);
  font-family: var(--font-sans);
  font-size: var(--tile-font, 11px);
  line-height: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
}

/* --- menu de opções --- */

.fav-menu-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.15s, color 0.15s;
}

.fav-item:hover .fav-menu-btn {
  display: flex;
}

.fav-menu-btn:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.fav-menu-btn .material-symbols-outlined {
  font-size: 13px;
}

.fav-menu {
  position: absolute;
  top: calc(var(--tile-size, 56px) + var(--tile-pad, 6px) + 16px);
  right: -8px;
  width: 132px;
  padding: 4px;
  border-radius: var(--r-md);
  background: rgba(30, 33, 42, 0.82);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.65);
  z-index: 50;
}

.fav-menu[hidden] {
  display: none;
}

.fav-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.fav-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.fav-menu-item.danger {
  color: var(--error);
}

.fav-menu-item.danger:hover {
  background: var(--error-container);
}

.fav-menu-item .material-symbols-outlined {
  font-size: 14px;
}

/* ---------- MANAGER LINK ---------- */

.manage-link {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: color 0.2s;
}

.manage-link:hover {
  color: rgba(255, 255, 255, 0.8);
}

.manage-link:focus-visible {
  outline: none;
  color: rgba(255, 255, 255, 0.8);
}

.manage-link .material-symbols-outlined {
  font-size: 14px;
}

/* ============================================================
   MODAL
   ============================================================ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.overlay[hidden] {
  display: none;
}

.modal {
  width: 100%;
  max-width: 440px;
  padding: 24px;
  border-radius: var(--r-lg);
  background: var(--surface-container-high);
  border: 1px solid rgba(70, 69, 84, 0.4);
  box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.65);
  animation: modal-in 0.2s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(70, 69, 84, 0.3);
  margin-bottom: 18px;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.icon-btn .material-symbols-outlined {
  font-size: 18px;
}

.icon-btn.danger {
  color: var(--error);
}

.icon-btn.danger:hover {
  background: var(--error-container);
  color: var(--error-soft);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.field label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.field input,
.field select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(70, 69, 84, 0.4);
  border-radius: 8px;
  background: var(--surface-container);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field select {
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.6) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.6) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

.field input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.field input:focus,
.field select:focus {
  border-color: var(--cyan);
}

.field-hint {
  font-size: 10px;
  line-height: 12px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
}

.feed-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feed-row .field:first-child {
  flex: 1;
  min-width: 0;
}

.feed-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feed-block + .feed-block {
  padding-top: 16px;
  border-top: 1px solid rgba(70, 69, 84, 0.3);
}

.feed-count-field {
  flex-shrink: 0;
  width: 96px;
}

.url-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preset-thumb {
  position: relative;
  height: 64px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.preset-thumb:hover {
  transform: scale(1.03);
  border-color: var(--cyan);
}

.preset-thumb.selected {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px var(--cyan);
}

.preset-name {
  position: absolute;
  inset: auto 0 0 0;
  padding: 4px 6px;
  font-size: 10px;
  line-height: 12px;
  text-align: left;
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

.url-row input {
  flex: 1;
  min-width: 0;
}

.icon-well {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.icon-well img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.icon-well .material-symbols-outlined {
  font-size: 22px;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.flex-spacer {
  flex: 1;
}

.btn-primary,
.btn-ghost,
.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, filter 0.15s, transform 0.15s;
}

.btn-primary {
  background: var(--cyan);
  color: #000000;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--cyan-hover);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-danger {
  background: var(--error-container);
  color: var(--error);
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-danger[hidden],
.btn-ghost[hidden] {
  display: none;
}

.btn-danger .material-symbols-outlined {
  font-size: 16px;
}

/* ============================================================
   GERENCIAR CATEGORIAS
   ============================================================ */

.cat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 42vh;
  overflow-y: auto;
  margin-bottom: 16px;
}

.cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-container);
  border: 1px solid rgba(70, 69, 84, 0.3);
}

.cat-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-count {
  font-size: 10px;
  line-height: 12px;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

.cat-note {
  font-size: 10px;
  line-height: 12px;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
}

.cat-row .icon-btn {
  width: 26px;
  height: 26px;
}

.confirm-msg {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 20px;
}

.confirm-msg strong {
  color: #ffffff;
  font-weight: 600;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */

@media (max-width: 720px) {
  .news-grid {
    flex-direction: column;
  }
}

@media (max-width: 639px) {
  .corner-btns {
    top: 12px;
    right: 14px;
  }

  .feed-row {
    flex-direction: column;
    gap: 4px;
  }

  .feed-count-field {
    width: 100%;
  }

  .bg-btn {
    top: auto;
    right: auto;
    width: 36px;
    height: 36px;
  }

  .news-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .resize-handle {
    display: none;
  }

  .clock,
  .clock-colon {
    font-size: 56px;
    line-height: 64px;
    letter-spacing: -0.03em;
  }

  .date-row {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  .cast {
    padding: 0 8px;
  }
}