/* Variables */
:root {
  --clr-primary--100: hsl(115, 89%, 21%);
  --clr-primary--200: hsl(115, 94%, 35%);
  --clr-primary--400: hsl(115, 88%, 50%);
  --clr-primary--600: hsl(115, 90%, 44%);
  --clr-primary--800: hsl(115, 71%, 85%);

  --clr-secondary--100: rgb(9, 128, 184);

  --clr-dark--dark: hsl(213, 24%, 18%);
  --clr-dark--200: hsl(213, 24%, 40%);
  --clr-dark--400: hsl(213, 24%, 60%);
  --clr-dark--600: hsl(213, 24%, 80%);
  --clr-dark--800: hsl(213, 24%, 90%);

  --clr-light: hsl(0, 0%, 100%);
  --clr-light--200: hsl(0, 0%, 90%);
  --clr-light--400: hsl(0, 0%, 80%);
  --clr-light--600: hsl(180, 2%, 51%);
  --clr-light--800: hsl(180, 3%, 29%);
  --clr-text: #292626;

  --clr-dashboard-main: hsl(191, 23%, 91%);
  --clr-dashboard-aside: hsl(200, 12%, 95%);
  --clr-dashboard-links: hsl(0, 2%, 41%);

  --clr-stat-gradient-1: hsl(115, 89%, 21%);
  --clr-stat-gradient-2: hsl(115, 94%, 35%);

  /* Primary Colors (from logo) */
  --color-primary: #204a34; /* Main dark green */
  --color-primary-dark: #141a17; /* Main dark green */
  --color-primary-light: #2f6a4c; /* Lighter green for hover */
  --color-secondary: #f7b900; /* Gold accent */
  --color-secondary-hover: #e6a800; /* Darker gold for hover */

  /* Supporting Colors */
  --color-green-soft: #3c7d5c; /* Secondary green tone */
  --color-accent-bg: #fff3cc; /* Pale yellow background */
  --color-accent-primary-bg: #2f6a4c34; /* Pale yellow background */
  --color-bg-light: #f5f8f6; /* Page background */
  --color-border: #d8d8d8; /* Border / Divider */

  /* Text Colors */
  --text-dark: #1f1f1f; /* Main body text */
  --text-light: #555555; /* Secondary text */
  --text-on-primary: #ffffff; /* Text on dark green */
  --text-on-accent: #1f1f1f; /* Text on yellow background */

  /* Utility Colors (Optional) */
  --success: #3c7d5c;
  --warning: #e6a800;
  --error: #d9534f;
}

/* Reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}

body {
  overflow-x: hidden;
  color: var(--clr-text);
  background: var(--clr-dark--dark);
  line-height: 1.4;
  font-family: Arial, sans-serif;
  font-size: 14px;
  position: relative;
}

h1 {
  font-size: clamp(2.3rem, 2vw, 6rem);
}

h2 {
  font-size: clamp(2rem, 2vw, 4rem);
}

p.notice {
  font-size: 1rem;
  font-weight: 400;
  color: #1f1e1e;
}

p.notice span {
  font-weight: 700;
}

span.inline {
  font-size: 1.2rem !important;
  color: var(--clr-stat-gradient-1);
  cursor: pointer;
  display: inline-block;
  margin-inline: 0.3em;
  padding-inline: 0.3em;
}

img {
  display: block;
  max-width: 100%;
}
ul {
  list-style: none;
}
label {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5em;
}

label > span {
  color: red;
}

.review-container {
  display: flex;
  gap: 0.5em;
  align-items: center;
}

label.review-label {
  font-weight: 600;
  padding: 0.4em 0.6em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.3em;
}

label.review-label.review-approve {
  color: var(--clr-primary--200);
}

label.review-label.review-reject {
  color: rgb(153, 24, 24);
}

label.review-label span {
  color: inherit;
}

.review-note.hidden {
  display: none;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="number"],
input[type="password"],
input[type="file"],
input[type="date"],
textarea,
select {
  display: block;
  padding: 0.8em;
  outline: none;
  border: 1px solid var(--clr-light--400);
  border-radius: 0.2em;
  font-size: 1rem;
  color: var(--clr-dark--200);
  width: 100%;
}

input[type="radio"] {
  display: block;
  width: 1.2rem;
  accent-color: var(--clr-primary--400);
}

input:read-only {
  background-color: #e2dada;
}

input:focus,
input:hover {
  border: 1px solid var(--clr-stat-gradient-1);
}

.btn {
  display: block;
  outline: none;
  border: none;
  border-radius: 0.3em;
  padding: 1em 1.25em;
  font-size: 1rem;
  font-weight: 500;
  color: var(--clr-light);
  background: var(--clr-dark--200);
}

.btn:hover,
.btn:focus {
  color: var(--clr-light);
  background: var(--clr-stat-gradient-2);
  cursor: pointer;
}

.btn--primary {
  background: var(--clr-stat-gradient-1);
}

.btn--alt {
  background: var(--clr-light);
  color: var(--color-green-soft);
  border: 1px solid var(--color-primary-light);
}

.btn--text {
  background: none;
  color: #444141;
  font-weight: 800;
  font-size: 1rem;
}

.btn--small {
  font-size: 0.9rem;
  padding: 0.7em;
  margin-bottom: 1em;
}

.btn--block {
  display: block;
}

.btn--inline {
  display: inline;
}

.btn--delete {
  background: #881a1a;
}

.btn--suspend {
  background: #918e02;
}

.btn--w-25 {
  width: 25%;
}
.btn--w-50 {
  width: 50%;
}
.btn--w-100 {
  width: 100%;
}

.btn--center {
  display: block;
  margin: auto;
}

.flex {
  display: flex;
}

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

.justify-center {
  justify-content: center;
}

.gap-2 {
  gap: 0.5em;
}
.gap-4 {
  gap: 1em;
}

.form-group {
  width: 100%;
  margin-bottom: 1.5em;
}

.form-group img {
  width: 100%;
}

.form-search-group {
  display: flex;
  gap: 0.5em;
}

.otp-container {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.text-shade {
  color: var(--clr-dark--200);
}

.text-danger {
  color: var(--error);
}

.container {
  margin-inline: auto;
  width: min(90%, 1300px);
}

.alert {
  background: rgba(12, 12, 12, 0.856);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  padding: 1em;
  position: absolute;
  z-index: 2000;
  top: -10dvh;
  opacity: 0;
  left: 50%;
  margin: auto;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90%;
  border-radius: 5px;
  text-align: center;
  transition: all ease 0.5s;
}

.alert p {
  padding: 1em;
  color: white;
  font-weight: 500;
}

.alert.show {
  top: 2dvh;
  opacity: 1;
}

.alert--error {
  color: rgb(219, 60, 60);
}

.alert--success {
  color: rgb(19, 107, 19);
}

.spinner-container {
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  position: absolute;
  inset: 0;
  height: 100vh;
  z-index: 2000;
}

.spinner-container.show {
  display: flex;
}

.spinner {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 20px solid var(--clr-stat-gradient-2);
  border-bottom: 20px solid var(--clr-stat-gradient-1);
  border-right: 20px solid var(--clr-stat-gradient-1);

  animation: spinner infinite forwards linear 1s;
}

@keyframes spinner {
  100% {
    transform: rotate(1turn);
  }
}

/* LANDING PAGE SECTION */

body.landing {
  background: white;
}

/* Hero */
.hero {
  margin: auto;
  min-height: 80dvh;
  width: 98%;
}
.hero .login-form {
  margin-top: 2em;
  padding: 2em;
}

.login-form img {
  display: block;
  margin: auto;
  margin-bottom: 2em;
  width: 100px;
}
/* End Hero */

.landing-footer {
  color: var(--clr-dark--dark);
  background: white;
  padding-block: 2em;
  padding-top: 4em;
  text-align: center;
}
/* END LANDING PAGE SECTION */

/* DASHBOARD PAGES */
.main {
  background: var(--clr-dashboard-main);
  display: flex;
  justify-content: space-between;
  height: 100dvh;
  overflow: hidden;
}

.main .aside {
  background: var(--clr-dashboard-aside);
  width: 0;
  transition: all 0.2s ease;
  height: 100%;
  overflow-y: auto;

  z-index: 1000;
}

