.gscf {
  --green: #16a34a; --green-light: #bbf7d0; --green-bg: #f0fdf4;
  --yellow: #d97706; --yellow-light: #fef3c7;
  --red: #dc2626; --red-light: #fee2e2;
  --gray-50: #f9fafb; --gray-100: #f3f4f6; --gray-200: #e5e7eb; --gray-400: #9ca3af;
  --gray-500: #6b7280; --gray-700: #374151; --gray-900: #111827;
  max-width: 900px; margin: 0 auto; padding: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px; color: var(--gray-700); line-height: 1.4;
}
.gscf * { box-sizing: border-box; }
.gscf a { color: #15803d; }
.gscf h2 { margin: 0 0 6px; font-size: 20px; color: var(--gray-900); }
.gscf h3 { margin: 18px 0 8px; font-size: 14px; color: var(--gray-900); }
.gscf-muted { color: var(--gray-500); font-size: 13px; }
.gscf-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin-bottom: 14px; background: var(--gray-900); color: #fff; border-radius: 12px; }
.gscf-top strong { display: block; font-size: 16px; }
.gscf-top .gscf-muted { color: var(--gray-400); }
.gscf-user { display: flex; align-items: center; gap: 10px; }

.gscf-btn { display: inline-block; padding: 8px 14px; border: 0; border-radius: 8px; background: var(--green); color: #fff !important; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.gscf-btn:hover { background: #15803d; }
.gscf-btn[disabled] { opacity: .5; cursor: default; }
.gscf-btn-light { background: rgba(255,255,255,.15); }
.gscf-btn-light:hover { background: rgba(255,255,255,.28); }
.gscf-login .gscf-btn-light, .gscf-box .gscf-btn-light { background: var(--gray-900); }

.gscf-box, .gscf-card { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 18px; margin-bottom: 14px; }
.gscf-login .gscf-box { max-width: 380px; margin: 30px auto; }
.gscf-login input[type=text], .gscf-login input[type=password] { width: 100%; padding: 10px; border: 1px solid var(--gray-200); border-radius: 8px; font-size: 15px; }
.gscf-login input[type=submit] { width: 100%; padding: 11px; border: 0; border-radius: 8px; background: var(--green); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; }
.gscf-login p { margin: 0 0 12px; }

.gscf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 14px; }
.gscf-stat { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 12px; text-align: center; }
.gscf-stat b { display: block; font-size: 22px; color: var(--gray-900); }
.gscf-stat span { font-size: 11px; color: var(--gray-500); }
.gscf-stat.gscf-red b { color: var(--red); } .gscf-stat.gscf-yellow b { color: var(--yellow); }
.gscf-stat.gscf-green b { color: var(--green); } .gscf-stat.gscf-gray b { color: var(--gray-500); }

.gscf-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.gscf-tab { flex: 1; padding: 10px; border: 1px solid var(--gray-200); border-radius: 10px; background: #fff; font-size: 14px; font-weight: 600; color: var(--gray-500); cursor: pointer; }
.gscf-tab.active { background: var(--gray-900); color: #fff; border-color: var(--gray-900); }
.gscf-pane { display: none; } .gscf-pane.active { display: block; }

.gscf-tools input[type=search] { width: 100%; padding: 11px 12px; border: 1px solid var(--gray-200); border-radius: 10px; font-size: 15px; margin-bottom: 8px; }
.gscf-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.gscf-chip { padding: 6px 12px; border: 1px solid var(--gray-200); border-radius: 20px; background: #fff; font-size: 12px; font-weight: 500; color: var(--gray-700); cursor: pointer; }
.gscf-chip.active { background: var(--gray-900); color: #fff; border-color: var(--gray-900); }

.gscf-list { display: flex; flex-direction: column; gap: 8px; }
.gscf-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; }
.gscf-main { flex: 1; min-width: 0; }
.gscf-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.gscf-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--gray-200); color: var(--gray-700); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.gscf-name { font-weight: 600; color: var(--gray-900); }
.gscf-sub { font-size: 12px; color: var(--gray-500); }
.gscf-empty { padding: 24px; text-align: center; color: var(--gray-400); }

.gscf .badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.gscf .badge.green { background: var(--green-light); color: #15803d; }
.gscf .badge.yellow { background: var(--yellow-light); color: #b45309; }
.gscf .badge.red { background: var(--red-light); color: var(--red); }
.gscf .badge.gray { background: var(--gray-100); color: var(--gray-700); }

.gscf-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.gscf-note { padding: 10px 12px; border-radius: 8px; background: var(--gray-100); font-size: 13px; margin: 8px 0 0; }
.gscf-note-valido { background: var(--green-bg); } .gscf-note-scadenza { background: var(--yellow-light); }
.gscf-note-scaduto { background: var(--red-light); }
.gscf-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.gscf-sum div { background: var(--gray-50); border-radius: 8px; padding: 10px; text-align: center; }
.gscf-sum span { display: block; font-size: 11px; color: var(--gray-500); }
.gscf-sum b { font-size: 16px; color: var(--gray-900); }
.gscf-sum .gscf-due b { color: var(--red); } .gscf-sum .gscf-ok b { color: var(--green); }
.gscf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gscf-table th { text-align: left; padding: 6px 8px; font-size: 11px; text-transform: uppercase; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); }
.gscf-table td { padding: 9px 8px; border-bottom: 1px solid var(--gray-100); }
.gscf-bank { margin-top: 14px; padding: 12px; background: var(--gray-50); border-radius: 8px; font-size: 13px; }
.gscf-bank div { margin-top: 4px; word-break: break-word; }
.gscf-bank span { display: inline-block; min-width: 82px; color: var(--gray-500); }

#gscf-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--gray-900, #111827); color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 14px; z-index: 99999; }

@media (max-width: 520px) {
  .gscf-item-pay { flex-direction: column; align-items: stretch; }
  .gscf-item-pay .gscf-side { flex-direction: row; justify-content: space-between; align-items: center; }
}
