/* Layout UCP + identidade Gemini Bot */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --g-cyan: #5ee6d0;
  --g-violet: #8b6cf2;
  --g-ink: #f5f5f2;
  --g-bg: #0b0e14;
  --g-panel: #12161f;
  --g-card: #181d28;
  --g-line: #2a3344;
  --g-muted: #9aa3b5;
  --g-ok: #3ecf8e;
  --g-bad: #f07178;
  --ucp-accent: #8b6cf2;
  --ucp-accent-hover: #6f52d4;
  --ucp-accent-top: #a78bfa;
  --font: 'Space Grotesk', 'Segoe UI', Tahoma, Arial, sans-serif;
  --mono: Consolas, 'Cascadia Mono', monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--g-ink);
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(94, 230, 208, 0.18), transparent 55%),
    radial-gradient(700px 380px at 80% 10%, rgba(139, 108, 242, 0.22), transparent 50%),
    var(--g-bg);
}

a {
  color: var(--g-cyan);
  text-decoration: none;
  font-weight: 700;
}

a:hover {
  color: #9ef5e6;
}

.shell {
  max-width: 1100px;
  margin: 28px auto 48px;
  padding: 0 14px;
}

.shell.shell-wide {
  max-width: 1480px;
}

.brand-hero {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px 4px;
  background: transparent;
}

.brand-hero img {
  max-width: min(560px, 90vw);
  max-height: 240px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  background: transparent;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.45));
}

