/* LOGIN */
body.login-bg {
  margin: 0;
  height: 100vh;
  font-family: Arial, sans-serif;
  display: flex;
  align-items: stretch;
  background: #810000; /* fallback */
}

/* Hero (left) and form (right) layout */
.login-hero {
  flex: 1 1 60%;
  background-image: url("images/logo.png"); /* small fallback, user can replace with large hero image */
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: hidden;
}
.login-hero::before {
  /* dark red translucent overlay to match screenshot */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(129, 0, 0, 0.9) 0%,
    rgba(129, 0, 0, 0.85) 30%,
    rgba(255, 242, 0, 0.08) 60%
  );
  mix-blend-mode: multiply;
}
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff200;
  text-align: left;
  max-width: 720px;
}
.hero-title {
  font-family: "Arial Black", Arial, sans-serif;
  font-size: 5vw;
  line-height: 0.95;
  color: #ffffff;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
  margin: 0 0 10px 0;
}
.hero-subtitle {
  color: #fff200;
  font-weight: bold;
  font-size: 1.2em;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* Centered login container with rounded corners */
.login-container {
  background: #d6d6d6;
  width: 380px;
  margin: 80px 60px;
  padding: 32px 18px 24px 18px;
  border-radius: 40px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  text-align: center;
  position: relative;
  border: 1px solid #999;
  flex: 0 0 420px;
  align-self: center;
}
.login-logo {
  width: 170px;
  margin-bottom: 8px;
}
.login-title {
  font-size: 2.3em;
  color: #810000;
  font-weight: bold;
  margin-bottom: 18px;
  font-family: "Arial Black", Arial, sans-serif;
}
#loginForm input {
  width: 88%;
  margin: 7px 0;
  padding: 9px;
  border: 1.5px solid #888;
  border-radius: 6px;
  font-size: 1em;
  background: #fff;
}
#loginForm button {
  width: 88%;
  padding: 10px;
  margin-top: 12px;
  background: #444;
  color: #fff;
  font-size: 1.1em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* small screens: stack hero above form */
@media (max-width: 900px) {
  body.login-bg {
    flex-direction: column;
  }
  .login-hero {
    flex: none;
    height: 46vh;
  }
  .login-container {
    width: 92%;
    margin: 18px auto;
    flex: none;
  }
  .hero-title {
    font-size: 8.5vw;
  }
}

body,
body.main-bg,
body.edit-bg {
  margin: 0;
  min-height: 100vh;
  background: #dedede;
  font-family: Arial, sans-serif;
  color: #222;
}

