/* ฟอนต์ */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;600;700&display=swap');

:root {
  --main-color: #2ecc71;
  --accent-color: #27ae60;
  --bg-color: #CAF393;
  --text-color: #2c3e50;
  --white: #ffffff;
  --shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --green: #AAE08D;
  --greenlight: #A6DA9A;
  --light: #DDDA9A;
}

* {
  box-sizing: border-box;
  font-family: 'Kanit', sans-serif;
}

body {
  margin: 0;
  background: var(--bg-color);
  color: var(--text-color);
}

header {
  background: var(--bg-color);
  box-shadow: var(--shadow);
  text-align: center;
  padding: 1.5rem 1rem;
}

header h1 {
  margin: 0;
  font-size: 2rem;
  color: var(--accent-color);
}

.tab-nav {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

.tab-button {
  padding: 10px 20px;
  border: none;
  background: #e0e0e0;
  color: #333;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease-in-out;
}

.tab-button.active {
  background: linear-gradient(135deg, var(--main-color), var(--accent-color));
  color: white;
  font-weight: bold;
  transform: scale(1.05);
  box-shadow: var(--shadow);
}

main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
  background: var(--green);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-radius: var(--radius);
}

form input {
  padding: 12px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  transition: border 0.3s;
}

form input:focus {
  border-color: var(--accent-color);
  outline: none;
}

form button {
  padding: 12px;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #43e97b, #38f9d7);
  border: none;
  border-radius: var(--radius);
  color: green;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

form button:hover {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  transform: scale(1.02);
}

#status {
  font-weight: bold;
  padding: 0.5rem;
  text-align: center;
  color: #16a085;
}

.tab-content {
  display: none;
  margin-top: 1rem;
}

.tab-content.active {
  display: block;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: light;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th, td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

th {
  background: var(--accent-color);
  color: light;
}

tbody tr:hover {
  background: #f9f9f9;
}

canvas {
  margin-top: 1rem;
  width: 100% !important;
}

footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 1.1rem;
  color: greenlight;
  padding: 12px;
  box-shadow: var(--shadow);
  
}
