/* Sambungan page: Google account and linked Google Sheets */
.sheets-google, .sheets-purpose { padding: 20px; }
.sheets-google { margin-bottom: 18px; }
.sheets-google h3 .drive-mark, .sheets-purpose h3 span { color: #1a73e8; margin-right: 4px; }
.sheets-account { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-weight: 600; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted, #657184); }
.status-dot.ok { background: #1e8e3e; }
.sheets-grid { display: grid; gap: 18px; }
.sheet-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 12px; }
.sheet-item { border: 1px solid var(--border, #e2e7ed); border-radius: 12px; padding: 14px; display: grid; gap: 8px; min-width: 0; }
.sheet-item-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.sheet-item-head a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.sheet-item-head a:hover strong { text-decoration: underline; }
.sheet-item-head span { font-size: 13px; color: var(--muted, #657184); }
.sheet-status { font-size: 13px; color: var(--muted, #657184); }
.sheet-status.ok { color: #1e8e3e; }
.sheet-status.warn { color: #9a6700; }
.sheet-status.error { color: var(--danger, #b42318); }
.sheet-panel { border-top: 1px dashed var(--border, #e2e7ed); margin-top: 6px; padding-top: 14px; display: grid; gap: 12px; min-width: 0; }
.sheet-panel-title { margin: 0; font-weight: 700; }
.sheet-panel label, .sheet-defaults label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.sheet-panel select, .sheet-panel input[type=time] { min-height: 40px; padding: 8px 10px; border: 1px solid var(--border, #e2e7ed); border-radius: 10px; font: inherit; background: var(--surface, #fff); color: inherit; max-width: 100%; }
.sheet-mapping-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sheet-defaults { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.sheet-defaults fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.sheet-defaults legend { font-weight: 600; margin-bottom: 6px; }
.sheet-defaults .agent-actions { grid-column: 1 / -1; }
label.check { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; }
.sheet-summary { margin: 0; font-size: 14px; }
.sheet-table-wrap { overflow-x: auto; border: 1px solid var(--border, #e2e7ed); border-radius: 10px; }
.sheet-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheet-table th, .sheet-table td { padding: 8px 10px; border-bottom: 1px solid var(--border, #e2e7ed); text-align: left; vertical-align: top; }
.sheet-table th { font-weight: 700; background: var(--surface-muted, #f6f8fa); white-space: nowrap; }
.sheet-table tr:last-child td { border-bottom: 0; }
.sheet-table tr.muted td:not(:last-child) { color: var(--muted, #657184); }
.sheet-table .caption-cell { min-width: 220px; max-width: 360px; }
.sheet-import-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.sheet-import-bar .primary { margin-left: auto; }
.sheet-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.sheet-stats div { border: 1px solid var(--border, #e2e7ed); border-radius: 10px; padding: 12px; display: grid; gap: 4px; }
.sheet-stats span, .sheet-stats small { font-size: 12px; color: var(--muted, #657184); }
.sheet-stats strong { font-size: 20px; }
.sheet-top { margin: 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.sheet-top span { color: var(--muted, #657184); }
.agent-notice.error { background: #fdecea; color: var(--danger, #b42318); }
@media (max-width: 760px) {
  .sheets-google, .sheets-purpose { padding: 16px; }
  .sheet-import-bar .primary { margin-left: 0; width: 100%; }
}
.agent-run-warning { color: var(--danger, #b42318); font-size: 13px; cursor: help; }
/* Phones: each calendar row becomes a labelled card instead of a wide table */
@media (max-width: 760px) {
  .sheet-table-wrap { overflow: visible; border: 0; }
  .sheet-table thead { display: none; }
  .sheet-table, .sheet-table tbody, .sheet-table tr, .sheet-table td { display: block; width: 100%; }
  .sheet-table tr { border: 1px solid var(--border, #e2e7ed); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; position: relative; }
  .sheet-table td { border: 0; padding: 4px 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
  .sheet-table td[data-label]::before { content: attr(data-label); font-weight: 600; color: var(--muted, #657184); }
  .sheet-table td:first-child { position: absolute; top: 8px; right: 12px; width: auto; padding: 0; display: block; }
  .sheet-table td:first-child:empty { display: none; }
  .sheet-table .caption-cell { min-width: 0; max-width: none; }
}
