/* variables and theme config */
:root {
  /* color scheme */
  --primary-color: #2d4059;
  --primary-hover: #1f2d3f;
  --secondary-color: #ea5455;
  --accent-color: #f07b3f;
  --highlight-color: #ffd460;

  /* state colors */
  --success-color: #10b981;
  --info-color: #3b82f6;
  --warning-color: #f07b3f;

  /* neutral colors */
  --bg-body: #ce6060;
  --bg-card: #ffffff;
  --bg-card-alt: #f0f9ff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-color: #ffd46033;

  /* shadows */
  --shadow-sm: 0 1px 2px 0 rgba(45, 64, 89, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(45, 64, 89, 0.15),
    0 2px 4px -1px rgba(240, 123, 63, 0.1);
}

/* global layout */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #e8f4f8 0%, #f0f9ff 100%);
  background-attachment: fixed;
  color: var(--text-main);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background-image: url("/images/background.png");
  background-repeat: repeat;

  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  margin-top: 20px;

  width: 100%;
  flex: 1;
}

h1,
h2,
h3 {
  color: var(--primary-color);
  margin-top: 0;
}

h1 {
  background: linear-gradient(135deg, var(--secondary-color), #2d4059);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.2s;
}

a:hover {
  color: #ffd460;
}

button {
  cursor: pointer;
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(234, 84, 85, 0.3);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(234, 84, 85, 0.4);
}

button:active {
  transform: translateY(0);
}

/* primary button style */
.button-blue,
.btn-primary {
  background: #ea5455;
  color: white !important;
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-decoration: none; /* needed for anchor tags */
  display: inline-block;
}

.button-blue:hover,
.btn-primary:hover {
  background: #ea5455;
  color: #ffd460 !important;
  box-shadow: 0 6px 12px rgba(234, 84, 85, 0.4);
}

/* secondary button */
button.secondary {
  background: linear-gradient(135deg, var(--primary-color), #3d5a7e);
}

button.secondary:hover {
  box-shadow: 0 4px 12px rgba(45, 64, 89, 0.4);
}

/* accent button */
button.accent {
  background: var(--highlight-color);
  color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(255, 212, 96, 0.3);
}

button.accent:hover {
  box-shadow: 0 4px 12px rgba(255, 212, 96, 0.5);
}

input,
select,
textarea {
  display: block;
  width: 100%;
  max-width: 400px;
  margin-bottom: 15px;
  padding: 10px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1em;
  transition: all 0.2s;
  background-color: white;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(240, 123, 63, 0.15);
}

label {
  font-weight: bold;
  margin-top: 10px;
  display: block;
  color: var(--primary-color);
}

/* navbar styles */
.navbar {
  width: 100%;
  height: 60px;
  background: linear-gradient(90deg, var(--primary-color) 0%, #3d5a7e 100%);
  border-bottom: 3px solid var(--highlight-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-sizing: border-box;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--highlight-color);
  display: flex;
  align-items: center;
  gap: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
}

.nav-link:hover {
  background-color: rgba(255, 212, 96, 0.2);
  color: var(--highlight-color);
  transform: translateY(-2px);
}

.nav-link.active {
  background: linear-gradient(
    135deg,
    var(--secondary-color),
    var(--accent-color)
  );
  color: white;
}

/* user profile area */
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 20px;
  border-left: 2px solid rgba(255, 212, 96, 0.3);
}

.nav-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 3px solid var(--highlight-color);
  box-shadow: 0 2px 8px rgba(255, 212, 96, 0.4);
}

/* toast notifications */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 250px;
  padding: 15px 20px;
  border-radius: 8px;
  color: white;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  background: linear-gradient(135deg, #10b981, #059669);
  border-left: 5px solid #047857;
}

.toast-error {
  background: linear-gradient(135deg, var(--secondary-color), #d63031);
  border-left: 5px solid #c0392b;
}

.toast-info {
  background: linear-gradient(135deg, var(--primary-color), #3d5a7e);
  border-left: 5px solid #1f2d3f;
}

.toast-warning {
  background: linear-gradient(135deg, var(--accent-color), #e67e22);
  border-left: 5px solid #d35400;
}

/* component styles */
.radio-option {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 1.1em;
  cursor: pointer;
  padding: 10px;
  border-radius: 8px;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.radio-option:hover {
  background-color: #fffbf5;
  border-color: var(--highlight-color);
}

.radio-option input[type="radio"] {
  margin-right: 10px;
  transform: scale(1.3);
  width: auto;
  display: inline-block;
  margin-bottom: 0;
  accent-color: var(--accent-color);
}