.aside.toggle {
  width: 70%;
}

.aside .nav {
  display: flex;
  flex-direction: column;
  gap: 4em;
  margin: 0 1em;
  margin-top: 2em;
}

.nav-list {
  padding: 0;
}

.aside .nav a {
  color: var(--clr-dashboard-links);
  font-weight: 500;
  display: block;
  width: 100%;
  padding: 1em;
  margin-block: 0.5em;
  border-radius: 0.5em;
}

.nav a span {
  background: white;
  border-radius: inherit;
  padding: 0.5em;
}

.aside .nav a:hover,
.aside .nav a.active {
  background: var(--clr-light--400);
}

.aside h1 {
  font-size: clamp(2rem, 1.5vw, 4rem);
  color: var(--clr-dashboard-links);
  margin-top: 0.5em;
  margin-left: 0.45em;
  text-transform: uppercase;
}

.aside .logo {
  aspect-ratio: 1/1;
  border-radius: 5%;
  box-shadow: 0 0 5px #ccc;
  width: 50%;
  margin: auto;
  padding: 0.5em;
  margin-top: 0.5em;
}

a.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

a.logo-container {
  color: var(--clr-dashboard-links);
  margin-top: 0.5em;
  font-weight: 500;
}

.aside h1 > span {
  color: var(--clr-stat-gradient-1);
}

.main .right-section {
  flex-grow: 1;
  flex-shrink: 1;
  width: 20%;
  position: relative;
  height: 100%;
  overflow-y: auto;
}

.right-section .header {
  background: var(--clr-dashboard-main);
  font-size: 1rem;
  padding: 1em;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  position: sticky;
  top: 0;
  left: 0;
  right: 0;

  z-index: 5;
}

.header_user-avatar span:nth-child(1) {
  font-size: 1.3rem;
}

.header_menu-toggler {
  font-size: 1.3rem;
  cursor: pointer;
}

.drop-down {
  position: relative;
}

.drop-down-content {
  display: none;
  background: white;
  border-radius: 0.5em;
  box-shadow: 0 0 10px var(--clr-lgiht--200);
  padding: 0.8em;
  width: max-content;
  position: absolute;
  right: 0;
}

.drop-down-content ul {
  display: flex;
  flex-direction: column;
  gap: 1.5em;
}

.drop-down-trigger {
  cursor: pointer;
}

.drop-down:hover .drop-down-content {
  display: block;
}

.right-section .page {
  background: var(--clr-dark--dark);
  padding: 0 1em;
  padding-bottom: 2em;
  width: 100%;
  min-height: 100%;
}

.page_title {
  font-size: clamp(2rem, 1.3vw, 3rem);
  color: #e0e0e0;
  padding-top: 0.5em;

  margin-bottom: 0.7em;
}

.page_header {
  display: flex;
  justify-content: end;
}

.page_content_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page_content_header .filters {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1em;
  padding-bottom: 2em;
}

.stat {
  color: white;
  background: var(--clr-text);
  border-radius: 0.5em;
  box-shadow: 0 0 1.5px var(--clr-dashboard-aside);
  padding: 1.5em;
  padding-bottom: 0.5em;

  display: flex;
  flex-direction: column;
  gap: 1em;

  transition: all 0.3s ease;
}

.stat:hover {
  background: linear-gradient(
    var(--clr-stat-gradient-1),
    var(--clr-stat-gradient-2)
  );
}

.stat_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat_header > * {
  opacity: 0.7;
}

.stat_header i {
  color: var(--color-secondary);
}

.stat_header h4 {
  font-size: 1rem;
  opacity: 0.85;
  font-weight: 400;
}

