:root {
  --color-primary: #115FB4;
  --color-primary-dark: #0d4a8e;
  --color-secondary: #706F6F;
  --color-white: #FFFFFF;
  --color-bg: #f4f7f6;
  --color-text: #333333;
  --color-success: #28a745;
  --color-danger: #dc3545;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Fallback for Myriad Pro */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --border-radius: 8px;
}

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

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800; /* Extrabold */
  color: var(--color-primary);
  margin-bottom: 1rem;
}

/* Header / Navbar */
header {
  background-color: var(--color-white);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

header .logo {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--color-primary);
  font-size: 1.5rem;
  text-decoration: none;
}

header nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: var(--color-secondary);
  font-weight: bold;
  transition: color 0.3s ease;
}

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

header button.logout-btn {
  background: none;
  border: none;
  color: var(--color-danger);
  font-weight: bold;
  cursor: pointer;
  margin-left: 1rem;
}

/* Layout Core */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 2rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--color-secondary);
}

.form-control {
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(17, 95, 180, 0.2);
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group .form-control {
  flex: 1;
}

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

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

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

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

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

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

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background-color: #f9f9f9;
  font-weight: bold;
  color: var(--color-secondary);
}

tr {
  transition: background-color 0.3s ease;
}

tr:hover {
  background-color: #f1f5f9;
}

tr.row-success {
  background-color: rgba(40, 167, 69, 0.1) !important;
}

tr.row-danger {
  background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--color-secondary);
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
}

.toast {
  background-color: var(--color-white);
  color: var(--color-text);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  margin-top: 10px;
  border-left: 5px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideIn 0.3s ease forwards;
}

.toast.success { border-left-color: var(--color-success); }
.toast.error { border-left-color: var(--color-danger); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* Dashboard Cards */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.dash-card {
  background: var(--color-white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  text-align: center;
  border-top: 4px solid var(--color-primary);
}

.dash-card h3 {
  font-size: 1.2rem;
  color: var(--color-secondary);
  margin-bottom: 0.5rem;
  font-family: var(--font-body);
  font-weight: normal;
}

.dash-card .value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

/* Login Center */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--color-white);
  padding: 3rem 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-card img.logo {
  max-width: 150px;
  margin-bottom: 2rem;
}
