:root {
    --primary-color: #2D8B61;
    --primary-light: #4CAF50;
    --primary-dark: #1b5e20;
    --secondary-color: #f0f8f0;
    --text-color: #333;
    --border-color: #ddd;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --error-color: #f44336;
    --success-color: #4CAF50;
    --info-color: #2196F3;
    --warning-color: #FFC107;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Login Page Styles */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    animation: fadeIn 0.5s ease-out;
}

.app-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: flex-end;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-buttons {
    display: flex;
    gap: 1rem;
}

.header-buttons a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    background-color: var(--primary-dark);
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-buttons a:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.school-logo1 {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
    animation: scaleIn 0.5s ease-out;
}

.logo1 {
    max-width: 150px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.headings {
    text-align: center;
    margin-bottom: 2rem;
    animation: slideDown 0.6s ease-out;
}

.headings h1 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.headings h2 {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 400;
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.login-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
    animation: fadeInUp 0.7s ease-out;
}

.login-divider {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px 2px 0 0;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f9f9f9;
}

.form-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
    background-color: white;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary-color);
}

.sign-in-button {
    width: 100%;
    padding: 0.9rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sign-in-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.sign-in-button:active {
    transform: translateY(0);
}

.button-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    position: absolute;
    right: 10px;
}

/* Demo Credentials Styles */
.demo-credentials {
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    animation: slideUp 0.8s ease-out;
}

.demo-credentials h3 {
    color: var(--primary-color);
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1rem;
}

.credential-item {
    padding: 0.5rem;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.credential-item p {
    font-size: 0.85rem;
    margin: 0.2rem 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.support-link {
    text-align: center;
    margin-top: 1.5rem;
}

.support-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.support-link a:hover {
    text-decoration: underline;
}

.form-feedback {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    color: var(--error-color);
}

/* Voting Page Styles */
.header {
    background-color: var(--primary-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    flex-wrap: wrap;
    animation: slideDown 0.5s ease-out;
}

.header img {
    max-width: 80px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.header img:hover {
    transform: scale(1.05);
}

.header h1 {
    font-size: 1.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.view-voting-dashboard button {
    background-color: white;
    color: var(--primary-color);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.view-voting-dashboard button:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.logout-btn {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logout-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.logout-btn i {
    font-size: 0.9rem;
}

.container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.7s ease-out;
}

.loggedIn {
    display: flex;
    flex-direction: column; /* Arrange items vertically */
    justify-content: center; /* Center the content vertically */
    align-items: center; /* Center the content horizontally */
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
    gap: 1rem;
    text-align: center; /* Center text content */
}

/* Ensure the p tags inside .loggedIn are centered properly */
.loggedIn p {
    font-weight: 500;
    margin: 0;
}

/* Additional styling for the welcome-text */
.welcome-text {
    color: var(--primary-color);
    font-style: italic;
    margin-top: 1rem; /* Adds some spacing between the two sections */
}

/* Style for the logged-in-info div */
.logged-in-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem; /* Space between the label and the paragraph */
}


















/* Staff lookup autocomplete styles */
.autocomplete-list {
    position: absolute;
    z-index: 50; /* Higher z-index to ensure it's above other elements */
    width: 100%;
    top: 160%; /* Position it at the bottom of the parent element */
    left: 0;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 2px; /* Add a small gap between input and dropdown */
  }
  
  .suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
  }
  
  .suggestion-item:last-child {
    border-bottom: none;
  }
  
  .suggestion-item:hover {
    background-color: #eff6ff;
  }
  
  .suggestion-item.active {
    background-color: #e0e7ff;
  }
  
  /* Additional form styles */
  .input-group {
    margin-bottom: 1.5rem;
    position: relative;
  }
  
  .input-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
    transition: var(--transition);
  }
  
  .input-group label i {
    color: var(--primary-color);
    margin-right: 8px;
  }
  
  .input-group input,
  .input-group textarea,
  .input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
  }
  
  .input-group input:focus,
  .input-group textarea:focus,
  .input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    background-color: white;
  }
  
  .input-focus label {
    color: var(--primary-color);
  }
  
  /* Container styles */
  .container h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 0.5rem;
  }
  
  .container h2:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
  }
  
  .animate-form {
    animation: fadeInUp 0.7s ease-out;
  }
  
  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  

  














/* Staff lookup autocomplete styles */
.autocomplete-list {
    position: absolute;
    z-index: 50; /* Higher z-index to ensure it's above other elements */
    width: 100%;
    top: 100%; /* Position it directly below the parent input element */
    left: 0;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 2px; /* Small gap between input and dropdown */
    display: none; /* Hidden by default */
}

.suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #eff6ff;
}

