/* app.css — ระบบสไตล์ของ farm-planning (blue-white, mobile-first) ------------------------------------------------------------------ โครงสร้างอ้างจาก ui-ux-pro-max: pattern "Feature-Rich Showcase" (Hero → เครื่องมือ/ฟีเจอร์ → ประโยชน์ → ความน่าเชื่อถือ → CTA) ค่าสีเป็นไปตามที่ผู้ใช้กำหนด (ธีม ฟ้า-ขาว) + พาเลตต์ SaaS blue ทุกคู่สีที่ใช้ผ่าน WCAG AA (คำนวณแล้ว: ขาว/#2563EB = 5.17:1, #475569/ขาว = 7.58:1, #1D4ED8/#EFF6FF = 6.16:1, #1E293B/#F8FAFC = 13.98:1) ------------------------------------------------------------------ */ :root { --primary: #2563eb; --primary-dark: #1d4ed8; --primary-soft: #eff6ff; --primary-line: #bfdbfe; --bg: #f8fafc; --surface: #ffffff; --ink: #1e293b; --muted: #475569; --line: #e2e8f0; --warn: #b45309; --warn-soft: #fffbeb; --ok: #166534; --ok-soft: #f0fdf4; --danger: #b91c1c; --danger-soft: #fef2f2; --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06); --shadow-md: 0 4px 14px rgba(15, 23, 42, .08); --tap: 44px; } /* ---------- ฐาน ---------- */ html { scroll-behavior: smooth; } body { background: var(--bg); color: var(--ink); font-family: "Sarabun", "Kanit", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; } h1, h2, h3, h4, h5, .page-title { font-family: "Kanit", "Sarabun", system-ui, sans-serif; color: var(--ink); letter-spacing: -.01em; } a { color: var(--primary); text-decoration: none; } a:hover { color: var(--primary-dark); text-decoration: underline; } hr { max-width: none; border-color: var(--line); } :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; } .view-root { padding-top: 64px; min-height: 70vh; background: var(--bg); } .view-loading { padding: 4rem 1rem; text-align: center; color: var(--muted); } .skip-link { position: absolute; left: -9999px; top: 0; z-index: 4000; background: var(--surface); color: var(--primary-dark); padding: .5rem .75rem; border: 2px solid var(--primary); border-radius: var(--r-sm); } .skip-link:focus { left: .5rem; top: .5rem; } /* ---------- navbar (ขาวสะอาด) ---------- */ #mainNav.navbar { min-height: 64px; padding: .5rem 0; background: rgba(255, 255, 255, .96) !important; border-bottom: 1px solid var(--line); backdrop-filter: saturate(140%) blur(8px); } #mainNav .navbar-brand { font-family: "Kanit", sans-serif; font-weight: 600; font-size: 1.15rem; color: var(--primary-dark); letter-spacing: -.02em; } /* ใช้ selector ระดับเดียวกับ css/creative.css (#mainNav .navbar-nav > li.nav-item > a.nav-link) ซึ่งมีความจำเพาะสูงกว่าและตั้งสีส้ม/ตัวหนาไว้ — ที่นี่จึงต้องระบุให้ชัดว่าเป็นค่าของธีมใหม่ */ #mainNav .navbar-nav > li.nav-item > a.nav-link, #mainNav .navbar-nav > li.nav-item > a.nav-link:focus, #mainNav .navbar-nav > li.nav-item > a.nav-link:hover { color: var(--muted) !important; font-weight: 500 !important; text-transform: none !important; background-color: transparent; padding: .45rem .7rem !important; border-radius: var(--r-sm); transition: background-color .18s ease, color .18s ease; } #mainNav .navbar-nav > li.nav-item > a.nav-link:hover { color: var(--primary-dark) !important; background-color: var(--primary-soft) !important; text-decoration: none; } #mainNav .navbar-nav > li.nav-item > a.nav-link.active, #mainNav .navbar-nav > li.nav-item > a.nav-link.active:focus, #mainNav .navbar-nav > li.nav-item > a.nav-link.active:hover { color: var(--primary-dark) !important; background-color: var(--primary-soft) !important; font-weight: 600 !important; text-decoration: none; } #mainNav .navbar-toggler { min-height: var(--tap); min-width: var(--tap); border-color: var(--line); border-radius: var(--r-sm); } /* ---------- ปุ่ม ---------- */ .btn { border-radius: var(--r-md); font-weight: 600; padding: .6rem 1.1rem; min-height: var(--tap); transition: transform .15s ease, background-color .15s ease, border-color .15s ease; } .btn:active { transform: translateY(1px); } .btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; } .btn-primary:hover, .btn-primary:focus { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; } .btn-outline-primary { color: var(--primary-dark); border-color: var(--primary-line); background: var(--surface); } .btn-outline-primary:hover { background: var(--primary-soft); color: var(--primary-dark); border-color: var(--primary); } .btn-light { background: var(--surface); border: 1px solid var(--primary-line); color: var(--primary-dark); } .btn-outline-light { background: transparent; border: 1px solid var(--primary); color: var(--primary-dark); } /* ---------- hero (ธีมฟ้า-ขาว) ---------- */ .hero { position: relative; overflow: hidden; padding: 2.5rem 0 2rem; background: radial-gradient(1100px 320px at 12% -20%, rgba(37, 99, 235, .14), transparent 62%), linear-gradient(180deg, #f2f7ff 0%, var(--bg) 72%); border-bottom: 1px solid var(--line); } .hero-eyebrow { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border-radius: 999px; background: var(--primary-soft); border: 1px solid var(--primary-line); color: var(--primary-dark); font-size: .82rem; font-weight: 600; margin-bottom: 1rem; } .hero h1 { font-size: 1.65rem; line-height: 1.35; font-weight: 600; margin-bottom: .9rem; } .hero h1 strong { font-weight: 700; color: var(--primary-dark); } .hero-lead { color: var(--muted); font-size: 1rem; max-width: 46rem; } .hero-cta { display: flex; flex-direction: column; gap: .6rem; margin: 1.4rem 0 1.6rem; } .hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; padding: 0; margin: 0; list-style: none; } .hero-stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .7rem .85rem; box-shadow: var(--shadow-sm); } .hero-stat b { display: block; font-size: 1.2rem; color: var(--primary-dark); line-height: 1.2; } .hero-stat span { font-size: .82rem; color: var(--muted); } /* ---------- section ---------- */ .section { padding: 2.25rem 0; } .section--alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); } .section-head { margin-bottom: 1.5rem; } .section-head h2 { font-size: 1.35rem; font-weight: 600; margin-bottom: .3rem; } .section-head p { color: var(--muted); margin-bottom: 0; font-size: .95rem; } /* ---------- แถวเครื่องมือ (แบบ service row) ---------- */ .tool-list { display: grid; gap: .75rem; } .tool-row { display: flex; align-items: center; gap: .9rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); color: inherit; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; } .tool-row:hover { border-color: var(--primary-line); box-shadow: var(--shadow-md); text-decoration: none; color: inherit; transform: translateY(-1px); } .tool-row__icon { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--primary-soft); } .tool-row__icon img { width: 28px; height: 28px; object-fit: contain; } .tool-row__body { flex: 1 1 auto; min-width: 0; } .tool-row__title { font-weight: 600; font-size: 1rem; margin: 0 0 .15rem; color: var(--ink); } .tool-row__meta { font-size: .85rem; color: var(--muted); margin: 0; } .tool-row__go { flex: 0 0 auto; color: var(--primary); font-weight: 600; font-size: .85rem; white-space: nowrap; } .tool-row--soon { opacity: .62; pointer-events: none; } /* ---------- ป้าย/ชิป ---------- */ .chip { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--primary-soft); color: var(--primary-dark); border: 1px solid var(--primary-line); } .chip--soon { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; } .badge-todo { display: inline-block; padding: .1rem .5rem; border: 1px solid #fde68a; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: .78rem; } /* ---------- การ์ด ---------- */ .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; } .card:hover { border-color: var(--primary-line); box-shadow: var(--shadow-md); } .card-body { padding: 1.1rem; } .card-header { background: var(--primary-soft); border-bottom: 1px solid var(--line); color: var(--primary-dark); font-weight: 600; border-radius: var(--r-lg) var(--r-lg) 0 0 !important; } .card-img-top { object-fit: contain; background: var(--primary-soft); border-radius: var(--r-md); padding: .6rem; } .card-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; } /* ---------- feature / trust cards ---------- */ .feature-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.15rem; height: 100%; } .feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .35rem; } .feature-card p { color: var(--muted); font-size: .9rem; margin: 0; } .feature-card__num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; font-size: .85rem; margin-bottom: .6rem; } /* ---------- หน้าเนื้อหา ---------- */ .page { padding: 1.75rem 0 2.75rem; } .page-title { font-size: 1.55rem; font-weight: 600; margin-bottom: .3rem; } .page-lead { color: var(--muted); margin-bottom: 1.4rem; max-width: 48rem; } .note { font-size: .85rem; color: var(--muted); margin-top: 1.25rem; padding-top: .9rem; border-top: 1px dashed var(--line); } /* ---------- ฟอร์มคำนวณ ---------- */ form.calc, .calc { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.15rem; box-shadow: var(--shadow-sm); } .field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; color: var(--ink); } .field input, .field select, .field textarea, #ct-message { width: 100%; min-height: var(--tap); padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); font-size: 1rem; transition: border-color .15s ease, box-shadow .15s ease; } .field input:focus, .field select:focus, .field textarea:focus, #ct-message:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .16); outline: none; } .field .hint { display: block; color: var(--muted); font-size: .8rem; margin-top: .3rem; } .calc-actions { display: flex; gap: .6rem; flex-wrap: wrap; } .calc-actions button { min-height: var(--tap); padding: .55rem 1.25rem; border-radius: var(--r-md); border: 1px solid var(--primary); background: var(--primary); color: #fff; font-weight: 600; cursor: pointer; transition: background-color .15s ease, transform .15s ease; } .calc-actions button:hover { background: var(--primary-dark); } .calc-actions button:active { transform: translateY(1px); } .calc-actions button.ghost { background: var(--surface); color: var(--primary-dark); border-color: var(--primary-line); } .calc-actions button.ghost:hover { background: var(--primary-soft); } /* ---------- ผลลัพธ์ ---------- */ .result { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--r-lg); padding: 1.15rem; box-shadow: var(--shadow-sm); } .result[hidden] { display: none; } .result-value { font-size: 1.9rem; font-weight: 700; line-height: 1.15; color: var(--primary-dark); font-variant-numeric: tabular-nums; } .result-unit { font-size: .9rem; color: var(--muted); margin-left: .4rem; } .result-grid { display: grid; grid-template-columns: 1fr; gap: .5rem; margin-top: .9rem; } .result-item { border-top: 1px dashed var(--line); padding-top: .5rem; font-size: .88rem; color: var(--muted); } .result-item b { display: block; font-size: 1.05rem; color: var(--ink); font-variant-numeric: tabular-nums; } .steps { margin-top: 1rem; width: 100%; border-collapse: collapse; font-size: .86rem; } .steps th { text-align: left; color: var(--muted); font-weight: 600; font-size: .78rem; border-bottom: 1px solid var(--line); padding: .4rem .3rem; } .steps td { border-bottom: 1px solid var(--line); padding: .45rem .3rem; vertical-align: top; } .steps tbody tr:nth-child(even) { background: #fbfdff; } .steps td:last-child, .steps th:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; } .warn-list { margin: .9rem 0 0; padding: .7rem .8rem .7rem 1.9rem; background: var(--warn-soft); border: 1px solid #fde68a; border-radius: var(--r-md); color: var(--warn); font-size: .88rem; } .warn-list[hidden] { display: none; } /* ---------- ตารางข้อมูล ---------- */ .table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: .35rem .9rem; } .table td, .table th { border-color: var(--line); vertical-align: top; } .table thead th { color: var(--muted); font-weight: 600; font-size: .82rem; border-top: none; } /* ---------- footer (ขาว) ---------- */ #sticky-footer { background: var(--surface) !important; color: var(--muted) !important; border-top: 1px solid var(--line); font-size: .85rem; } #sticky-footer a { color: var(--muted); } #sticky-footer a:hover { color: var(--primary-dark); } .badge-net { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: .76rem; font-weight: 600; border: 1px solid #bbf7d0; } .badge-net--off { background: var(--warn-soft); color: var(--warn); border-color: #fde68a; } .build-badge { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .76rem; opacity: .75; } /* ---------- ปุ่มติดตั้งแอป ---------- */ #install-wrap { position: fixed; left: .75rem; right: .75rem; bottom: .75rem; z-index: 1500; } #install-wrap[hidden] { display: none; } #install-btn { width: 100%; min-height: 48px; border: none; border-radius: var(--r-md); background: var(--primary); color: #fff; font-weight: 600; box-shadow: var(--shadow-md); } #install-btn[disabled] { background: #94a3b8; font-size: .82rem; } /* ปุ่มกลับขึ้นบน (สไตล์ฐานมาจาก coding/css/gototop.css) */ #myBtn { background: var(--primary) !important; border-radius: 999px !important; padding: .6rem .95rem !important; font-size: .85rem !important; font-weight: 600; box-shadow: var(--shadow-md); } /* ---------- คลาสเดิมที่ partial ยังอ้างถึง ---------- */ .b1 { margin: 1rem; } .b2 { margin: 1.2rem; } .b5 { margin-top: 1.2rem; } .text-white-5 { color: var(--ink); } .size_card_2 { height: 100%; } /* ---------- จอใหญ่ ---------- */ @media (min-width: 640px) { .calc { grid-template-columns: 1fr 1fr; } .calc .calc-actions, .calc .field--wide { grid-column: 1 / -1; } .hero { padding: 3.5rem 0 3rem; } .hero h1 { font-size: 2.15rem; } .hero-cta { flex-direction: row; align-items: center; } .hero-stats { grid-template-columns: repeat(4, 1fr); } .result-grid { grid-template-columns: repeat(3, 1fr); } .tool-list { grid-template-columns: 1fr 1fr; } #install-wrap { left: auto; right: 1rem; width: 15rem; } } @media (min-width: 768px) { .card-grid { grid-template-columns: repeat(2, 1fr); } .section { padding: 3rem 0; } .section-head h2 { font-size: 1.6rem; } .page-title { font-size: 2rem; } } @media (min-width: 1024px) { .view-root { padding-top: 68px; } .card-grid { grid-template-columns: repeat(3, 1fr); } .hero h1 { font-size: 2.5rem; max-width: 44rem; } } @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } } /* การ์ดที่เป็นลิงก์ทั้งใบ — ไม่ให้ตัวอักษรเปลี่ยนเป็นสีลิงก์ */ .card-grid a.card, .card-grid a.card:hover { color: inherit; text-decoration: none; }