/* ========================================================
   校園平板借用系統 - Custom Styles
   ======================================================== */

:root {
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --accent: #10b981;
  --bg-soft: #f8fafc;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", sans-serif;
  background-color: #f1f5f9;
}

/* 平板網格單元格設計 */
.tablet-btn {
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  position: relative;
  border: 2px solid transparent;
}

/* 狀態：可用 */
.tablet-btn.available {
  background-color: #ffffff;
  color: #1e293b;
  border-color: #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.tablet-btn.available:hover {
  border-color: #93c5fd;
  background-color: #eff6ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.15);
}

/* 狀態：已勾選 */
.tablet-btn.selected {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #ffffff;
  border-color: #1d4ed8;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px) scale(1.02);
}

/* 狀態：已被借出 / 衝堂衝突 (不可選) */
.tablet-btn.disabled {
  background-color: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
  cursor: not-allowed;
  opacity: 0.75;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(239, 68, 68, 0.05),
    rgba(239, 68, 68, 0.05) 6px,
    transparent 6px,
    transparent 12px
  );
}

/* 車輛卡片選中狀態 */
.cart-card {
  transition: all 0.2s ease;
  cursor: pointer;
}
.cart-card.active {
  border-color: #3b82f6 !important;
  background-color: #eff6ff !important;
  box-shadow: 0 0 0 2px #93c5fd;
}

/* 節次標籤 (Pill) */
.period-pill {
  transition: all 0.15s ease;
  cursor: pointer;
  border: 1.5px solid #e2e8f0;
}
.period-pill:hover {
  border-color: #60a5fa;
  background-color: #f0f7ff;
}
.period-pill.active {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #1d4ed8;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

/* 看板課表格子動畫 */
.matrix-cell {
  min-height: 52px;
  transition: background-color 0.15s ease;
}
.matrix-cell:hover {
  background-color: #f8fafc;
}

/* 滾動條美化 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 列印專用樣式 */
@media print {
  body {
    background: white;
  }
  .no-print {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
}
