/* GitHub Actions Cost Calculator — GitHub Dark */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #238636;
  --primary-dim: rgba(35,134,54,0.12);
  --secondary: #58A6FF;
  --accent: #F78166;
  --accent-dim: rgba(247,129,102,0.12);
  --bg: #0D1117;
  --bg-card: #161B22;
  --border: rgba(48,54,61,0.6);
  --text: #E6EDF3;
  --text-dim: #8B949E;
  --text-muted: #484F58;
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --transition: 0.2s ease;
}

html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.6; }

.header { border-bottom: 1px solid var(--border); background: rgba(22,27,34,0.95); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.header-inner { max-width: 700px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; }
.header-left { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 1.2rem; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--primary-dim); border-radius: var(--radius-sm); }
.header h1 { font-size: 1.05rem; font-weight: 700; }
.subtitle { font-size: 0.72rem; color: var(--text-dim); }

.main { max-width: 700px; margin: 0 auto; padding: 20px; }

.btn { padding: 8px 16px; font-family: var(--font); font-size: 0.78rem; font-weight: 600; border: none; border-radius: 6px; cursor: pointer; transition: all var(--transition); }
.btn-sm { padding: 5px 10px; font-size: 0.72rem; background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(35,134,54,0.2); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #2EA043; }

.add-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 12px; }
.add-row { display: flex; gap: 6px; margin-bottom: 6px; }
.add-row:last-child { margin-bottom: 0; }
.input { flex: 1; padding: 7px 10px; font-family: var(--font); font-size: 0.78rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; outline: none; }
.input:focus { border-color: var(--secondary); }
.input-sm { max-width: 110px; }
.select { padding: 7px 10px; font-family: var(--font); font-size: 0.78rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; outline: none; cursor: pointer; }

.free-tier { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.free-bar { flex: 1; height: 8px; background: rgba(35,134,54,0.1); border-radius: 4px; overflow: hidden; }
.free-bar-fill { height: 100%; background: var(--primary); border-radius: 4px; transition: width var(--transition); }
.free-label { font-size: 0.62rem; color: var(--text-muted); white-space: nowrap; }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; text-align: center; }
.stat-label { display: block; font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { display: block; font-size: 1.1rem; font-weight: 700; color: var(--secondary); margin-top: 2px; }

.workflows-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.panel-label { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.wf-count { font-size: 0.68rem; font-weight: 600; color: var(--primary); background: var(--primary-dim); padding: 2px 8px; border-radius: 10px; }

.wf-list { max-height: 350px; overflow-y: auto; }
.wf-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-bottom: 1px solid rgba(48,54,61,0.3); }
.wf-name { font-size: 0.78rem; font-weight: 600; flex: 1; }
.wf-meta { font-size: 0.62rem; color: var(--text-muted); margin-right: 8px; }
.wf-cost { font-family: var(--mono); font-size: 0.78rem; font-weight: 600; color: var(--accent); min-width: 60px; text-align: right; margin-right: 8px; }
.wf-bar { width: 50px; height: 6px; background: rgba(247,129,102,0.1); border-radius: 3px; overflow: hidden; margin-right: 8px; }
.wf-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; }
.wf-delete { padding: 2px 6px; font-size: 0.62rem; color: var(--text-muted); background: transparent; border: 1px solid transparent; border-radius: 3px; cursor: pointer; font-family: var(--font); }
.wf-delete:hover { color: #F85149; border-color: rgba(248,81,73,0.2); }

.empty-state { padding: 20px; text-align: center; font-size: 0.82rem; color: var(--text-muted); }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast { padding: 10px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: 0 4px 24px rgba(0,0,0,0.5); font-size: 0.82rem; animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
