/* ==========================================================
   BASE STYLESHEET
   Global resets, variables, and foundational rules
   ========================================================== */

/* ---------- CSS Variables (Color System + Spacing) ---------- */
:root {
  /* Brand Colors */
  --brand: #52a2d8;
  --brand-dark: #428bb3;
  --brand-light: #d0ecff;

  /* Status Colors */
  --success: #1e7e34;
  --success-bg: #e6f4ea;
  --error: #a10000;
  --error-bg: #fdeaea;

  /* Neutral Colors */
  --text: #333;
  --text-light: #555;
  --border: #ccc;
  --background: #f2f5f8;
  --white: #ffffff;
  --black: #000000;

  /* Typography */
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-size-base: 16px;
  --font-size-small: 14px;

  /* Layout Spacing */
  --radius: 10px;
  --gap: 12px;
  --shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ---------- Resets ---------- */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  color: var(--text);
  background: var(--background);
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--brand-dark);
}

/* ---------- Buttons ---------- */
button,
input[type=submit],
.btn {
  display: inline-block;
  background: var(--brand);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

button:hover,
input[type=submit]:hover,
.btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

/* ---------- Form Inputs ---------- */
input[type=text],
input[type=password],
input[type=email],
input[type=number],
select,
textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 15px;
  margin-top: 4px;
  font-family: var(--font-main);
}

label {
  font-weight: 600;
  display: block;
  margin-top: 10px;
  margin-bottom: 4px;
}

/* ---------- Utility Classes ---------- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

.hidden      { display: none !important; }

.shadow      { box-shadow: var(--shadow); }
.rounded     { border-radius: var(--radius); }

/* ---------- Global Containers ---------- */
.container {
  max-width: 900px;
  width: 90%;
  margin: 40px auto;
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Messages ---------- */
.message {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  text-align: center;
  margin: 16px auto;
  max-width: 600px;
}
.message.success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #a9e4b6;
}
.message.error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #f5b2b2;
}

/* ---------- Footer ---------- */
.footer {
  background: #222;
  color: #ddd;
  text-align: center;
  padding: 16px 10px;
  font-size: 14px;
  margin-top: auto;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2);
}
.footer a {
  color: var(--brand-light);
  text-decoration: none;
  font-weight: 500;
}
.footer a:hover {
  color: var(--brand);
}

/* ---------- Responsive Defaults ---------- */
@media (max-width: 600px) {
  html, body { font-size: 15px; }
  .container { width: 95%; padding: 15px; }
}
