/* public/assets/css/styles.css */

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --card: #f7f7f7;
  --border: rgba(17,17,17,0.08);
  --primary: #2563eb;
  --primary-contrast: #ffffff;
  --shadow: 0 10px 25px rgba(17,17,17,0.12);
  --radius: 16px;
  --container: 1100px;
}

:root[data-theme="dark"] {
  --bg: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --card: #1e293b;
  --border: rgba(229,231,235,0.10);
  --primary: #60a5fa;
  --primary-contrast: #0b1220;
  --shadow: 0 12px 28px rgba(0,0,0,0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.dropdown { position: relative; }

.dropdown > summary {
  list-style: none;
}

.dropdown > summary::-webkit-details-marker { display: none; }

.dropdown-menu {
  position: absolute;
  right: 0;
  margin-top: 10px;
  min-width: 240px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 1000;
}

.dropdown-item {
  display: block;
  padding: 10px 10px;
  border-radius: 10px;
  color: var(--text);
}

.dropdown-item:hover {
  background: rgba(37,99,235,0.10);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.badge {
  font-size: 12px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -3px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--primary);
  border-color: transparent;
  color: var(--primary-contrast);
}

.btn-primary:hover { transform: translateY(-2px); }

.hero {
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(37,99,235,0.10), rgba(96,165,250,0.06));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 8px);
  padding: 28px;
  position: relative;
  overflow: hidden;
}

:root[data-theme="dark"] .hero {
  background: linear-gradient(135deg, rgba(96,165,250,0.16), rgba(30,41,59,0.10));
}

.hero h1 {
  margin: 0;
  font-size: 40px;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero p {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero h1 { font-size: 34px; }
}

@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 30px; }
}

.section-title {
  margin: 28px 0 12px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.section-title .hint { color: var(--muted); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transform: translateY(0);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.meta .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.25);
}

:root[data-theme="dark"] .meta .pill {
  background: rgba(15,23,42,0.35);
}

.card .actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.reminder {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.reminder .row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.reminder .row .input { flex: 1; }

@media (max-width: 640px) {
  .reminder .row { flex-direction: column; align-items: stretch; }
}

.card .actions .btn {
  width: 100%;
  justify-content: center;
}

.fade-in {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  min-width: 220px;
  max-width: 340px;
}

.toast .title {
  font-weight: 700;
  margin-bottom: 4px;
}

.toast .message {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table th, .table td {
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

.table th { color: var(--muted); font-weight: 700; }

.input, .textarea, .select {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.textarea { min-height: 120px; resize: vertical; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }

.form-actions { display: flex; gap: 10px; margin-top: 12px; }

.small { font-size: 13px; color: var(--muted); }
