/* Minimalist shadcn/ui-inspired base styles */
:root {
  --accent: #FFDF00; /* vibrant yellow accent */
  --danger: #e53935;
  --bg: #ffffff; /* pure white background */
  --fg: #000000; /* true black text for maximum contrast */
  --muted: #555555; /* secondary text */
  --border: #eaeaea;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.05);
}
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}
.brand { color: var(--fg); text-decoration: none; font-weight: 700; display:flex; gap:.5rem; align-items:center; }
.brand .mark { width:22px; height:22px; background: var(--accent); display:inline-block; border-radius:6px; }
.topbar {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 2rem;
  box-shadow: var(--shadow);
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.container {
  max-width: 480px;
  margin: 2rem auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}
.container-wide {
  max-width: 1120px;
  margin: 2rem auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem 2rem;
}
.hero { text-align: center; padding: 1rem 0 0.5rem; }
.hero .logo-hero { display:block; margin: 2rem auto 1rem; width: clamp(140px, 28vw, 240px); height:auto; }
.hero h1 { margin: 0.5rem 0 0; font-size: 2rem; font-weight: 700; }
.hero p { margin: 0.25rem 0 1.5rem; color: var(--muted); }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
/* App grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem 1.5rem;
}
.app-tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  box-shadow: var(--shadow);
  transition: box-shadow .2s ease;
}
.app-tile:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.app-icon-wrap { width: 56px; height: 56px; flex: 0 0 56px; border-radius: 14px; background:#f7f7f7; display:grid; place-items:center; overflow:hidden; }
.app-icon { width: 44px; height: 44px; object-fit: contain; display:block; transition: transform .22s ease; }
.app-tile:hover .app-icon { transform: scale(1.1); }
.app-meta { flex: 1; min-width: 0; }
.app-title { display:flex; align-items:center; gap:.5rem; font-weight:700; }
.app-desc { color: var(--muted); font-size: .95rem; margin-top: .2rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; }
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.btn {
  display: inline-block;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 0.5rem 1.2rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  outline: none;
}
.btn-primary {
  background: var(--accent);
  color: #000; /* high contrast on yellow */
}
.btn-secondary {
  background: #f3f4f6;
  color: var(--fg);
}
.btn-ghost {
  background: #000;
  color: var(--accent);
  border: 1px solid var(--border);
}
.btn-destructive {
  background: var(--danger);
  color: #fff;
}
.btn:focus {
  box-shadow: 0 0 0 2px var(--accent);
}
.btn:hover {
  filter: brightness(0.97);
}
.input {
  width: 100%;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 1rem;
  background: #fff;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}
.label {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
  color: var(--fg);
}
.error {
  color: var(--danger);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}
.table th, .table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.table th {
  background: #fafafa;
  color: var(--fg);
  font-weight: 600;
}
.table tr:nth-child(even) {
  background: #fcfcfc;
}
.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  background: #f3f4f6;
  color: var(--muted);
  margin-left: 0.5rem;
}
.badge-admin { background: var(--accent); color: #000; }
.badge-editor { background: #e0e7ff; color: #3730a3; }
.badge-viewer { background: #e0f7fa; color: #006064; }

.muted { color: var(--muted); }
.section { margin: 2rem 0 1rem; font-weight: 600; }
.toolbar { display:flex; gap:.5rem; align-items:center; }
.input-group { display:flex; gap:.5rem; align-items:center; }
.tabs { display:flex; gap:.5rem; margin-bottom:1rem; flex-wrap: wrap; }
.tabs a { padding:.45rem .8rem; border:1px solid var(--border); border-radius:999px; color:inherit; text-decoration:none; }
.tabs a.active { background:#f3f4f6; border-color:#d1d5db; }

/* Admin config layout */
.layout-config { display:flex; gap: 2rem; }
.layout-config .side { width: 220px; border-right:1px solid var(--border); padding-right: 1.25rem; display:flex; flex-direction:column; gap:.25rem; }
.layout-config .side a { display:block; padding:10px 16px; border-radius:8px; color: var(--fg); text-decoration:none; font-weight:600; transition: background 0.2s; }
.layout-config .side a.active { background: #fff7b3; /* subtle yellow tint */ }
.layout-config .side a:not(.active):hover { background: #f6f6f6; }
.layout-config .content { flex: 1; padding: 0.5rem 0; }

@media (max-width: 600px) {
  .container { max-width: 98vw; padding: 1rem; }
  .container-wide { max-width: 98vw; padding: 1rem; }
  .topbar { padding: 0.5rem 1rem; }
  .layout-config { flex-direction: column; }
  .layout-config .side { width: 100%; border-right:none; border-bottom:1px solid var(--border); padding-right:0; padding-bottom:0.75rem; }
}
