/* ─── TOKENS (hereda del sistema global) ──────────────────── */
:root {
  --black:    #0d0d0d;
  --gray-900: #1a1a1a;
  --gray-800: #2c2c2c;
  --gray-600: #5c5c5c;
  --gray-400: #9c9c9c;
  --gray-200: #e4e4e4;
  --gray-100: #f5f5f5;
  --white:    #ffffff;

  --font-serif: 'Lora', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);

  --max-w: 1000px;
}

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--gray-100);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ─── NAV ─────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-200);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2rem);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
}

.nav__logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--black);
  color: var(--white);
  border-radius: 5px;
  font-size: .78rem;
  font-family: var(--font-sans);
  font-weight: 700;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav__email {
  font-size: .8rem;
  color: var(--gray-400);
}

.nav__logout {
  font-size: .8rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color .15s;
  padding: .35rem .75rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
}
.nav__logout:hover { color: var(--black); border-color: var(--gray-400); }

/* ─── MAIN ────────────────────────────────────────────────── */
.main {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 5vw, 2rem) 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* ─── HEADER ROW ──────────────────────────────────────────── */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.dash-header__greeting {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 600;
  color: var(--black);
  line-height: 1.2;
}

.dash-header__greeting #trialMsg {
  display: block;
  font-family: var(--font-sans);
  font-size: .82rem;
  font-weight: 400;
  color: var(--gray-400);
  margin-top: .2rem;
}

/* status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem 1rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  border: 1px solid var(--gray-200);
  background: var(--white);
  white-space: nowrap;
}

.status-pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-pill--trial .status-pill__dot { background: #f59e0b; }
.status-pill--active .status-pill__dot { background: #22c55e; box-shadow: 0 0 5px #22c55e; }

.status-pill--trial { color: var(--gray-800); }
.status-pill--active { color: var(--gray-800); }

/* ─── TOOLS SECTION ───────────────────────────────────────── */
.section-label {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: .75rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

@media (max-width: 640px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.tool-card {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.1rem 1.1rem 1rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: box-shadow .18s, border-color .18s, transform .15s;
  cursor: pointer;
}

.tool-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--gray-400);
  transform: translateY(-2px);
}

.tool-card:active {
  transform: translateY(0);
}

.tool-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--gray-100);
  border-radius: var(--radius-sm);
  color: var(--black);
  flex-shrink: 0;
}

.tool-card__name {
  font-size: .88rem;
  font-weight: 600;
  color: var(--black);
  line-height: 1.3;
}

.tool-card__desc {
  font-size: .76rem;
  color: var(--gray-600);
  line-height: 1.4;
  margin-top: -.2rem;
}

/* ─── LIMITS SECTION ──────────────────────────────────────── */
.limits-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.limits-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--gray-200);
}

.limits-header h2 {
  font-size: .82rem;
  font-weight: 600;
  color: var(--black);
}

.limits-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

@media (max-width: 600px) {
  .limits-grid { grid-template-columns: repeat(2, 1fr); }
}

.limits-item {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .9rem 1.1rem;
  border-right: 1px solid var(--gray-100);
}

.limits-item:last-child { border-right: none; }

@media (max-width: 600px) {
  .limits-item:nth-child(2) { border-right: none; }
  .limits-item:nth-child(1),
  .limits-item:nth-child(2) { border-bottom: 1px solid var(--gray-100); }
}

.limits-item__value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--black);
  letter-spacing: -.02em;
}

.limits-item__label {
  font-size: .72rem;
  color: var(--gray-400);
  line-height: 1.3;
}

/* ─── ACTIVITY ────────────────────────────────────────────── */
.activity-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.activity-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--gray-200);
}

.activity-header h2 {
  font-size: .82rem;
  font-weight: 600;
  color: var(--black);
}

.activity-header span {
  font-size: .75rem;
  color: var(--gray-400);
}

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

.activity-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: .5rem 1rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--gray-100);
  transition: background .12s;
}

.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background: var(--gray-100); }

.activity-item__name {
  font-size: .85rem;
  font-weight: 500;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-item__meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .15rem;
  flex-wrap: wrap;
}

.activity-item__tool {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--gray-400);
}

.activity-item__hash {
  font-family: 'Courier New', monospace;
  font-size: .72rem;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: .1rem .4rem;
  border-radius: 3px;
  max-width: 22ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-item__time {
  font-size: .75rem;
  color: var(--gray-400);
  white-space: nowrap;
  text-align: right;
}

.activity-item__verify {
  font-size: .72rem;
  color: var(--gray-400);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .12s;
  white-space: nowrap;
}
.activity-item__verify:hover { color: var(--black); }

.activity-empty {
  padding: 2rem 1.1rem;
  text-align: center;
  font-size: .85rem;
  color: var(--gray-400);
}

/* ─── ACCOUNT STRIP ───────────────────────────────────────── */
.account-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
}

.account-strip__info {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.account-strip__plan {
  font-size: .82rem;
  font-weight: 600;
  color: var(--black);
}

.account-strip__note {
  font-size: .75rem;
  color: var(--gray-400);
}

.account-strip__actions {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.btn-ghost {
  font-size: .78rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: .35rem .8rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: color .12s, border-color .12s;
}
.btn-ghost:hover { color: var(--black); border-color: var(--gray-400); }

.btn-danger {
  font-size: .78rem;
  font-weight: 500;
  color: #dc2626;
  padding: .35rem .8rem;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  background: #fff5f5;
  transition: background .12s, border-color .12s;
}
.btn-danger:hover { background: #fee2e2; border-color: #fca5a5; }

/* ─── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  transform: translateY(8px);
  transition: transform .2s;
}

.modal-overlay.open .modal { transform: translateY(0); }

.modal h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: .5rem;
}

.modal p {
  font-size: .87rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.modal__actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
}

/* ─── STRIPE / PLAN ───────────────────────────────────────── */
.app-banner {
  padding: .75rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.app-banner--success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.app-banner--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.expired-wall {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
  gap: 1rem;
}

.expired-wall h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
}

.expired-wall p {
  color: var(--gray-600);
  font-size: .9rem;
  max-width: 380px;
}

.expired-wall__btn {
  margin-top: .5rem;
  background: var(--black);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  padding: .75rem 2rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}

.expired-wall__btn:hover { opacity: .85; }

/* ─── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 500px) {
  .nav__email { display: none; }
  .dash-header { flex-direction: column; align-items: flex-start; }
  .account-strip { flex-direction: column; align-items: flex-start; }
  .account-strip__actions { width: 100%; }
  .btn-ghost, .btn-danger { flex: 1; text-align: center; }
  .activity-item { grid-template-columns: 1fr; }
  .activity-item__time { text-align: left; }
  .modal__actions { flex-direction: column-reverse; }
  .modal__actions button { width: 100%; padding: .6rem; }
}
