/**
 * Guacamole Clean UI - Refined
 */

:root {
  --bg: #f4f6f9;
  --bg-white: #ffffff;
  --card-border: #e2e8f0;
  --card-hover: #ffffff;

  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #a0aec0;

  --accent: #4f86f7;
  --accent-hover: #3b6fd4;
  --accent-bg: #ebf2ff;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.05);

  --radius: 10px;
  --radius-lg: 14px;
}

/* =========================================================
   BASE
   ========================================================= */

html, body {
  background: var(--bg) !important;
  color: var(--text-primary) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

#content {
  background: transparent !important;
}

/* =========================================================
   HEADER
   ========================================================= */

.header {
  background: var(--bg-white) !important;
  border-bottom: 1px solid var(--card-border) !important;
  box-shadow: var(--shadow-sm) !important;
}

.header * {
  color: var(--text-primary) !important;
  font-weight: 500;
}

.header a {
  text-decoration: none;
  transition: color 0.15s ease;
}

.header a:hover {
  color: var(--accent) !important;
}

/* =========================================================
   HOME
   ========================================================= */

.home,
.home-view {
  background: transparent !important;
}

/* =========================================================
   GRUPOS
   ========================================================= */

.home-connection-group-name {
  color: var(--text-primary) !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
}

/* =========================================================
   LISTA - MANTÉM LAYOUT ORIGINAL
   ========================================================= */

.connection-list,
.connection-list-ui {
  background: transparent !important;
}

/* =========================================================
   CARDS
   ========================================================= */

.home-connection {
  background: var(--bg-white) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
  transition: all 0.2s ease !important;
  cursor: pointer;
  overflow: hidden;
}

.home-connection:hover {
  background: var(--card-hover) !important;
  border-color: var(--accent) !important;
  box-shadow: var(--shadow-lg) !important;
  transform: translateY(-3px);
}

.home-connection:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md) !important;
}

/* Thumbnail */
.home-connection .thumbnail,
.home-connection .icon {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--card-border);
  border-radius: 0 !important;
  transition: opacity 0.2s ease;
}

.home-connection:hover .thumbnail,
.home-connection:hover .icon {
  opacity: 0.9;
}

/* Nome */
.home-connection .name {
  color: var(--text-primary) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
  line-height: 1.4;
  transition: color 0.15s ease;
}

.home-connection:hover .name {
  color: var(--accent) !important;
}

/* Caption */
.home-connection .caption,
.home-connection .description {
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
  line-height: 1.5;
}

/* =========================================================
   CONEXÕES RECENTES
   ========================================================= */

.recent-connections {
  background: var(--bg-white) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-sm) !important;
}

/* =========================================================
   MENUS / DROPDOWNS
   ========================================================= */

.user-menu,
.menu-dropdown {
  background: var(--bg-white) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 4px;
}

.user-menu .menu-item,
.menu-dropdown .menu-item {
  color: var(--text-primary) !important;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.user-menu .menu-item:hover,
.menu-dropdown .menu-item:hover {
  background: var(--accent-bg) !important;
  color: var(--accent) !important;
}

/* =========================================================
   INPUTS
   ========================================================= */

input,
select,
textarea {
  background: var(--bg-white) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius) !important;
  color: var(--text-primary) !important;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c4cfe0 !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-bg) !important;
}

input::placeholder {
  color: var(--text-muted) !important;
}

label {
  color: var(--text-secondary) !important;
  font-size: 0.9rem;
  font-weight: 500;
}

/* =========================================================
   BOTÕES
   ========================================================= */

button,
.button,
input[type="button"],
input[type="submit"] {
  background: var(--accent) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: var(--radius) !important;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-sm);
}

button:hover,
.button:hover,
input[type="button"]:hover,
input[type="submit"]:hover {
  background: var(--accent-hover) !important;
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-1px);
}

button:active,
.button:active {
  transform: translateY(0);
}

/* =========================================================
   TABELAS
   ========================================================= */

table {
  background: var(--bg-white) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius);
  overflow: hidden;
  border-collapse: separate;
  border-spacing: 0;
}

th {
  background: var(--bg) !important;
  color: var(--text-secondary) !important;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

td {
  color: var(--text-primary) !important;
  border-top: 1px solid var(--card-border);
}

tr:hover td {
  background: var(--bg) !important;
}

/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* =========================================================
   SELEÇÃO
   ========================================================= */

::selection {
  background: var(--accent-bg);
  color: var(--accent);
}

/* =========================================================
   ACESSIBILIDADE
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

*:focus-visible {
  outline: 2px solid var(--accent) !important;
  outline-offset: 2px;
}

