* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

#user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

#user-info img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

#user-info a {
  color: #888;
  text-decoration: none;
}

#user-info a:hover {
  color: #333;
}

.hidden {
  display: none !important;
}

.card {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Login */
.login-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  max-width: 400px;
  margin: 3rem auto 0;
}

.login-card h2 {
  margin-bottom: 0.5rem;
}

.login-card p {
  color: #888;
  margin-bottom: 1.5rem;
}

/* Header whale */
.header-whale {
  width: 28px;
  height: 28px;
  vertical-align: middle;
  margin-right: 0.4rem;
  opacity: 0.7;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
}

.btn-google {
  background: #4285f4;
  color: #fff;
}

.btn-google:hover {
  background: #3367d6;
}

.btn-primary {
  background: #111;
  color: #fff;
}

.btn-primary:hover {
  background: #333;
}

.btn-secondary {
  background: none;
  color: #555;
  border: 1px solid #ddd;
  font-size: 0.85rem;
}

.btn-secondary:hover {
  background: #f5f5f5;
  border-color: #ccc;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-danger {
  background: none;
  color: #cc3333;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  border: 1px solid #cc3333;
  border-radius: 4px;
}

.btn-danger:hover {
  background: #cc3333;
  color: #fff;
}

/* Form */
.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.optional {
  color: #999;
  font-weight: 400;
}

.form-group input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #111;
}

.form-group select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
}

/* Stats */
.stat {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
}

.stat-label {
  color: #666;
  font-size: 0.95rem;
}

/* Entries table */
.entry-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.entry-row:last-child {
  border-bottom: none;
}

.entry-dates {
  font-weight: 500;
}

.entry-days {
  font-size: 0.8rem;
  color: #666;
  margin-left: 0.5rem;
}

.entry-desc {
  font-size: 0.85rem;
  color: #888;
}

.status-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  margin-left: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-submitted {
  background: #fff3cd;
  color: #856404;
}

.status-approved {
  background: #d4edda;
  color: #155724;
}

.entry-info {
  flex: 1;
}

.error {
  color: #cc3333;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.muted {
  color: #999;
  font-size: 0.9rem;
}

/* Admin */
.admin-container {
  max-width: 780px;
}

.admin-label {
  font-size: 0.75rem;
  font-weight: 600;
  background: #111;
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.filter-row label {
  font-size: 0.85rem;
  font-weight: 500;
}

.filter-row select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
  background: #fff;
}

.entry-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.btn-approve {
  background: #155724;
  color: #fff;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
}

.btn-approve:hover {
  background: #1a7a31;
}

.btn-approve-sm {
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.welcome-msg {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
}

/* Pending inbox */
.pending-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.85rem;
}

.pending-row:last-child {
  border-bottom: none;
}

.pending-name {
  font-weight: 600;
  white-space: nowrap;
}

.pending-dates {
  color: #555;
  white-space: nowrap;
}

.pending-days {
  color: #888;
  font-size: 0.8rem;
  white-space: nowrap;
}

.pending-desc {
  color: #999;
  font-size: 0.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Summary table */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.summary-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid #eee;
}

.summary-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

.summary-table tr:last-child td {
  border-bottom: none;
}

@media (max-width: 480px) {
  .container {
    padding: 1rem 0.75rem;
  }

  header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  header h1 {
    font-size: 1.2rem;
  }

  #user-info {
    font-size: 0.8rem;
    gap: 0.5rem;
  }

  #user-info img {
    width: 28px;
    height: 28px;
  }

  .header-whale {
    width: 22px;
    height: 22px;
  }

  .card {
    padding: 1rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.85rem;
  }

  .entry-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .entry-dates {
    font-size: 0.9rem;
  }

  .entry-actions {
    display: flex;
    gap: 0.4rem;
  }

  .status-badge {
    margin-left: 0;
    font-size: 0.65rem;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }

  .login-card {
    margin: 1.5rem auto 0;
    padding: 2rem 1.25rem;
  }

  /* Admin mobile */
  .admin-container {
    max-width: 100%;
  }

  .admin-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .admin-label {
    font-size: 0.65rem;
  }

  .pending-row {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .pending-desc {
    flex-basis: 100%;
    padding-left: 0;
  }

  .filter-row {
    font-size: 0.8rem;
  }

  .filter-row select {
    font-size: 0.8rem;
  }

  .summary-table {
    font-size: 0.8rem;
  }

  .summary-table th,
  .summary-table td {
    padding: 0.4rem 0.5rem;
  }
}
