/* AyaPolaris 全站樣式 */
:root{ --ay-primary:#1e3a5f; --ay-accent:#2d6a9f; }
body{ font-family:system-ui,"Noto Sans TC",sans-serif; background:#f4f6f9; color:#333; margin:0; }
.ay-nav{ display:flex; align-items:center; gap:1rem; background:linear-gradient(135deg,var(--ay-primary),var(--ay-accent));
  color:#fff; padding:.6rem 1.2rem; box-shadow:0 2px 8px rgba(0,0,0,.15); }
.ay-brand{ font-weight:700; font-size:1.15rem; }
.ay-links{ display:flex; gap:.3rem; flex:1; }
.ay-links a{ color:#dbe7f3; text-decoration:none; padding:.4rem .8rem; border-radius:6px; font-size:.95rem; }
.ay-links a:hover{ background:rgba(255,255,255,.15); color:#fff; }
.ay-links a.active{ background:rgba(255,255,255,.25); color:#fff; font-weight:600; }
.ay-user{ font-size:.9rem; }
.ay-role{ background:rgba(255,255,255,.2); border-radius:10px; padding:.1rem .5rem; margin:0 .5rem; font-size:.8rem; }
.ay-logout{ color:#ffd; text-decoration:underline; }
.ay-main{ max-width:1200px; margin:1.5rem auto; padding:0 1rem; }
.ay-main h1{ font-size:1.4rem; color:var(--ay-primary); margin:.2rem 0 1rem; }
.ay-card{ background:#fff; border-radius:12px; box-shadow:0 2px 12px rgba(0,0,0,.06); padding:1.2rem 1.4rem; margin-bottom:1.2rem; }
.ay-toolbar{ display:flex; gap:.5rem; align-items:center; margin-bottom:1rem; flex-wrap:wrap; }
/* 狀態徽章 */
.badge-status{ padding:.25rem .6rem; border-radius:12px; font-size:.82rem; white-space:nowrap; }
.st-pending{ background:#e3f2fd; color:#1565c0; }
.st-revise{ background:#fff3cd; color:#856404; }
.st-approved_unsigned{ background:#e8f5e9; color:#f57f17; }
.st-approved{ background:#e8f5e9; color:#2e7d32; }
.st-rejected{ background:#ffebee; color:#c62828; }
.st-expired{ background:#eeeeee; color:#757575; }
/* 表格 */
table.dataTable td, table.dataTable th{ font-size:.9rem; }
.dt-expand, .dt-control{ cursor:pointer; user-select:none; }
.dt-child-detail{ background:#f8fafc; padding:.6rem 1rem; border-left:3px solid var(--ay-accent); }
.dt-child-detail table{ width:100%; font-size:.85rem; }
.dt-child-detail th{ text-align:left; color:#666; padding:.2rem .6rem; white-space:nowrap; }
.dt-child-detail td{ padding:.2rem .6rem; }
/* 共學群組底色（場地分配 assign.php；後端把 grp-N class 掛在 <tr>）。
   需壓過 DataTables 的 table.dataTable tbody tr{background:#fff}（選擇器較具體），故上色到 td 並加 !important。 */
tr.grp-1>td{background:#fff8e1!important}tr.grp-2>td{background:#e1f5fe!important}tr.grp-3>td{background:#f3e5f5!important}tr.grp-4>td{background:#e8f5e9!important}
tr.grp-5>td{background:#fce4ec!important}tr.grp-6>td{background:#e0f2f1!important}tr.grp-7>td{background:#fff3e0!important}tr.grp-8>td{background:#ede7f6!important}
/* 表單 */
.ay-form label{ font-weight:600; font-size:.9rem; color:#444; }
.ay-form .form-text{ color:#999; font-size:.8rem; }
.week-row{ border-bottom:1px solid #eee; padding:.5rem 0; }
.week-no{ font-weight:700; color:var(--ay-primary); }
/* 簽名板 */
.sign-area{ border:2px dashed #bbb; border-radius:8px; min-height:120px; display:flex; align-items:center;
  justify-content:center; cursor:pointer; background:#fafafa; }
.sign-area.has-sign{ border-style:solid; border-color:#2e7d32; }
.sign-area img{ max-height:120px; }
.sign-modal-canvas{ border:1px solid #999; border-radius:6px; touch-action:none; background:#fff; width:100%; }
.text-muted-sm{ color:#999; font-size:.8rem; }
@media(max-width:700px){ .ay-links{ flex-wrap:wrap; } .ay-main{ padding:0 .5rem; } }
