/* ── Custom properties ────────────────────────────────────────────── */
:root {
  --accent:      #6366f1;
  --accent-dark: #4f46e5;
  --nav-bg:      #0f172a;
  --border:      #e2e8f0;
  --muted:       #94a3b8;
  --text-sub:    #64748b;
  --bg:          #f1f5f9;
}

/* ── Base ─────────────────────────────────────────────────────────── */
body {
  background: var(--bg);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ── Navbar ───────────────────────────────────────────────────────── */
.app-navbar {
  background: var(--nav-bg);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  color: #fff !important;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
  letter-spacing: -0.3px;
}

.app-nav-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-email {
  color: rgba(255,255,255,0.35);
  font-size: 0.775rem;
  padding: 0 6px;
}

.nav-logout {
  font-size: 0.775rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.65) !important;
  text-decoration: none !important;
  margin-left: 4px;
  transition: border-color 0.15s, color 0.15s;
}
.nav-logout:hover {
  border-color: rgba(255,255,255,0.35);
  color: #fff !important;
}

/* ── Main layout ──────────────────────────────────────────────────── */
.app-main {
  padding: 1.5rem 1.75rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Dashboard header ─────────────────────────────────────────────── */
.dash-header { margin: 1rem 0 1.75rem; }
.dash-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.dash-subtitle {
  color: var(--text-sub);
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}
.dash-group {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-sub);
  margin: 1.75rem 0 0.75rem;
}
.dash-empty {
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: var(--text-sub);
}

/* ── Service grid ─────────────────────────────────────────────────── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.service-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15,23,42,0.10);
  border-color: #c7d2fe;
}

.service-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2ff;
  border-radius: 10px;
}

.service-body { min-width: 0; }

.service-name {
  font-size: 0.975rem;
  font-weight: 600;
  color: #0f172a;
}
.service-desc {
  font-size: 0.825rem;
  color: var(--text-sub);
  margin-top: 2px;
}
.service-url {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Auth card ────────────────────────────────────────────────────── */
.form-label { font-size: 0.825rem; font-weight: 500; color: #374151; }
.form-control { font-size: 0.875rem; border-color: var(--border); border-radius: 7px; }
.form-control:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }

.btn-primary {
  --bs-btn-bg:                   var(--accent);
  --bs-btn-border-color:         var(--accent);
  --bs-btn-hover-bg:             var(--accent-dark);
  --bs-btn-hover-border-color:   var(--accent-dark);
  --bs-btn-active-bg:            #4338ca;
  --bs-btn-active-border-color:  #4338ca;
  --bs-btn-focus-shadow-rgb:     99, 102, 241;
  --bs-btn-disabled-bg:          var(--accent);
  --bs-btn-disabled-border-color: var(--accent);
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  padding: 2rem 2rem 1.75rem;
}

.auth-logo {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  margin: 0 auto 1.1rem;
  line-height: 1;
}

.modal-content {
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
