/*
 * aprismo-app.css — Fælles design-system for alle Aprismo apps
 * Alle apps importerer denne fil og tilføjer kun app-specifik CSS ovenpå.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Design tokens ── */
:root {
  --navy:     #1a3a8a;
  --navy2:    #0f1f52;
  --blue:     #2563eb;
  --blue2:    #3b82f6;
  --muted:    #64748b;
  --border:   #e2e8f0;
  --bg:       #f8fafc;
  --card:     #ffffff;
  --radius:   13px;
  --radius-sm:8px;
  --shadow:   0 1px 4px rgba(15,28,53,0.07);
  --shadow-md:0 4px 16px rgba(15,28,53,0.1);
  --max-w:    680px;
  --font:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--navy);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── App header ── */
.app-header {
  background: var(--navy);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.app-header-left {
  display: flex; align-items: center; gap: 0.75rem;
  min-width: 0; flex: 1; overflow: hidden;
}

/* Aprismo logo — klikbar hjemknap */
.app-home-link {
  display: flex; align-items: center; gap: 0.4rem;
  text-decoration: none; flex-shrink: 0;
  transition: opacity 0.15s;
}
.app-home-link:hover { opacity: 0.8; }
.app-home-link svg { flex-shrink: 0; }
.app-home-text {
  font-size: 0.92rem; font-weight: 800;
  color: white; letter-spacing: -0.03em;
}
.app-home-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #2563eb; display: inline-block;
  margin-left: 1px; vertical-align: super;
}

.app-header-divider {
  width: 1px; height: 16px;
  background: rgba(255,255,255,0.2);
  flex-shrink: 0;
}
.app-header-title {
  color: rgba(255,255,255,0.7);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 0.4rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-header-right {
  display: flex; align-items: center; gap: 0.75rem;
  flex-shrink: 0;
}
.app-back-link {
  color: rgba(255,255,255,0.5);
  text-decoration: none; font-size: 0.78rem; font-weight: 500;
  white-space: nowrap; transition: color 0.15s;
}
.app-back-link:hover { color: rgba(255,255,255,0.9); }

/* ── Accent stripe ── */
.app-stripe {
  height: 3px;
  background: linear-gradient(90deg, #2563eb 0%, #f07c28 40%, #ef4444 70%, #f5c11c 100%);
}

/* ── Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 5rem;
}

/* ── Tab bar ── */
.app-tabs {
  background: var(--navy);
  display: flex;
  padding: 0 1.25rem 0.85rem;
  gap: 0.4rem;
}
.app-tab {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(255,255,255,0.15);
  background: transparent;
  color: rgba(255,255,255,0.55);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
  white-space: nowrap;
}
.app-tab:hover { background: rgba(255,255,255,0.1); color: white; }
.app-tab.active {
  background: white;
  border-color: white;
  color: var(--navy);
}

/* ── Card ── */
.card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 0.75rem; }

/* ── Section title ── */
.section-title {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
  margin-bottom: 0.6rem;
  margin-top: 1.5rem;
}
.section-title:first-child { margin-top: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--navy);
  color: white;
}
.btn-primary:hover { background: #1a3560; }

.btn-blue {
  background: var(--blue);
  color: white;
}
.btn-blue:hover { background: #1d4ed8; }

.btn-outline {
  background: white;
  color: var(--muted);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: #94a3b8; color: var(--navy); }

.btn-danger {
  background: none;
  color: #dc2626;
  border: 1.5px solid #fecaca;
}
.btn-danger:hover { background: #fef2f2; border-color: #dc2626; }

.btn-full { width: 100%; }
.btn-sm { padding: 0.35rem 0.85rem; font-size: 0.78rem; }

/* ── Inputs ── */
input[type=text], input[type=email], input[type=date],
input[type=time], input[type=number], input[type=url],
input[type=password], textarea, select {
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--navy);
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  width: 100%;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* ── Form group ── */
.form-group {
  display: flex; flex-direction: column; gap: 0.3rem;
  flex: 1;
}
.form-group label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-row {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center;
  font-size: 0.68rem; font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 99px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.badge-green  { background: #dcfce7; color: #166534; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-gray   { background: #f1f5f9; color: #64748b; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-purple { background: #ede9fe; color: #5b21b6; }

/* ── List items ── */
.list-item {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
  transition: box-shadow 0.15s;
}
.list-item:hover { box-shadow: var(--shadow-md); }

/* ── Icon circle ── */
.icon-circle {
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--muted);
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.88rem; line-height: 1.6; }

/* ── Toast ── */
.apr-toast {
  position: fixed; bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1e293b; color: white;
  padding: 0.65rem 1.25rem;
  border-radius: 99px;
  font-size: 0.82rem; font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  z-index: 9999;
  animation: toastIn 0.2s ease;
  white-space: nowrap;
}
@keyframes toastIn {
  from { opacity:0; transform: translateX(-50%) translateY(8px); }
  to   { opacity:1; transform: translateX(-50%) translateY(0); }
}

/* ── Scrollbar (desktop) ── */
@media (min-width: 768px) {
  ::-webkit-scrollbar { width: 6px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
}

/* ── Responsive ── */
@media (max-width: 520px) {
  .container { padding: 1rem 1rem 5rem; }
  .app-header { padding: 0.75rem 1rem; }
  .app-tabs { padding: 0 1rem 0.75rem; }
  .app-header-title, .app-header-divider { display: none; }
  .app-header-left { flex: 0 0 auto; }
}
