* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f0f2f5; color: #1a1a2e; min-height: 100vh; }

/* Nav */
nav { background: #fff; border-bottom: 1px solid #e8eaed; padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 60px; position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.logo { font-weight: 700; font-size: 1.1rem; color: #1a1a2e; text-decoration: none; }
.nav-links a { color: #555; text-decoration: none; margin-left: 1.5rem; font-size: .9rem; }
.nav-links a:hover { color: #4F46E5; }

/* Main */
main { max-width: 860px; margin: 0 auto; padding: 2rem 1rem; }

/* Auth */
.auth-box { max-width: 420px; margin: 4rem auto; background: #fff; border-radius: 16px; padding: 2.5rem; box-shadow: 0 4px 24px rgba(0,0,0,.08); }
.auth-logo { font-size: 3rem; text-align: center; margin-bottom: .5rem; }
.auth-box h1 { text-align: center; font-size: 1.6rem; margin-bottom: .3rem; }
.auth-sub { text-align: center; color: #777; font-size: .9rem; margin-bottom: 1.5rem; }
.auth-box input { display: block; width: 100%; padding: .75rem 1rem; border: 1px solid #ddd; border-radius: 8px; font-size: 1rem; margin-bottom: .75rem; }
.auth-box input:focus { outline: none; border-color: #4F46E5; box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.auth-switch { text-align: center; margin-top: 1rem; font-size: .9rem; color: #666; }
.auth-switch a { color: #4F46E5; }

/* Buttons */
.btn-primary { background: #4F46E5; color: #fff; border: none; padding: .7rem 1.4rem; border-radius: 8px; font-size: .95rem; cursor: pointer; width: 100%; font-weight: 500; transition: background .2s; }
.btn-primary:hover { background: #4338CA; }
.btn-secondary { background: #fff; color: #4F46E5; border: 1.5px solid #4F46E5; padding: .65rem 1.2rem; border-radius: 8px; font-size: .9rem; cursor: pointer; font-weight: 500; text-decoration: none; display: inline-block; }
.btn-sm { background: #4F46E5; color: #fff; border: none; padding: .4rem .8rem; border-radius: 6px; font-size: .85rem; cursor: pointer; }

/* Cards */
.card { background: #fff; border-radius: 12px; padding: 1.5rem; margin-bottom: 1.25rem; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; color: #1a1a2e; }

/* Alerts */
.alert { padding: .85rem 1.25rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; }
.alert.error { background: #FEE2E2; color: #991B1B; }
.alert.success { background: #D1FAE5; color: #065F46; }
.alert.warning { background: #FEF3C7; color: #92400E; }

/* Toggles */
.toggles-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.toggle { display: flex; align-items: center; gap: .6rem; cursor: pointer; font-size: .9rem; padding: .5rem; border-radius: 6px; }
.toggle:hover { background: #f8f9ff; }
.toggle input { display: none; }
.toggle-slider { width: 40px; height: 22px; background: #ddd; border-radius: 11px; position: relative; transition: background .2s; flex-shrink: 0; }
.toggle-slider::after { content: ''; position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 50%; top: 3px; left: 3px; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + .toggle-slider { background: #4F46E5; }
.toggle input:checked + .toggle-slider::after { left: 21px; }

/* Schedule */
.days-row { margin-top: .25rem; }
.days-row > label { display: block; margin-bottom: .5rem; font-weight: 500; color: #444; font-size: .9rem; }
.schedule-row { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.time-input { width: 60px; padding: .5rem; text-align: center; border: 1px solid #ddd; border-radius: 6px; font-size: 1rem; }
.days-grid { display: flex; gap: .5rem; flex-wrap: wrap; }
.day-btn { cursor: pointer; }
.day-btn input { display: none; }
.day-btn span { display: inline-block; padding: .4rem .8rem; border: 1.5px solid #ddd; border-radius: 20px; font-size: .85rem; color: #666; transition: all .2s; }
.day-btn input:checked + span { background: #4F46E5; border-color: #4F46E5; color: #fff; }

/* Plans */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media(max-width:600px) { .plans-grid { grid-template-columns: 1fr; } .toggles-grid { grid-template-columns: 1fr; } }
.plan-card { background: #fff; border-radius: 12px; padding: 1.5rem; border: 2px solid #e8eaed; text-align: center; }
.plan-card.plan-current { border-color: #4F46E5; }
.plan-card h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.plan-price { font-size: 2rem; font-weight: 700; color: #4F46E5; }
.plan-price span { font-size: 1rem; color: #888; font-weight: 400; }
.plan-price-year { font-size: .8rem; color: #999; margin-bottom: 1rem; }
.plan-features { list-style: none; text-align: left; margin-bottom: 1rem; }
.plan-features li { padding: .3rem 0; font-size: .85rem; color: #555; }
.plan-actions { display: flex; flex-direction: column; gap: .5rem; }
.plan-current-label { color: #4F46E5; font-weight: 600; }

/* Misc */
.page-header { margin-bottom: 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.page-header h1 { font-size: 1.5rem; }
.badge { padding: .3rem .8rem; border-radius: 20px; font-size: .8rem; font-weight: 600; }
.badge-trial { background: #FEF3C7; color: #92400E; }
.badge-basic { background: #DBEAFE; color: #1D4ED8; }
.badge-pro { background: #EDE9FE; color: #6D28D9; }
.badge-business { background: #D1FAE5; color: #065F46; }
.badge-active { background: #D1FAE5; color: #065F46; }
.badge-inactive { background: #FEE2E2; color: #991B1B; }
.hint { font-size: .8rem; color: #888; }
.connected-badge { color: #065F46; font-weight: 600; margin-bottom: .5rem; }
.card-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.card-actions .btn-primary, .card-actions .btn-secondary { width: auto; }
.salon-item { padding: .5rem 0; border-bottom: 1px solid #f0f0f0; font-size: .9rem; }
.input-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.input-row input { flex: 1; padding: .5rem .75rem; border: 1px solid #ddd; border-radius: 6px; font-size: .9rem; }
.code-display { font-size: 2rem; font-weight: 700; letter-spacing: .3em; text-align: center; padding: 1rem; background: #f0f2ff; border-radius: 8px; color: #4F46E5; margin-bottom: .5rem; }
.invoice-text { background: #f8f9fa; padding: 1rem; border-radius: 8px; font-size: .85rem; white-space: pre-wrap; margin-bottom: 1rem; }
.empty-state { text-align: center; padding: 2rem; color: #888; }

/* Telegram block */
.tg-connected { display:flex; align-items:center; gap:1rem; }
.tg-check { font-size:1.5rem; }
.tg-steps { display:flex; flex-direction:column; gap:1.25rem; }
.tg-desc { color:#555; font-size:.9rem; margin-bottom:.25rem; }
.tg-step { display:flex; gap:1rem; align-items:flex-start; }
.step-num { background:#4F46E5; color:#fff; width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.85rem; flex-shrink:0; margin-top:.1rem; }
.tg-code-inline { display:flex; align-items:center; gap:.75rem; background:#f0f2ff; border:1.5px solid #c7d2fe; border-radius:8px; padding:.6rem 1rem; }
.tg-code-label { font-size:.85rem; color:#666; }
.tg-code-value { font-size:1.4rem; font-weight:700; letter-spacing:.2em; color:#4F46E5; font-family:monospace; }
.btn-copy { background:#fff; border:1px solid #ddd; border-radius:6px; padding:.3rem .7rem; font-size:.8rem; cursor:pointer; white-space:nowrap; }
.btn-copy:hover { background:#f8f9ff; }
.inline-code { background:#f3f4f6; padding:.2rem .5rem; border-radius:4px; font-family:monospace; font-size:.9rem; color:#374151; }

/* TG Card redesign */
.tg-card { padding: 1.25rem 1.5rem; }
.tg-header { display:flex; align-items:center; gap:.85rem; margin-bottom:1rem; }
.tg-icon { font-size:1.6rem; line-height:1; }
.tg-status-badge { margin-left:auto; background:#D1FAE5; color:#065F46; padding:.3rem .85rem; border-radius:20px; font-size:.82rem; font-weight:600; white-space:nowrap; }
.tg-connect-body { border-top:1px solid #f0f0f0; padding-top:1rem; }
.btn-tg { width:100%; background:linear-gradient(135deg,#229ED9,#1a7db8); color:#fff; border:none; border-radius:10px; padding:.85rem 1.5rem; font-size:.95rem; font-weight:600; cursor:pointer; transition:opacity .2s; }
.btn-tg:hover { opacity:.9; }
.tg-command-box { display:flex; align-items:center; background:#1e1e2e; border-radius:8px; padding:.75rem 1rem; margin-bottom:.75rem; gap:.75rem; }
.tg-command-box code { color:#a5f3fc; font-size:1rem; font-family:monospace; flex:1; }
.btn-copy-cmd { background:transparent; border:1px solid #444; border-radius:6px; color:#aaa; padding:.3rem .6rem; cursor:pointer; font-size:1rem; }
.btn-copy-cmd:hover { background:#333; }
.btn-open-tg { display:block; text-align:center; background:#229ED9; color:#fff; border-radius:8px; padding:.7rem; font-size:.9rem; font-weight:600; text-decoration:none; }
.btn-open-tg:hover { background:#1a7db8; }