/* === SIDEBAR === */
.sidebar {
  width: 220px;
  background: #810000;
  min-height: 100vh;
  color: #fff200;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 18px;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
}
.sidebar-logo {
  text-align: center;
  margin-bottom: 18px;
  width: 100%;
}
.sidebar-logo img {
  width: 120px;
  margin-bottom: 8px;
}
.sidebar-menu {
  list-style: none;
  padding: 0 0 0 0;
  margin: 0;
  flex: 1;
  width: 100%;
}
.sidebar-menu li {
  padding: 10px 0 10px 24px;
  font-size: 1.12em;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.sidebar-menu li a {
  color: #fff200;
  text-decoration: none;
  font-weight: bold;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.18s;
}
.sidebar-menu li a:hover,
.sidebar-menu li a.active {
  color: #fff200;
  text-decoration: underline;
}
.sidebar-menu li span {
  font-size: 1.19em;
  color: #fff200;
  display: inline-block;
  vertical-align: middle;
}
.sidebar-logout {
  padding: 18px 0 22px 24px;
  font-size: 1.09em;
  color: #fff200;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  border-top: 1px solid #fff20044;
  margin-top: auto;
  font-weight: bold;
  background: none;
}
.sidebar-logout a {
  color: #fff200;
  text-decoration: underline;
  font-weight: bold;
  font-size: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

/* === MAIN CONTENT AREA === */
.main-content {
  margin-left: 220px;
  padding: 0;
  min-height: 100vh;
  background: #dedede;
}

/* === HEADER BAR === */
.main-header {
  background: #7c7a73;
  color: #fff200;
  padding: 22px 0 22px 0;
  margin-bottom: 0;
  text-align: center;
  font-family: "Arial Black", Arial, sans-serif;
}
.main-header h2 {
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  margin: 0;
  font-size: 2.5em;
  color: #fff200;
  text-shadow: 2px 2px 4px #333;
  line-height: 1.15;
  letter-spacing: 2px;
}

/* === STAT CARDS === */
.stat-container {
  display: flex;
  gap: 36px;
  padding: 48px 0 0 0;
  justify-content: center;
}
.stat-card {
  background: #810000;
  border-radius: 35px;
  width: 300px;
  height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.09);
  font-weight: bold;
  font-size: 1.2em;
}
.stat-card .stat-icon {
  font-size: 3em;
  margin-bottom: 8px;
  color: #3041b7; /* blue for user */
}
.stat-card.stat-layak .stat-icon {
  color: #3041b7; /* blue for tick */
}
.stat-card.stat-tidaklayak .stat-icon {
  color: #ff689f; /* pink for cross */
}
.stat-card .stat-value {
  font-size: 2.5em;
  font-weight: bold;
  margin-bottom: 4px;
  color: #fff200;
  text-shadow: 1px 1px 5px #333;
}
.stat-card .stat-label {
  font-size: 1.1em;
  color: #fff200;
  text-shadow: 1px 1px 5px #333;
  font-weight: normal;
}

/* === TAMBAH CALON & EDIT CALON FORM === */
.edit-form-row {
  display: flex;
  flex-direction: column;
}
.edit-form-row label {
  font-size: 1em;
  font-weight: normal;
  margin-bottom: 5px;
  color: #222;
}
.edit-form-row input[type="text"],
.edit-form-row input[type="email"] {
  padding: 7px 8px;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 1em;
  background: #fff;
  width: 100%;
  box-sizing: border-box;
}
.edit-form-actions {
  grid-column: 3;
  justify-self: end;
  margin-top: 24px;
  margin-bottom: 32px;
}
.edit-btn-simpan {
  background: #810000;
  color: #fff200;
  border: none;
  padding: 12px 38px;
  font-size: 1.05em;
  border-radius: 14px;
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 16px;
  margin-top: 10px;
  transition: background 0.2s;
}
.edit-btn-simpan:hover {
  background: #a90000;
  color: #fff200;
}
.edit-error,
.edit-success {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  text-align: center;
  font-size: 15px;
}
.edit-error {
  background: #ffeaea;
  color: #b60000;
}
.edit-success {
  background: #eaffea;
  color: #219a21;
}
.btn-tambah,
.edit-btn-simpan {
  background: #810000;
  color: #fff200;
  border: none;
  padding: 10px 38px;
  font-size: 1.05em;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 16px;
  transition: background 0.2s;
}
.btn-tambah:hover,
.edit-btn-simpan:hover {
  background: #a90000;
  color: #fff200;
}
.edit-btn-kembali {
  text-decoration: none;
  color: #ffd600;
  background: #810000;
  border: 1px solid #ffd600;
  padding: 9px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: bold;
  transition: background 0.2s, color 0.2s;
  margin-left: 10px;
}
.edit-btn-kembali:hover {
  background: #ffd600;
  color: #810000;
}
.edit-error,
.edit-success {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 14px;
  text-align: center;
  font-size: 15px;
}
.edit-error {
  background: #ffeaea;
  color: #b60000;
}
.edit-success {
  background: #eaffea;
  color: #219a21;
}

/* === SEMAK CALON === */
.search-row {
  margin: 36px 0 18px 0;
  text-align: center;
}
.search-box {
  width: 420px;
  padding: 13px 22px;
  font-size: 1.14em;
  border-radius: 28px;
  border: 1.5px solid #888;
  background: #f7f7f7;
  outline: none;
}
.error-message {
  color: #b60000;
  margin-top: 8px;
  min-height: 18px;
}
.calon-detail-card {
  background: #fff;
  border-radius: 8px;
  margin: 28px auto;
  padding: 26px 22px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.09);
  max-width: 900px;
  border: 1px solid #888;
}
.calon-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 28px;
  padding: 0 32px;
  margin: 0 auto;
  max-width: 1200px;
}
.calon-detail-label {
  font-weight: bold;
  color: #222;
  width: 100px;
  display: inline-block;
}
.calon-detail-btns {
  display: flex;
  gap: 18px;
  justify-content: flex-end;
  margin-top: 18px;
}
.btn-edit,
.btn-buang {
  padding: 10px 38px;
  font-size: 1.09em;
  border-radius: 10px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  margin-bottom: 6px;
  transition: background 0.2s;
}
.btn-edit {
  background: #810000;
  color: #fff200;
}
.btn-edit:hover {
  background: #a90000;
  color: #fff200;
}
.btn-buang {
  background: #810000;
  color: #fff200;
}
.btn-buang:hover {
  background: #b60000;
  color: #fff200;
}

/* === Responsive tweaks === */
@media (max-width: 1200px) {
  .calon-form {
    max-width: 96vw;
  }
  .form-row {
    flex-direction: column;
    gap: 0;
  }
}
@media (max-width: 1000px) {
  .main-header h1 {
    font-size: 1.5em;
  }
  .stat-card {
    width: 98vw;
    height: 140px;
    font-size: 1em;
  }
  .sidebar {
    width: 125px;
  }
  .main-content {
    margin-left: 125px;
  }
}

/* === Remove default link colors for sidebar === */
.sidebar-menu li a:visited,
.sidebar-menu li a:active {
  color: #fff200;
}
