/* ===== Tip Calculator - Modern Styles ===== */
.tip-layout { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.tip-main { min-width: 0; }
.tip-card { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 18px; padding: 32px; box-shadow: 0 4px 16px rgba(0,0,0,0.04); }
.tip-sidebar { display: flex; flex-direction: column; gap: 20px; }

/* Section */
.tip-section { margin-bottom: 22px; }
.tip-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }

/* Input */
.tip-input-wrap { position: relative; }
.tip-currency { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 700; color: var(--text-muted); }
.tip-input { width: 100%; padding: 16px 18px 16px 44px; border: 2px solid var(--border-light); border-radius: 12px; font-size: 24px; font-weight: 700; background: var(--bg); color: var(--text); outline: none; transition: all 0.2s; font-family: inherit; }
.tip-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,229,0.12); }
body[data-theme="dark"] .tip-input { background: var(--bg-muted); border-color: var(--border); }
body[data-theme="dark"] .tip-input:focus { background: var(--bg-card); }

/* Tip buttons */
.tip-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.tip-btn { padding: 12px; background: var(--bg-soft); border: 2px solid var(--border-light); border-radius: 10px; font-size: 15px; font-weight: 700; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; font-family: inherit; }
.tip-btn:hover { border-color: var(--primary-100); background: var(--primary-50); color: var(--primary); }
.tip-btn.active { border-color: var(--primary); background: var(--primary-50); color: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,229,0.08); }
body[data-theme="dark"] .tip-btn { background: var(--bg-muted); border-color: var(--border); }
body[data-theme="dark"] .tip-btn.active { background: rgba(99,102,241,0.15); }

/* Custom tip input */
.tip-custom-row { position: relative; }
.tip-custom-input { width: 100%; padding: 12px 16px; border: 2px solid var(--border-light); border-radius: 10px; font-size: 15px; font-weight: 500; background: var(--bg); color: var(--text); outline: none; transition: all 0.2s; font-family: inherit; }
.tip-custom-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,229,0.12); }
.tip-percent-sign { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-weight: 600; font-size: 15px; }
body[data-theme="dark"] .tip-custom-input { background: var(--bg-muted); border-color: var(--border); }

/* People controls */
.tip-people-row { display: flex; align-items: center; gap: 12px; }
.tip-people-btn { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #8b5cf6); color: #fff; border: none; cursor: pointer; font-size: 16px; box-shadow: 0 4px 12px rgba(79,70,229,0.25); transition: transform 0.2s; display: flex; align-items: center; justify-content: center; }
.tip-people-btn:hover { transform: scale(1.1); }
.tip-people-input { width: 80px; padding: 12px 16px; border: 2px solid var(--border-light); border-radius: 10px; font-size: 20px; font-weight: 700; text-align: center; background: var(--bg); color: var(--text); outline: none; font-family: inherit; }
.tip-people-input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,229,0.12); }
body[data-theme="dark"] .tip-people-input { background: var(--bg-muted); border-color: var(--border); }

/* Result card */
.tip-result { background: var(--bg-soft); border-radius: 14px; padding: 20px; margin-bottom: 16px; border: 1px solid var(--border-light); }
.tip-result-item { display: flex; align-items: center; gap: 14px; padding: 10px 0; }
.tip-result-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; flex-shrink: 0; }
.tip-icon-green { background: linear-gradient(135deg, #10b981, #34d399); }
.tip-icon-blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.tip-icon-purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.tip-result-info { flex: 1; display: flex; justify-content: space-between; align-items: center; }
.tip-result-label { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.tip-result-value { font-size: 20px; font-weight: 800; color: var(--text); }
.tip-result-value.tip-total { color: var(--primary); }
.tip-result-divider { height: 1px; background: var(--border-light); margin: 4px 0; }
body[data-theme="dark"] .tip-result { background: var(--bg-muted); border-color: var(--border); }

/* Reset button */
.tip-reset-btn { width: 100%; padding: 14px; background: var(--bg-soft); color: var(--text-secondary); border: 1px solid var(--border-light); border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.tip-reset-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

/* SEO */
.calc-seo { margin-top: 24px; padding: 20px 24px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.calc-seo p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin: 0; }

/* Sidebar (shared) */
.sidebar-section { background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 16px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.sidebar-header { text-align: center; padding: 28px 20px!important; background: linear-gradient(135deg,#667eea 0%,#764ba2 100%)!important; border-color: transparent!important; }
.sidebar-header h1 { font-size: 1.35rem; font-weight: 800; color: #fff; margin-bottom: 6px; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.sidebar-header p { font-size: 0.82rem; color: rgba(255,255,255,0.85); }
body[data-theme="dark"] .sidebar-header { background: linear-gradient(135deg,#667eea 0%,#764ba2 100%)!important; }
.sidebar-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.sidebar-title i { color: var(--primary); font-size: 0.9rem; }
.sidebar-tools { display: flex; flex-direction: column; gap: 8px; }
.sidebar-tool { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; transition: all 0.2s; text-decoration: none; background: var(--bg-soft); }
.sidebar-tool:hover { background: var(--primary-50); transform: translateX(3px); }
.sidebar-tool-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 16px; flex-shrink: 0; background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; }
.sidebar-tool-info { flex: 1; min-width: 0; }
.sidebar-tool-name { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.sidebar-tool-desc { font-size: 0.78rem; color: var(--text-muted); }
.ad-placeholder { width: 300px; height: 250px; flex-shrink: 0; margin: 0 auto; background: var(--bg-card); border: 2px dashed var(--border); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; color: var(--text-muted); font-size: 0.82rem; line-height: 1.5; }
.ad-placeholder .ad-icon { font-size: 1.8rem; color: var(--text-muted); margin-bottom: 10px; opacity: 0.4; }
.ad-placeholder .ad-label { font-weight: 600; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 4px; }
.ad-placeholder .ad-size { font-size: 0.75rem; color: var(--text-muted); opacity: 0.6; }

/* Dark mode */
body[data-theme="dark"] .sidebar-section { background: var(--bg-card); border-color: var(--border); }
body[data-theme="dark"] .sidebar-tool { background: var(--bg-muted); }
body[data-theme="dark"] .sidebar-tool:hover { background: var(--primary-50); }
body[data-theme="dark"] .ad-placeholder { background: var(--bg-card); border-color: var(--border); }
body[data-theme="dark"] .calc-seo { background: var(--bg-card); border-color: var(--border); }
body[data-theme="dark"] .tip-card { background: var(--bg-card); border-color: var(--border); }

/* Responsive */
@media (max-width: 1024px) { .tip-layout { grid-template-columns: 1fr 280px; gap: 20px; } }
@media (max-width: 860px) { .tip-layout { grid-template-columns: 1fr; } .tip-sidebar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } }
@media (max-width: 768px) {
  .tip-card { padding: 20px; }
  .tip-input { font-size: 20px; }
  .tip-btns { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) { .tip-sidebar { grid-template-columns: 1fr; } }