:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f1f3f4;
  --text: #202124;
  --muted: #5f6368;
  --border: #e3e5e8;

  --meet-green: #00AC47;
  --meet-green-strong: #008f3a;
  --google-blue: #4285F4;
  --google-blue-bg: #e8f0fe;
  --google-red: #EA4335;
  --google-red-bg: #fce8e6;
  --google-yellow: #FBBC05;
  --google-yellow-bg: #fef7e0;

  --accent: var(--meet-green);
  --accent-strong: var(--meet-green-strong);
  --danger: var(--google-red);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Yu Gothic UI", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

header h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

header h1 a {
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

header h1 img {
  width: 24px;
  height: 24px;
}

header nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 0.9rem;
}

header nav a {
  color: var(--muted);
  text-decoration: none;
}

header nav a:hover {
  color: var(--accent);
}

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

h2 {
  font-size: 1.3rem;
  margin: 2rem 0 0.75rem;
  font-weight: 600;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.05);
}

input[type="text"],
input[type="url"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

input[type="text"]:focus,
input[type="url"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 172, 71, 0.15);
}

button {
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent);
}

.row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.row > input {
  flex: 1;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

.error {
  color: var(--danger);
}

.session {
  border-left: 3px solid var(--accent);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.05);
}

.session-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.session-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.links a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}

.links a:hover {
  background: var(--surface);
}

.link-transcript {
  background: var(--google-blue-bg) !important;
  border-color: var(--google-blue-bg) !important;
  color: var(--google-blue) !important;
}

.link-transcript:hover {
  border-color: var(--google-blue) !important;
}

.link-recording {
  background: var(--google-red-bg) !important;
  border-color: var(--google-red-bg) !important;
  color: var(--google-red) !important;
}

.link-recording:hover {
  border-color: var(--google-red) !important;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface-2);
}

.signin {
  max-width: 380px;
  margin: 6rem auto;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  box-shadow: 0 1px 3px rgba(60, 64, 67, 0.08);
}

.signin h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
}

.signin h1 img {
  width: 32px;
  height: 32px;
}

.signin button {
  width: 100%;
  font-size: 1rem;
  padding: 0.8rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: var(--surface-2);
  color: var(--muted);
}

.badge-admin {
  background: var(--google-blue-bg);
  color: var(--google-blue);
}

code {
  background: var(--surface-2);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

.loading-dots::after {
  content: "";
  display: inline-block;
  width: 1.5em;
  text-align: left;
  animation: dots 1.2s steps(4, end) infinite;
}

@keyframes dots {
  0%   { content: ""; }
  25%  { content: "."; }
  50%  { content: ".."; }
  75%  { content: "..."; }
  100% { content: "..."; }
}
