@import url("https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap");

:root {
  --primary-color: #ec4899;
  /* Pink-500 */
  --primary-hover: #db2777;
  /* Pink-600 */
  --secondary-color: #0ea5e9;
  /* Sky-500 */
  --secondary-hover: #0284c7;
  /* Sky-600 */
  --bg-color: #f8fafc;
  --text-color: #1e293b;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --danger-color: #ef4444;
  --success-color: #22c55e;
  --warning-color: #eab308;

  --font-heading: "Sarabun", sans-serif;
  --font-body: "Sarabun", sans-serif;
}

@import url("https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: #0f172a;
  margin-bottom: 0.5rem;
}

/* Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.card {
  background: var(--card-bg);
  border-radius: 0.75rem;
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-top: 4px solid var(--primary-color);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.w-full {
  width: 100%;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  font-family: var(--font-body);
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

/* Forms */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-color);
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

/* Forms */
.form-control,
.form-select,
button,
input,
select,
textarea {
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.25);
}

/* Navbar */
.navbar {
  background-color: #fff;
  padding: 1rem 0;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
  margin-bottom: 2rem;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.navbar-nav {
  display: flex;
  gap: 1rem;
  list-style: none;
}

.navbar-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
}

.navbar-nav a:hover {
  color: var(--primary-color);
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
}

.alert-error {
  background-color: #fef2f2;
  color: #991b1b;
  border-color: #fca5a5;
}

.alert-success {
  background-color: #f0fdf4;
  color: #166534;
  border-color: #86efac;
}

/* Login Page specific */
.auth-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}

.auth-card {
  width: 100%;
  max-width: 400px;
}

/* Tag Input */
.tag-input-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem;
  min-height: 42px;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  background-color: #fff;
  cursor: text;
}

.tag-input-container:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.25);
}

.tag {
  background-color: var(--primary-color);
  color: white;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.tag-close {
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 1rem;
  opacity: 0.8;
}

.tag-close:hover {
  opacity: 1;
}

.tag-input {
  border: none !important;
  outline: none !important;
  flex-grow: 1;
  min-width: 120px;
  padding: 0.25rem 0;
  box-shadow: none !important;
  /* Override form-control shadow */
  font-family: inherit;
  font-size: 1rem;
}

/* Small Tag */
.tag-sm {
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  background-color: #e2e8f0;
  color: #475569;
}

.tag-role {
  background-color: #fce7f3;
  /* Pink-100 */
  color: #be185d;
  /* Pink-700 */
}

.tag-role-admin {
  background-color: #fef3c7;
  /* Amber-100 */
  color: #b45309;
  /* Amber-700 */
}

.tag-role-staff {
  background-color: #e0f2fe;
  /* Sky-100 */
  color: #0369a1;
  /* Sky-700 */
}

/* Icon Button */
.btn-icon {
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.25rem;
}