.stat_body {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat_body p:nth-child(1) {
  font-size: 1.5rem;
  font-weight: 600;
}

.charts {
  display: grid;
  gap: 2em;
  grid-template-columns: 1fr;
  margin-bottom: 1em;
  padding-bottom: 2rem;
}

.chart {
  background: var(--clr-dashboard-aside);
  box-shadow: 0 0 5px #e4e0e0;
  border-radius: 0.5em;
  padding: 1em;
  width: 100%;
}

.chart-title {
  margin-bottom: 1.5em;
}

.overlay {
  display: none;
  background: rgba(0, 0, 0, 0.7);
  position: absolute;
  width: 100vw;
  height: 100dvh;
  z-index: 10;
}

.overlay.toggle {
  display: block;
}

.table-responsive {
  background: var(--clr-dashboard-aside);
  padding: 1em;
  border-radius: 0.5em;
  box-shadow: 0 0 5px #e6e4e4;
  width: 100%;
  overflow: auto;
}

.action_td {
  display: flex;
  align-items: center;
  gap: 1em;
}

.action_td span {
  background: var(--clr-stat-gradient-1);
  color: white;
  cursor: pointer;
  border-radius: 5px;
  font-weight: 400;
  padding: 0.5em 0.7em;
}

.action_td span:nth-child(2),
span.delete {
  background: rgb(230, 70, 70);
}

span.edit {
  background: var(--clr-primary--200) !important;
}

#table_paginate {
  margin-top: 1em;
}

.paginate_button {
  color: white;
  background: var(--clr-stat-gradient-1);
  border-radius: 3px;
  margin: 0.3em;
  padding: 0.7em;
  cursor: pointer;
}

.paginate_button:hover {
  background: var(--clr-stat-gradient-2);
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin: 2rem 0;
}

.pagination a {
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--clr-stat-gradient-1);
  color: white;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.pagination a:hover {
  background-color: var(
    --clr-stat-gradient-2
  ); /* Darker shade of secondary color */
}

.profile-card {
  background: white;
  padding: 1em;
  box-shadow: 0 0 3px #ccc;
  border-radius: 0.5em;
  width: min(95%, 500px);
  margin: auto;
}

.profile-card > section {
  display: flex;
  gap: 4em;
}

/* Candidates Page */
.candidates {
  display: flex;
  flex-direction: column;
  gap: 4em;
  margin-top: 1em;
}

.candidates p {
  line-height: 1;
}

.candidate-group {
  padding: 1em;
}

.candidate-group:nth-child(odd) {
  background: #d9e7ee;
  border-radius: 1em;
}

.candidate-group .group-title {
  font-weight: 800;
  margin-bottom: 0.8em;
}

.group-body {
  display: grid;
  display: flex;
  gap: 1.5em;
  flex-wrap: wrap;
  justify-items: left;
}

.candidate-details {
  width: 400px;
  min-height: 500px;
  background: white;
  text-align: center;
  box-shadow: 0 0 10px #ccc;
  border-radius: 1em;
  padding: 0.5em;
  padding-bottom: 1em;
  overflow: hidden;
}

.candidate-details:hover {
  box-shadow: 0 0 50px #ccc;
}

.candidate-img {
  width: 100%;
  height: 70%;
  border-top-left-radius: 1em;
  border-top-right-radius: 1em;
}

.candidate-matricno {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 1.2em;
}

.candidate-name {
  font-size: 1rem;
  color: #4b4e50;
  margin-bottom: 1em;
}

.candidate-dept {
  font-size: 1.3rem;
  color: #333232;
}

.candidate-cgpa {
  font-size: 1rem;
  font-weight: bolder;
}
/* End Candidates Page */

