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

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

.container {
  max-width: 960px;
  margin: 40px auto;
  padding: 20px;
}

nav {
  background: #fff;
  padding: 12px 20px;
  margin-bottom: 20px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  color: #1a73e8;
  text-decoration: none;
  font-size: 14px;
}

nav a:hover { text-decoration: underline; }

nav .nav-right { margin-left: auto; }

h1 { margin-bottom: 20px; font-size: 24px; }
h2 { margin-bottom: 16px; font-size: 20px; }

form {
  background: #fff;
  padding: 24px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  max-width: 480px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: 500;
  font-size: 14px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group textarea { resize: vertical; min-height: 80px; }

button {
  background: #1a73e8;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

button:hover { background: #1557b0; }

.error {
  background: #fce8e6;
  color: #c5221f;
  padding: 10px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

.success {
  background: #e6f4ea;
  color: #1e8e3e;
  padding: 10px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

.info {
  background: #e8f0fe;
  color: #1a73e8;
  padding: 10px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

th, td {
  padding: 10px 14px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

th { background: #f8f9fa; font-weight: 600; }

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-available { background: #e6f4ea; color: #1e8e3e; }
.badge-mine { background: #e8f0fe; color: #1a73e8; }
.badge-taken { background: #fce8e6; color: #c5221f; }

.badge-count {
  display: inline-block;
  font-size: 12px;
  color: #666;
  margin-left: 4px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  text-align: center;
}

.stat-card .number { font-size: 32px; font-weight: 700; color: #1a73e8; }
.stat-card .label { font-size: 14px; color: #666; margin-top: 4px; }

.filter-form {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.filter-form .form-group { margin-bottom: 0; }

.filter-form input, .filter-form select {
  padding: 6px 10px;
  font-size: 14px;
}

.school-info {
  background: #fff;
  padding: 16px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 16px;
}

.school-info p { margin-bottom: 4px; font-size: 14px; }

.btn-register {
  background: #1e8e3e;
}

.btn-register:hover { background: #167a2f; }

.link-btn {
  background: none;
  border: none;
  color: #1a73e8;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  text-decoration: none;
}

.link-btn:hover { text-decoration: underline; }

.btn-danger {
  background: #c5221f;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.btn-danger:hover { background: #a31b19; }

.btn-disabled {
  background: #e0e0e0;
  color: #999;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: not-allowed;
}

.tooltip-wrap {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  visibility: hidden;
  background: #333;
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 4px;
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 10;
}

.tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -4px;
  border-width: 4px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}

.tooltip-wrap:hover .tooltip-text {
  visibility: visible;
}