.panel {
  background: var(--g-panel);
  border: 1px solid var(--g-line);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 0 8px;
  background: linear-gradient(90deg, #10141c, #151a25 40%, #12161f);
  border-bottom: 1px solid var(--g-line);
  color: #fff;
}

.header .icon-top {
  display: none;
}

.header .server-name {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff !important;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1rem;
  padding-left: 16px;
  letter-spacing: 0.06em;
  min-width: 0;
}

.header .server-name img {
  height: 36px;
  max-width: min(280px, 50vw);
  width: auto;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.header .opts {
  display: flex;
  gap: 8px;
  align-items: center;
}

.header .opts .muted {
  color: var(--g-muted);
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
}

.header .opts button,
.header .opts .btn {
  min-width: auto;
  width: auto;
  padding: 10px 14px;
  margin: 0;
}

.body-grid {
  display: grid;
  grid-template-columns: 168px 1fr;
  min-height: 520px;
  overflow: hidden;
  border-radius: 0 0 14px 14px;
}

.side {
  background: linear-gradient(180deg, #151a24, #10141c);
  color: #fff;
  padding: 10px 0;
  border-right: 1px solid var(--g-line);
}

.side a,
.side .side-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 52px;
  color: #c9d0de !important;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  padding: 0 14px 0 16px;
  text-align: left;
  line-height: 1.2;
  white-space: nowrap;
}

.side a:hover,
.side .side-item:hover,
.side .side-item.active {
  background: rgba(139, 108, 242, 0.12);
  border-left-color: var(--g-cyan);
  color: #fff !important;
}

.main {
  background: #0f131b;
  padding: 0;
  min-width: 0;
}

.breadcrumb {
  list-style: none;
  margin: 0;
  padding: 14px 18px;
  background: #141924;
  border-bottom: 1px solid var(--g-line);
  color: var(--g-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.breadcrumb span {
  color: var(--g-cyan);
}

.content {
  padding: 18px 20px 28px;
}

.welcome {
  margin: 0 0 16px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--g-cyan), var(--g-violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.dash-grid.dash-grid-admin {
  grid-template-columns: repeat(5, 1fr);
}

.dash-card {
  background: linear-gradient(160deg, #1a2030 0%, #141924 100%);
  border: 1px solid var(--g-line);
  border-radius: 12px;
  padding: 18px 18px 16px;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.dash-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--g-cyan), var(--g-violet));
}

.dash-card.accent-cyan::before {
  background: linear-gradient(90deg, #5ee6d0, #3ecf8e);
}

.dash-card.accent-violet::before {
  background: linear-gradient(90deg, #8b6cf2, #c084fc);
}

.dash-card.accent-blue::before {
  background: linear-gradient(90deg, #3b82f6, #5ee6d0);
}

.dash-label {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--g-muted);
}

.dash-value {
  margin: 12px 0 6px;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.1;
  color: #f5f5f2;
}

.dash-value.plan-lite {
  background: linear-gradient(90deg, #5ee6d0, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dash-value.plan-pro {
  background: linear-gradient(90deg, #a78bfa, #8b6cf2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.dash-sub {
  margin: 0;
  font-size: 0.85rem;
  color: var(--g-muted);
  font-weight: 500;
  line-height: 1.45;
}

.dash-card .dash-foot {
  margin-top: auto;
  padding-top: 14px;
}

.dash-card .dash-foot .btn,
.dash-card .dash-foot button {
  width: 100%;
  min-width: 0;
}

.dash-card.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.key-box {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 10px 0 14px;
}

.key-box .mono {
  flex: 1;
  min-width: 200px;
  margin: 0;
  padding: 12px 14px;
  background: #0c1017;
  border: 1px solid var(--g-line);
  border-radius: 8px;
  word-break: break-all;
}

.client-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
}

.client-toolbar input[type='search'] {
  flex: 1;
  min-width: 200px;
  margin: 0;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  min-width: 0 !important;
  padding: 8px 12px !important;
  font-size: 0.75rem !important;
  background: transparent !important;
  border: 1px solid var(--g-line) !important;
  color: var(--g-muted) !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.pill.active,
.pill:hover {
  border-color: var(--g-violet) !important;
  color: #fff !important;
  background: rgba(139, 108, 242, 0.15) !important;
}

.client-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.client-card {
  background: #121722;
  border: 1px solid var(--g-line);
  border-radius: 12px;
  padding: 14px 16px;
}

.client-card.is-pending {
  border-color: rgba(230, 184, 77, 0.45);
}

.client-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.client-card-top h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f5f5f2;
  text-transform: none;
  letter-spacing: 0;
  border: 0;
  padding: 0;
}

.client-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
  margin-bottom: 12px;
}

.client-meta-item {
  background: #0c1017;
  border: 1px solid var(--g-line);
  border-radius: 8px;
  padding: 10px 12px;
}

.client-meta-item .lab {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--g-muted);
  margin-bottom: 4px;
}

.client-meta-item .val {
  font-size: 0.9rem;
  color: #e8ecf5;
  word-break: break-all;
  font-weight: 500;
}

.client-meta-item .val.mono {
  font-family: var(--mono);
  font-size: 0.82rem;
}

.client-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid var(--g-line);
  margin-top: 4px;
}

@media (max-width: 1200px) {
  .dash-grid.dash-grid-admin {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .dash-grid,
  .dash-grid.dash-grid-admin {
    grid-template-columns: 1fr;
  }
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
}

.card {
  background: var(--g-card);
  border: 1px solid var(--g-line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 14px;
}

.card.login-card {
  max-width: 460px;
  margin: 36px auto;
}

h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

h2 {
  margin: 0 0 12px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #e8ecf5;
  border-bottom: 1px solid var(--g-line);
  padding-bottom: 8px;
}

.muted {
  color: var(--g-muted);
  margin: 0 0 14px;
  font-weight: 500;
}

label {
  display: block;
  font-size: 0.85rem;
  color: #b8c0d0;
  font-weight: 700;
  margin: 12px 0 6px;
}

input,
button,
textarea {
  font: inherit;
}

input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--g-line);
  background: #0c1017;
  color: var(--g-ink);
}

input:focus {
  outline: none;
  border-color: var(--g-violet);
  box-shadow: 0 0 0 3px rgba(139, 108, 242, 0.2);
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  min-width: 140px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--g-cyan), var(--g-violet));
  color: #0b0e14 !important;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  transition: filter 0.2s, transform 0.15s;
}

button:hover,
.btn:hover {
  filter: brightness(1.06);
}

button:active,
.btn:active {
  transform: translateY(1px);
}

button.secondary,
.btn.secondary {
  background: transparent;
  border-color: var(--g-line);
  color: var(--g-ink) !important;
}

button.secondary:hover,
.btn.secondary:hover {
  border-color: var(--g-violet);
  background: rgba(139, 108, 242, 0.12);
  filter: none;
}

button.danger {
  background: #8b2e34;
  border-color: #8b2e34;
  color: #fff !important;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  align-items: flex-end;
}

.err {
  color: var(--g-bad);
  margin-top: 10px;
  white-space: pre-wrap;
  font-weight: 650;
}

.ok {
  color: var(--g-ok);
  font-weight: 650;
}

.mono {
  font-family: var(--mono);
  word-break: break-all;
  background: #0c1017;
  border: 1px solid var(--g-line);
  padding: 10px 12px;
  border-radius: 8px;
  display: inline-block;
  max-width: 100%;
  color: #d7deea;
}

.table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid var(--g-line);
  vertical-align: middle;
  white-space: nowrap;
}

.table td:nth-child(5) {
  white-space: normal;
}

.table th {
  background: #141924;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--g-muted);
}

.table .mono,
.table .key-cell {
  word-break: normal;
  white-space: nowrap;
  padding: 6px 10px;
  margin: 0;
  font-size: 0.82rem;
}

.table .pc-cell {
  white-space: nowrap;
}

.actions-cell {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: center;
  white-space: nowrap;
}

button.btn-compact,
.btn.btn-compact {
  min-width: 0;
  padding: 8px 12px;
  font-size: 0.75rem;
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #243041;
  color: #c9d0de;
}

.badge.active {
  background: rgba(62, 207, 142, 0.15);
  color: var(--g-ok);
}

.badge.revoked {
  background: rgba(240, 113, 120, 0.15);
  color: var(--g-bad);
}

.badge.pending {
  background: rgba(245, 180, 0, 0.18);
  color: #e6b84d;
}

.topbar {
  display: none;
}

.footer-note {
  display: none;
}

.form-row {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--g-line);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.form-row:hover {
  border-color: rgba(139, 108, 242, 0.45);
}

.form-desc {
  width: 140px;
  flex-shrink: 0;
  padding: 0 12px;
  line-height: 46px;
  font-weight: 700;
  text-align: right;
  color: #c9d0de;
}

.form-camp {
  flex: 1;
  padding: 5px 5px 5px 0;
}

.form-camp input {
  height: 36px;
  margin: 0;
  border: 0;
  width: 100%;
  background: transparent;
  box-shadow: none;
}

.form-camp input:focus {
  box-shadow: none;
}

@media (max-width: 820px) {
  .body-grid {
    grid-template-columns: 1fr;
  }
  .side {
    display: flex;
    overflow-x: auto;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--g-line);
  }
  .side a,
  .side .side-item {
    flex: 1;
    min-width: 90px;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }
  .side a:hover,
  .side .side-item.active {
    border-bottom-color: var(--g-cyan);
    border-left-color: transparent;
  }
  .form-row {
    flex-direction: column;
  }
  .form-desc {
    width: 100%;
    text-align: left;
    line-height: 1.4;
    padding-top: 10px;
  }
  .header .server-name span {
    display: none;
  }
}