.results-header {
  background: linear-gradient(135deg, #1d4ed8 0%, #3730a3 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.results-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.results-status {
  background: #fef3c7;
  color: #92400e;
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 2rem 0;
  text-align: center;
  font-weight: bold;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.result-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.position-name {
  font-size: 1.5rem;
  color: #1f2937;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e5e7eb;
}

.candidate-result {
  margin-bottom: 1.5rem;
}

.candidate-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.candidate-name {
  font-weight: bold;
  color: #1f2937;
}

.vote-percentage {
  color: var(--color-green-soft);
  font-weight: bold;
}

.progress-bar {
  background: #e5e7eb;
  height: 1rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--color-green-soft);
  transition: width 1s ease-in-out;
}

.statistics-section {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.statistics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.statistic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 1.5rem;
  background: #f3f4f6;
  border-radius: 0.5rem;
}

.statistic-card .stat-icon,
.nav-icon {
  color: var(--color-green-soft) !important;
}

.statistic-value {
  font-size: 2rem;
  font-weight: bold;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.statistic-label {
  color: #6b7280;
}

/* END DASHBOARD PAGES */

/* MODALS */
/* Logout Modal */

.modal,
.logout-modal,
.confirm-modal {
  background: rgba(0, 0, 0, 0.7);

  display: none;
  align-items: center;
  justify-content: center;

  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;

  z-index: 1000;
}

.modal {
  align-items: flex-start;
  padding: 1em;
  overflow-y: auto;
}

.modal.show,
.logout-modal.show,
.confirm-modal.show {
  display: flex;
}

.modal_content,
.logout-modal_content,
.confirm-modal_content {
  display: flex;
  align-items: flex-start;
  align-items: center;
  gap: 1em;

  background: white;
  border-radius: 0.5em;
  width: min(95%, 400px);
  padding: 1em;
}

.modal_content {
  display: block;
  width: min(98%, 700px);
}

.modal_content.post-modal {
  width: min(98%, 1000px);
}

.modal_content.mt-30 {
  margin-top: 16vh;
}

.modal_content .modal_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  margin-bottom: 1em;
  border-bottom: 1px solid #ccc;
}

.modal_content .modal_title {
  font-size: 1rem;
  font-weight: bold;
  color: #444141;
  display: flex;
  align-items: center;
  gap: 0.5em;
}

.modal p {
  font-size: clamp(1rem, 1.7vw, 1.2rem);
  margin-bottom: 0.5em;
}

.confirm-warning {
  color: rgb(244, 100, 100);
  font-weight: bold;
  display: block;
  margin-top: -0.5em;
}

.logout-action,
.confirm-action {
  flex-grow: 1;

  display: flex;
  flex-direction: column;
  gap: 1em;
}

.logout-modal_content h3,
.confirm-modal_content h3 {
  font-size: 1.5rem;
}

.logout-modal_buttons,
.confirm-modal_buttons {
  display: flex;
  align-items: center;
  gap: 1em;
}

/* End Logout Modal */
/* END MODALS */

/* Pagination */
/* General Pagination Styling */
#paginationControls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  gap: 10px;
}

#paginationControls button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#paginationControls button:hover:not([disabled]) {
  background-color: #0056b3;
}

#paginationControls button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

#paginationControls span {
  font-size: 18px;
  font-weight: bold;
  margin: 0 10px;
}

/* Media Query */
@media screen and (min-width: 768px) {
  .modal_content .modal_title {
    font-size: 1.5rem;
  }

  .md-max-width-normal {
    width: 400px;
  }

  .form-fields-group {
    display: flex;
    gap: 1em;
    align-items: center;
    justify-content: space-between;
  }

  .form-group-w-25 {
    width: 25%;
  }

  .form-group-w-75 {
    width: 75%;
  }

  /* Hero */
  .hero {
    min-height: 80dvh;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hero .login-form {
    padding: 2em;
    width: 40%;
    box-shadow: 0 0 10px #ccc;
  }

  .login-form img {
    display: block;
    margin: auto;
    margin-bottom: 2em;
    width: 100px;
  }
  /* End Hero */

  /* Dashboard */
  .charts {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    margin-bottom: 2em;
  }

  .main .aside {
    width: 30%;
  }

  .aside.aside.toggle {
    width: 0;
  }

  .aside .nav a {
    font-size: 1rem;
  }

  .overlay {
    display: none;
  }

  .overlay.toggle {
    display: none;
  }
  /* End Dashboard */
}

@media screen and (min-width: 1200px) {
  /* Dashboard */
  .charts {
    grid-template-columns: repeat(2, 1fr);
  }

  .main .aside {
    width: 20%;
  }

  /* Hero */
  .hero .login-form {
    width: 25%;
  }
  /* End Hero */

  /* End Dashboard */
}

@media screen and (min-width: 1400px) {
  /* Dashboard */
  .main .aside {
    width: 18%;
  }
  /* End Dashboard */

  .container {
    margin-inline: auto;
    width: min(95%, 1400px);
  }
}