.suggestion-item.active {
    background-color: #e0e7ff;
}

/* Input group and label styles */
.input-group {
    margin-bottom: 1.5rem;
    position: relative; /* For positioning autocomplete list */
}

.input-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #4a5568;
    transition: var(--transition);
}

.input-group label i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* Input field styles */
.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    background-color: white;
}

/* Container styles */
.container h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.container h2:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

/* Animation */
.animate-form {
    animation: fadeInUp 0.7s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}








#submitBtn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#submitBtn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#submitBtn:active {
    transform: translateY(0);
}

#submitBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#submitBtn i {
    font-size: 0.9rem;
}

.autocomplete-list {
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 150px;
    overflow-y: auto;
    position: relative;
    top: -1.5rem;
    background: white;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.autocomplete-list div {
    padding: 0.7rem 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.autocomplete-list div:hover {
    background-color: var(--secondary-color);
}

.submissions-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1.5rem;
    animation: fadeIn 0.8s ease-out;
}

.submissions-container h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}

.recent-submissions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.submission-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.submission-card.show {
    opacity: 1;
    transform: translateY(0);
}

.submission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.submission-header {
    padding: 1.2rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.submission-title {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.voter-badge, .voted-badge {
    font-size: 0.7rem;
    background-color: var(--primary-light);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    display: inline-block;
    font-weight: 500;
}

.submission-date {
    color: #6c757d;
    font-size: 0.8rem;
}

.submission-content {
    padding: 1.2rem;
}

.voted-teacher {
    margin-bottom: 1rem;
}

.voted-teacher h4 {
    color: var(--text-color);
    margin: 0.3rem 0;
}

.department {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.vote-reason h5 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.vote-reason p {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    font-style: italic;
}

.no-submissions {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Admin Page Styles */
.admin-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    flex-wrap: wrap;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    animation: slideDown 0.5s ease-out;
}

.admin-logo img {
    max-width: 80px;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.2);
}

.admin-header h1 {
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.admin-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.admin-actions button, 
.admin-actions a {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.download-btn {
    border: #057b2c 1px solid;
    color: rgb(0, 105, 33);
}

.download-btn:hover {
    color: #827901;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.clear-btn {
    border: #057b2c 2px solid;
    color: rgb(0, 105, 33);
}

.clear-btn:hover {
    color: #827901;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.refresh-btn {
    border: #057b2c 2px solid;
    color: rgb(0, 105, 33);
}

.refresh-btn:hover {
    color: #827901;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.back-btn {
    border: #057b2c 2px solid;
    color: rgb(0, 105, 33);
    background-color: white;
}

.back-btn:hover {
    color: #827901;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.logout-btn {
    background-color: rgba(0, 94, 22, 0.844);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.logout-btn:hover {
    background-color: rgba(0, 94, 22, 0.628);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.button-hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.button-clicked {
    transform: scale(0.95);
}

.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    animation: fadeIn 0.6s ease-out;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background-color: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: var(--transition);
    animation: fadeInUp 0.7s ease-out;
    border-bottom: 3px solid var(--primary-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-card h3 {
    color: var(--text-color);
    font-size: 1rem;
}

.stat-value {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
}

.leader-section {
    margin-bottom: 2.2rem;
}

.leader-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.2rem;
    position: relative;
}

.leader-section h2:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.leader-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition);
    border-top: 6px solid var(--primary-color);
}

.leader-card.animate-card {
    opacity: 1;
    transform: translateY(0);
}

.leader-details {
    text-align: center;
    width: 100%;
}

.winner-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    color: gold;
    font-size: 2.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.leader-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.leader-department {
    color: #6c757d;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.leader-votes {
    font-size: 1.0rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.8rem;
}

.leader-reason {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: .6rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-style: italic;
    position: relative;
}

.leader-reason:before {
    content: '\201C';
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.2;
    position: absolute;
    top: 0;
    left: 10px;
    line-height: 1;
}

.leader-time {
    color: #6c757d;
    font-size: 0.9rem;
}

.view-details-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.view-details-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.view-details-btn:active {
    transform: translateY(0);
}

.voting-results h2 {
    color: var(--primary-color);
    margin-bottom: 1.8rem;
    text-align: center;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.voting-results h2:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.teacher-rankings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
}

.teacher-card {
    background-color: white;
    border-radius: 12px;
    padding: 1.8rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: var(--transition);
    border-left: 5px solid var(--primary-color);
    opacity: 0;
    transform: translateY(20px);
}

.teacher-card.animate-card {
    opacity: 1;
    transform: translateY(0);
}

.teacher-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.rank-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.teacher-card h3 {
    color: var(--text-color);
    margin-bottom: 0.7rem;
    padding-right: 40px;
    font-size: 1.3rem;
}

.teacher-department {
    color: #6c757d;
    margin-bottom: 1.2rem;
    font-size: 1rem;
}

.teacher-votes {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.3rem;
    font-size: 1.1rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 85%;
    max-width: 800px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.modal-content.show-modal {
    transform: scale(1);
    opacity: 1;
}

.confirm-modal {
    max-width: 500px;
    text-align: center;
}

.confirm-modal h2 {
    color: #e74c3c;
    margin-bottom: 1rem;
}

.confirm-modal p {
    margin-bottom: 2rem;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.confirm-btn, .cancel-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.confirm-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
}

.confirm-btn:hover {
    background-color: #c0392b;
}

.cancel-btn {
    background-color: #f5f5f5;
    color: var(--text-color);
    border: 1px solid #e0e0e0;
}

.cancel-btn:hover {
    background-color: #e9e9e9;
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.8rem;
    cursor: pointer;
    transition: var(--transition);
    width: 32px;
    height: 32px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.close-modal:hover {
    color: var(--primary-color);
    background-color: rgba(0, 0, 0, 0.05);
}

.modal-department {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.modal-votes {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 2rem;
    font-size: 1.3rem;
}

.voting-history {
    margin-top: 1.5rem;
}

.history-item {
    background-color: #f8f9fa;
    padding: 1.2rem;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease-out;
    border-left: 3px solid var(--primary-color);
}

.history-item.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.history-voter {
    font-weight: 600;
    margin-bottom: 0.7rem;
    color: var(--primary-color);
}

.history-reason {
    font-style: italic;
    margin-bottom: 0.7rem;
    padding: 0.8rem;
    background-color: white;
    border-radius: 8px;
}

.history-date {
    color: #6c757d;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Notification styles */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 1rem 2rem;
    border-radius: 8px;
    background-color: #333;
    color: white;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 300px;
    opacity: 0;
    transition: all 0.3s ease-out;
}

.notification.show-notification {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.notification.success {
    background-color: var(--success-color);
}

.notification.error {
    background-color: var(--error-color);
}

.notification.info {
    background-color: var(--info-color);
}

.notification.warning {
    background-color: var(--warning-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .header, .admin-header, .details-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }
    
    .header-actions, .admin-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .container, .admin-container {
        padding: 1.5rem 1rem;
        margin: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
        padding: 1.5rem;
    }
    
    .headings h1 {
        font-size: 1.4rem;
    }
    
    .headings h2 {
        font-size: 1rem;
    }
    
    .leader-card {
        padding: 1.5rem;
    }
    
    .leader-card h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .loggedIn {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .history-entry-header {
        flex-direction: column;
    }
    
    .header-buttons {
        flex-direction: row;
        width: 100%;
        gap: 10px;
        max-height: 30px;
    }
    
    .header-buttons a {
        text-align: center;
        background: none;
        border: none;
        box-shadow: none;
        font-size: 12px;
    }

    .header-actions .main-website {
        width: 50%;
    }
    .header-actions .school-resources {
        width: 50%;
    }
    
    .admin-actions {
        flex-direction: column;
    }
    
    .admin-actions button, 
    .admin-actions a {
        width: 100%;
        justify-content: center;
    }
    
    .submission-header {
        flex-direction: column;
    }
    
    .credential-item {
        font-size: 0.8rem;
    }

    .school-logo1 {
        margin: 10px auto;
    }

    .school-logo1 img {
        width: 90px;
        border-radius: 2px;
    }

    .headings h1{
        font-size: 18px;
    }

    .headings h2 {
        font-size: 10px;
    }

    .login-container {
        font-size: 14px;
        padding: 30px;
        margin-top: -80px;
    }

    .login-container .login-divider {
        height: 1.5px;
    }

    .login-form input {
        height: 40px;
        border-radius: 3px;
    }

    .form-group ::placeholder {
        font-size: 12px;
    }

    .form-input {
        font-size: 12px;
    }

    .sign-in-button {
        padding: 10px;
        font-size: 12px;
    }

    .support-link {
        font-size: 12px;
    }

    #headinhs-voting h1 {
        font-size: 18px;
        font-weight: 350;
    }

    #header-actions button {
        font-size: 12px;
        padding: 5px;
        border-radius: 3px;
    }

    #header-actions {
        margin-top: -5px;
    }

    .logged-in-info {
        font-size: 12px;
        text-align: center;
        margin: 0 auto;
        margin-top: -10px;
        padding: 0px;
    }

    .welcome-text {
        font-size: 12px;
        color: #064127;
        font-style: normal;
    }

    #container h2 {
        font-size: 16px;
    }

    #votingForm {
        font-size: 12px;
    }

    #votingForm input {
        height: 40px;
        border-radius: 3px;
    }

    .loggedIn {
        border-left: none;
        border-bottom: #01580e 2px solid;
    }

    #votingForm textarea {
        min-height: 20px;
    }

    #votingForm button {
        font-size: 14px;
        padding: 10px;
        border-radius: 3px;
    }

    #submissionsContainer h3 {
        font-size: 14px;
        margin-top: -40px;
    }

    #recentSubmissions {
        width: 80%; 
        max-width: 1200px; 
        margin-left: -19px;
    }

    #notification {
        height: 10px;
    }

    #header-actions button {
        background-color: #fff;
        color: #1b5e20;
    }





    .admin-header h1 {
        font-size: 16px;
        font-weight: 400;
    }
    
    .admin-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* Two equal-width columns */
        gap: 0.7rem;
    }
    
    .admin-actions button:nth-child(5) {
        grid-column: span 2; 
    }
    
    
    
    .admin-actions button, 
    .admin-actions a {
        font-size: 12px;
        border-radius: 5px;
        padding: 4px;
    }

    
    .download-btn:hover {
        color: #827901;
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }
    
    .clear-btn {
    }
    
    .refresh-btn {

    }
    
    .refresh-btn:hover {

    }
    
    .back-btn {
    }
    
    .back-btn:hover {

    }
    
    .logout-btn {
        background-color: #fff;
        color: #01580e;
    }
    
    .logout-btn:hover {
    }
    
    
    .button-clicked {
    }
    
    .admin-container {
        max-width: 1200px;
        margin: 2rem auto;
        animation: fadeIn 0.6s ease-out;
    }
    
    .stats-overview {
        display: flex;
        gap: 1.1rem; 
        margin-bottom: 1rem; 
        flex-wrap: wrap; 
        margin-top: -50px;
    }
    
    .stats-overview {
        display: grid;
        grid-template-columns: repeat(2, 1fr); 
        gap: 8px; 
        margin-bottom: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stats-overview .stat-card:nth-child(3) {
        grid-column: span 2; 
    }
    
    .stat-card h3 {
        font-size: 14px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .leader-section {
        margin-bottom: 2.2rem;
    }
    
    .leader-section h2 {
        color: rgb(234, 154, 7);
        font-size: 1.1rem;
        font-weight: 500;
    }
    
    .leader-section h2:after {
        height: 1px;
        background: var(--warning-color);
        border-radius: 3px;
    }
    
    .leader-card {
        background-color: white;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 700px;
        margin: 0 auto;
        opacity: 0;
        transform: translateY(30px);
        transition: var(--transition);
        border-top: 2px solid var(--success-color);
    }
    
    
    .leader-details {
        text-align: center;
        width: 100%;
    }
    
    .winner-badge {
        top: 20px;
        right: 20px;
        color: var(--warning-color);
        font-size: 1.5rem;

    }

    .leader-card h3 {
        font-size: 16px;
        color: var(--primary-color);
        margin-bottom: 0px;
    }
    
    .leader-department {
        color: #6c757d;
        font-size: 16px;
        margin-bottom: 1rem;
    }
    
    .leader-votes {
        font-size: 1.0rem;
        margin-bottom: 5px;
    }
    
    .leader-reason {
        padding: 5px;
        border-radius: 2px;
        margin-bottom: 10px;
        font-size: 14px;
        font-style: normal;
    }
        
    .leader-time {
        font-size: 12px;
    }
    
    .view-details-btn {
        padding: 5px;
        border-radius: 5px;
        width: 100%;
    }
    
    .voting-results h2 {
        margin-bottom: 14px;
        font-size: 14px;
        padding-bottom: 5px;
        font-weight: 400;
    }
    
    .voting-results h2:after {
        bottom: 0;
        width: 38%;
        height: 1px;
    }
    
    .teacher-rankings {
        gap: 10px;
    }
    
    .teacher-card {
        border-radius: 8px;
        padding: 15px;
        border-top: 1px solid var(--primary-color);
        transform: translateX(20px);
    }
        
    .rank-badge {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .teacher-card h3 {
        margin-bottom: 0.7rem;
        padding-right: 40px;
        font-size: 16px;
    }
    
    .teacher-department {
        margin-bottom: 10px;
        font-size: 14px;
    }
    
    .teacher-votes {
        margin-bottom: 0px;
    }

    .admin-header {
        border-bottom: #e89a00 2px solid;        
    }
    

}

/* Animate-in for submissions */
.animate-in {
    animation: fadeInUp 0.5s ease-out;
}

.text-center {
    text-align: center;
}

