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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  font-size: 14px;
}

.container {
  max-width: 100%;
  padding: 16px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #ddd;
}

header h1 { font-size: 20px; }
header h1 a { color: inherit; text-decoration: none; }
header nav { display: flex; gap: 8px; }

.btn {
  display: inline-block;
  padding: 6px 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  text-decoration: none;
  background: #2563eb;
  color: #fff;
}
.btn:hover { background: #1d4ed8; }
.btn-add { background: #16a34a; }
.btn-add:hover { background: #15803d; }
.btn-cancel { background: #6b7280; }
.btn-cancel:hover { background: #4b5563; }
.btn-delete { background: #dc2626; }
.btn-delete:hover { background: #b91c1c; }
.btn-logout { background: #6b7280; }

.btn-retry {
  background: none;
  border: 1px solid #dc2626;
  color: #dc2626;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  padding: 1px 4px;
  line-height: 1;
}
.btn-retry:hover { background: #fef2f2; }

.error {
  background: #fef2f2;
  color: #dc2626;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
  border: 1px solid #fecaca;
}

.empty { text-align: center; padding: 40px; color: #6b7280; }
.empty a { color: #2563eb; }

/* Login */
.login-container {
  max-width: 320px;
  margin: 100px auto;
  text-align: center;
}
.login-container h1 { margin-bottom: 24px; }
.login-container form { display: flex; flex-direction: column; gap: 12px; }
.login-container input {
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}

/* Link form */
.link-form { max-width: 500px; }
.link-form label { display: block; margin-bottom: 12px; font-weight: 500; }
.link-form input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 14px;
}
.form-actions { display: flex; gap: 8px; margin-top: 16px; }

/* Table */
.table-wrapper {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
}

table {
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 12px;
}

th, td {
  padding: 6px 8px;
  border: 1px solid #e5e7eb;
  text-align: center;
}

th { background: #f9fafb; font-weight: 600; position: sticky; top: 0; z-index: 1; }

.sticky-col {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
  text-align: left;
  min-width: 140px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
thead .sticky-col { z-index: 3; background: #f9fafb; }

.sticky-col2 {
  position: sticky;
  left: 140px;
  background: #fff;
  z-index: 2;
  min-width: 50px;
  font-weight: 600;
}
thead .sticky-col2 { z-index: 3; background: #f9fafb; }

.note-cell a { color: #2563eb; text-decoration: none; }
.note-cell a:hover { text-decoration: underline; }

.date-col { min-width: 70px; }
.today { background: #eff6ff !important; }

.vote-cell { position: relative; }
.vote-cell.success { background: #f0fdf4; }
.vote-cell.fail { background: #fef2f2; }
.vote-cell.pending { background: #fefce8; }

.status-ok { color: #16a34a; font-weight: 600; }
.status-fail { color: #dc2626; }
.status-pending { color: #ca8a04; }

.retry-form { display: inline; margin-left: 2px; }

.count-cell { color: #16a34a; }

.actions-bar {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.actions-right { margin-left: auto; }
.btn-schedule { background: #6b7280; }
.btn-schedule:hover { background: #4b5563; }

h2 { margin-bottom: 16px; }

/* Language switcher */
.lang-switcher { display: inline-flex; gap: 4px; }
.lang-switcher a {
  padding: 4px 6px;
  border-radius: 3px;
  text-decoration: none;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  opacity: 0.5;
}
.lang-switcher a.active {
  border-color: #2563eb;
  opacity: 1;
}
.lang-switcher a:hover { opacity: 1; }
.lang-switcher svg { display: block; }
