:root {
  --background: #f8f9fa;
  --surface: #ffffff;
  --primary: #1f508a;
  --primary-hover: #163c68;
  --secondary: #eef2f7;
  --border: #d1d5db;
  --text-main: #24292f;
  --text-muted: #57606a;
  --danger: #d73a49;
  --success: #2da44e;
  --warning: #bf8700;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";
}

body {
  background-color: var(--background);
  color: var(--text-main);
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Header Styling */
nav {
  background: #1e56a0;
  color: white;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
  nav {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    text-align: center;
  }

  .logo-container {
    flex-direction: column;
    gap: 0.25rem;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.75rem;
  }
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.nav-links a,
.nav-links button {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: all 0.2s;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--surface);
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.stat-card p {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.stat-card h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

/* Site Groups & Tables */
.site-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.site-group-header {
  background: var(--secondary);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-group-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
}

.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th {
  background: #f1f3f5;
  text-align: left;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
  font-size: 0.75rem;
}

td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

tr:last-child td {
  border-bottom: none;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

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

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

.btn-outline {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text-main);
}

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

/* Toggles */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* Activity Logs */
.logs-section {
  margin-top: 3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.log-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--secondary);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .log-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .log-time {
    text-align: left;
    padding-left: 0;
    width: 100%;
    opacity: 0.8;
  }
}

.log-item:last-child {
  border-bottom: none;
}

.log-time {
  color: var(--text-muted);
  font-size: 0.75rem;
  min-width: 150px;
  text-align: right;
}

.badge {
  display: inline-block;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  background: var(--secondary);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
}

/* Modals */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fcfcfc;
  color: var(--text-main);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31, 80, 138, 0.1);
}

/* Pagination */
.pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.pagination-controls {
  display: flex;
  gap: 0.5rem;
}

/* Modern Executive Login Page */
.login-page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: radial-gradient(circle at 0% 0%, #f1f5f9 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

/* Subtle background accent */
.login-page-wrapper::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 40%;
  height: 40%;
  background: radial-gradient(
    circle,
    rgba(30, 86, 160, 0.05) 0%,
    transparent 70%
  );
  border-radius: 50%;
}

.executive-login-card {
  background: #ffffff;
  width: 100%;
  max-width: 550px;
  padding: 1.5rem 0.2rem;
  border-radius: 12px;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 20px 25px -5px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  z-index: 10;
}

.executive-login-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 2rem;
  text-align: center;
}

.login-form-group {
  margin-bottom: 1.5rem;
}

.login-form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4a5568;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  color: #1a202c;
  transition: all 0.2s;
}

.login-input:focus {
  outline: none;
  border-color: #1e56a0;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(30, 86, 160, 0.08);
}

.btn-executive {
  width: 100%;
  padding: 1rem;
  background-color: #1e56a0;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.1s;
  margin-top: 1rem;
  box-shadow: 0 4px 6px rgba(30, 86, 160, 0.2);
}

.btn-executive:hover {
  background-color: #164282;
  transform: translateY(-1px);
}

.btn-executive:active {
  transform: translateY(0);
}

.remember-me-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.remember-me-row input {
  width: 16px;
  height: 16px;
  accent-color: #1e56a0;
  cursor: pointer;
}

.remember-me-row label {
  font-size: 0.9rem;
  color: #4a5568;
  cursor: pointer;
  user-select: none;
}
