
/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: #0a0a0a;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  overflow-x: hidden;
}

/* Topbar - perfectly centered and balanced */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: rgba(16, 16, 16, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  height: 40px;
  border-radius: 8px;
}

.titles h1 {
  margin: 0;
  color: #ff5c00;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.titles p {
  margin: 0;
  color: #a0a0a0;
  font-size: 14px;
  font-weight: 500;
  margin-top: 4px;
}

/* Main container - perfectly centered with balanced layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
  box-sizing: border-box;
}

/* Ensure container is responsive for tablets */
@media (max-width: 1200px) {
  .container {
    padding: 24px 20px;
  }
}

@media (max-width: 900px) {
  .container {
    padding: 20px 16px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 16px 12px;
  }
}

/* Admin container - more compact and centered */
.admin-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 32px;
}

/* Ensure dashboard section is also centered */
#dashboard {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

/* Three column layout - perfectly balanced and symmetrical */
.threecol {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Ensure all cards have equal heights and perfect alignment */
.threecol .card {
  height: auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

/* Cards - perfectly symmetrical with consistent spacing */
.card {
  background: rgba(24, 24, 24, 0.9);
  backdrop-filter: blur(20px);
  border: none;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
  max-width: 100%;
  height: fit-content;
  display: flex;
  flex-direction: column;
}

/* Optimize card padding for tablets */
@media (max-width: 1200px) {
  .card {
    padding: 24px;
  }
}

@media (max-width: 900px) {
  .card {
    padding: 20px;
  }
}

@media (max-width: 600px) {
  .card {
    padding: 18px;
  }
}

.card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Section headers - perfectly aligned */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: none;
  width: 100%;
  box-sizing: border-box;
}

.section-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #ff5c00;
  letter-spacing: -0.01em;
  text-align: left;
}

/* Input styling - perfectly centered */
.input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 10px;
  border: none;
  background: rgba(16, 16, 16, 0.8);
  color: #ffffff;
  margin: 0 0 20px 0;
  font-size: 14px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  text-align: left;
}

/* Responsive input sizing for small screens */
@media (max-width: 1000px) {
  .input {
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 16px;
  }
}

@media (max-width: 768px) {
  .input {
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 14px;
  }
}

.input:focus {
  outline: none;
  border: none;
  box-shadow: 0 0 0 3px rgba(247, 148, 30, 0.3);
  background: rgba(24, 24, 24, 1);
}

.input::placeholder {
  color: #808080;
  opacity: 0.8;
}

/* Button styling - perfectly aligned */
.button {
  background: rgba(247, 148, 30, 0.9);
  color: #000000;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-height: 44px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  box-sizing: border-box;
}

.button:hover {
  background: #ff5c00;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 92, 0, 0.3);
}

.button.primary {
  background: #ff5c00;
  color: #000000;
}

.button.primary:hover {
  background: #ff5c00;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 92, 0, 0.3);
}

.button.outline {
  background: transparent;
  border: none;
  color: #ff5c00;
}

.button.outline:hover {
  background: rgba(255, 92, 0, 0.1);
  border: none;
  transform: translateY(-1px);
}

.button.danger {
  background: rgba(255, 69, 58, 0.9);
  color: #ffffff;
  border: none;
}

.button.danger:hover {
  background: rgba(255, 69, 58, 1);
  box-shadow: 0 6px 20px rgba(255, 69, 58, 0.4);
}

.button.success {
  background: rgba(48, 209, 88, 0.9);
  color: #000000;
  border: none;
}

.button.success:hover {
  background: rgba(48, 209, 88, 1);
  box-shadow: 0 6px 20px rgba(48, 209, 88, 0.4);
}

.button.small {
  padding: 10px 16px;
  font-size: 12px;
  min-height: 36px;
}

.button.large {
  padding: 16px 24px;
  font-size: 16px;
  min-height: 52px;
}

/* User list - clean condensed list view */
.user-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 0;
  flex: 1;
  align-content: start;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 0;
}

.user {
  padding: 12px 16px;
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  text-align: left;
  display: flex;
  align-items: center;
  min-height: 44px;
}

.user:hover {
  background: rgba(255, 92, 0, 0.1);
  color: #ff5c00;
}

.user.selected {
  background: rgba(255, 92, 0, 0.2);
  color: #ff5c00;
}

.user .name {
  font-weight: 500;
  color: inherit;
  font-size: 15px;
  line-height: 1.2;
}

/* Search input specific styling for index page */
#searchInput {
  background: rgba(16, 16, 16, 0.4);
  border: none;
  border-radius: 8px;
  margin-bottom: 16px;
}

#searchInput:focus {
  background: rgba(16, 16, 16, 0.6);
  box-shadow: 0 0 0 2px rgba(247, 148, 30, 0.3);
}

/* Reasons - perfectly grid aligned */
.reasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 12px;
  margin: 24px 0;
  flex: 1;
  align-content: start;
  width: 100%;
  box-sizing: border-box;
}

.reason {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(32, 32, 32, 0.8);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  position: relative;
  overflow: hidden;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.reason.active,
.reason:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 92, 0, 0.15);
  color: #ff5c00;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 92, 0, 0.2);
}

/* Who row - perfectly balanced */
.who-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(32, 32, 32, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.who {
  font-weight: 600;
  color: #ffffff;
  font-size: 16px;
}

/* Actions - perfectly aligned */
.actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 20px;
  width: 100%;
}

/* Ensure proper spacing in three column layout */
.threecol > .card {
  margin-bottom: 0;
  height: auto;
}

/* User selection state */
.user.selected {
  border-color: #ff5c00;
  background: rgba(255, 92, 0, 0.15);
  color: #ff5c00;
}

/* Note row */
#noteRow {
  margin-top: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* In list entries */
#inList .entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  box-sizing: border-box;
}

#inList .entry:last-child {
  border-bottom: 0;
}

#inList .entry .name {
  font-weight: 500;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.2;
}

#inList .meta {
  color: #a0a0a0;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

#inList .meta button {
  background: #ff5c00;
  color: #000000;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s ease;
}

#inList .meta button:hover {
  background: #ff5c00;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 92, 0, 0.3);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: rgba(16, 16, 16, 0.95);
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 10px;
  display: none;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 92, 0, 0.2);
  z-index: 1000;
}

.toast.show {
  display: block;
}

/* Footer - perfectly centered */
.footer {
  background: rgba(16, 16, 16, 0.95);
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  padding: 24px 32px;
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  width: 100%;
  box-sizing: border-box;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-logo-icon {
  width: 28px;
  height: 28px;
  position: relative;
}

.footer-logo-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 10px;
  background: #ff4444;
  border-radius: 50%;
  box-shadow: 0 0 10px #ff4444;
}

.footer-logo-icon::after {
  content: '';
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 14px;
  background: #ff4444;
  border-radius: 10px 10px 0 0;
}

.footer-logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #ff4444;
  letter-spacing: 1px;
}

.footer-copyright {
  color: #a0a0a0;
  font-size: 14px;
  font-weight: 400;
}

/* Ensure perfect card content alignment */
.card > * {
  width: 100%;
  box-sizing: border-box;
}

/* Perfect grid alignment for all grid elements */
.user-list,
.reasons {
  width: 100%;
  box-sizing: border-box;
}

/* Ensure buttons don't overflow */
.button {
  max-width: 100%;
  box-sizing: border-box;
}

/* Perfect alignment for note row */
#noteRow {
  margin-top: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Perfect alignment for in list entries */
#inList .entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  box-sizing: border-box;
}

/* Ensure footer is perfectly aligned */
.footer {
  background: rgba(16, 16, 16, 0.95);
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  padding: 24px 32px;
  margin-top: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  width: 100%;
  box-sizing: border-box;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive breakpoints - maintaining symmetry */
@media (max-width: 1200px) {
  .container {
    padding: 24px;
    max-width: 100%;
  }
  
  .threecol {
    gap: 24px;
  }
  
  .card {
    padding: 24px;
  }
}

@media (max-width: 1000px) {
  .container {
    padding: 20px;
  }
  
  .threecol {
    gap: 16px;
  }
  
  .card {
    padding: 20px;
  }
}

@media (max-width: 1100px) {
  .threecol {
    gap: 20px;
  }
  
  .card {
    padding: 20px;
    min-height: auto;
  }
}

@media (max-width: 900px) {
  .threecol {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
  }
  
  .card {
    padding: 18px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 16px;
  }
  
  .topbar {
    padding: 16px 20px;
  }
  
  .card {
    padding: 16px;
  }
  
  .section-header h3 {
    font-size: 18px;
  }
  
  .footer {
    margin-top: 32px;
    padding: 20px;
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .actions {
    justify-content: center;
  }
  
  .who-row {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 12px;
  }
  
  .topbar {
    padding: 12px 16px;
  }
  
  .card {
    padding: 14px;
  }
  
  .section-header h3 {
    font-size: 16px;
  }
  
  .footer {
    padding: 16px;
  }
}

/* Ensure 3 columns are always visible on tablets and larger screens */
@media (max-width: 600px) {
  .threecol {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
  }
  
  .card {
    padding: 16px;
  }
  
  .section-header h3 {
    font-size: 16px;
  }
}

/* Samsung Galaxy A7 Lite and similar tablets - ensure 3 columns with optimal spacing */
@media (max-width: 800px) and (min-width: 600px) {
  .threecol {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
  }
  
  .card {
    padding: 20px;
  }
  
  .section-header h3 {
    font-size: 18px;
  }
  
  .input {
    padding: 12px 16px;
    font-size: 13px;
  }
  
  .button {
    padding: 10px 16px;
    font-size: 13px;
  }
}

/* Landscape orientation optimization for tablets */
@media (max-width: 1024px) and (orientation: landscape) {
  .threecol {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
  }
  
  .card {
    padding: 22px;
  }
  
  .container {
    padding: 24px 20px;
  }
}

/* Portrait orientation optimization for tablets */
@media (max-width: 1024px) and (orientation: portrait) {
  .threecol {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 18px;
  }
  
  .card {
    padding: 20px;
  }
  
  .container {
    padding: 20px 16px;
  }
}

/* Admin page specific styles - FIXED for proper symmetry */
.admin-container {
  max-width: 1000px !important;
  width: 100% !important;
  overflow-x: hidden;
  padding: 24px 32px;
  margin: 0 auto;
  box-sizing: border-box;
}

.admin-container .compact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  width: 100%;
  align-items: start;
}

/* Single column grid for sections that don't need two columns */
.admin-container .compact-grid.single-column {
  grid-template-columns: 1fr;
  margin-bottom: 24px;
}

.admin-container .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 0 auto 32px auto;
  width: 100%;
  max-width: 600px;
}

.admin-container .stat-card {
  padding: 24px;
  background: rgba(24, 24, 24, 0.95);
  border: none;
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 120px;
  min-height: 120px;
}

.admin-container .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #ff5c00;
  margin-bottom: 8px;
  line-height: 1.2;
}

.admin-container .stat-label {
  font-size: 14px;
  color: #b0b0b0;
  font-weight: 500;
  line-height: 1.3;
}

/* Ensure all admin cards have consistent heights */
.admin-container .card {
  height: fit-content;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 24px;
}

.admin-container .button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 20px;
}

.admin-container .button-group .button {
  flex: 0 0 auto;
  min-width: 140px;
  height: 44px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.admin-container .input-group {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
}

.admin-container .input-group .input {
  width: 100%;
  margin: 0;
  box-sizing: border-box;
}

/* Make the Add User card match the Export & Settings card height */
.admin-container .compact-grid .card:first-child {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.admin-container .compact-grid .card:last-child {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Ensure consistent spacing between elements */
.admin-container .card > * {
  margin-bottom: 16px;
}

.admin-container .card > *:last-child {
  margin-bottom: 0;
}

/* SMTP Configuration specific styles */
.smtp-section {
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  padding-left: 12px;
}

.weekly-report-section {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 12px;
  margin-top: 12px;
}

.weekly-report-section h4 {
  margin: 0 0 8px 0;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
}

.weekly-report-section .form-row {
  display: flex;
  align-items: center;
}

.weekly-report-section label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  font-size: 13px;
  color: #ffffff;
}

.weekly-report-section input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* Manual Entry Form specific styles */
.manual-entry-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.manual-entry-section .section-header {
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.manual-entry-section .section-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #ff5c00;
}

.manual-entry-section .form-group {
  width: 100%;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.manual-entry-section .form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.4;
}

.manual-entry-section .form-group select,
.manual-entry-section .form-group input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 16px;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(16, 16, 16, 0.8);
  color: #ffffff;
  font-size: 14px;
  transition: all 0.2s ease;
}

.manual-entry-section .form-group select:focus,
.manual-entry-section .form-group input:focus {
  outline: none;
  border-color: #ff5c00;
  box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.3);
  background: rgba(24, 24, 24, 1);
}

.manual-entry-section .time-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
  margin-bottom: 20px;
}

.manual-entry-section .time-inputs .form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.manual-entry-section .time-inputs .form-group label {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.4;
}

.manual-entry-section .time-inputs .form-group input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.manual-entry-section #addManualEntry {
  width: 100%;
  height: 48px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  background: #ff5c00;
  color: #000000;
  border: 2px solid #ff5c00;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
  gap: normal;
}

.manual-entry-section #addManualEntry:hover {
  background: #e0851a;
  border-color: #e0851a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 92, 0, 0.3);
}

.manual-entry-section #addManualEntry:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(247, 148, 30, 0.3);
}

/* Popup Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal {
  background: rgba(24, 24, 24, 0.95);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 32px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  min-width: 500px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  font-size: 22px;
  font-weight: 600;
  color: #ff5c00;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ff5c00;
}

.modal-content {
  margin-bottom: 32px;
}

.modal-footer {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

/* Compact user list for popup */
.modal .user-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px 0;
}

.modal .user {
  padding: 20px;
  background: rgba(32, 32, 32, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal .user:hover {
  background: rgba(40, 40, 40, 0.9);
  border-color: rgba(255, 92, 0, 0.5);
  transform: translateY(-2px);
}

.modal .user.selected {
  background: rgba(255, 92, 0, 0.2);
  border-color: #ff5c00;
}

.modal .user .name {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.2;
}

.modal .user .sub {
  font-size: 14px;
  color: #b0b0b0;
  line-height: 1.3;
}



/* User actions in modal */
.user-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.user-actions .button {
  padding: 6px 12px;
  font-size: 12px;
  height: 32px;
  min-width: auto;
}

.user-actions .button.success {
  background: rgba(76, 175, 80, 0.9);
  color: #ffffff;
  border: none;
}

.user-actions .button.success:hover {
  background: rgba(76, 175, 80, 1);
}

.user-actions .button.danger {
  background: rgba(244, 67, 54, 0.9);
  color: #ffffff;
  border: none;
}

.user-actions .button.danger:hover {
  background: rgba(244, 67, 54, 1);
}

/* Status styling in modal */
.modal .user .status {
  font-size: 12px;
  color: #b0b0b0;
  margin-top: 8px;
  font-style: italic;
}

/* Search container styling */
.search-container {
  margin-bottom: 24px;
}

.search-container .input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(16, 16, 16, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-container .input:focus {
  outline: none;
  border-color: #ff5c00;
  background: rgba(24, 24, 24, 1);
  box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.2);
}

/* Leave management styling - matches other admin cards */
.leave-management-section {
  margin-top: 20px;
}

.leave-management-section .section-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: none;
  width: 100%;
  box-sizing: border-box;
}

.leave-management-section .section-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #ff5c00;
  letter-spacing: -0.01em;
  text-align: left;
}

.leave-management-section .info-text {
  font-size: 13px;
  color: #a0a0a0;
  line-height: 1.4;
  font-weight: 400;
  margin-bottom: 20px;
  padding: 0 4px;
}

.leave-management-section .form-group {
  margin-bottom: 18px;
}

.leave-management-section .form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.leave-management-section .form-group .input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 10px;
  border: none;
  background: rgba(16, 16, 16, 0.8);
  color: #ffffff;
  margin: 0;
  font-size: 14px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  text-align: left;
}

.leave-management-section .form-group .input:focus {
  outline: none;
  border: none;
  box-shadow: 0 0 0 3px rgba(247, 148, 30, 0.3);
  background: rgba(24, 24, 24, 1);
}

.leave-management-section .time-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  background: rgba(32, 32, 32, 0.3);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.leave-management-section .time-inputs .form-group {
  margin-bottom: 0;
}

.leave-management-section .time-inputs label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.leave-management-section .button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  margin-top: 4px;
  margin-bottom: 0;
}

.leave-management-section .button-group .button {
  flex: 0 0 auto;
  min-width: 140px;
  height: 44px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}





.leave-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 8px 0;
}

.leave-item {
  padding: 20px;
  background: rgba(32, 32, 32, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.leave-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #40c8e0, #40c8e0);
  opacity: 0.8;
}

.leave-item:hover {
  background: rgba(40, 40, 40, 0.95);
  border-color: rgba(64, 200, 224, 0.6);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(64, 200, 224, 0.15);
}

.leave-item .leave-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.leave-item .leave-user {
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

.leave-item .leave-type {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(64, 200, 224, 0.15);
  color: #40c8e0;
  text-transform: capitalize;
  font-weight: 500;
  letter-spacing: 0.5px;
  border: 1px solid rgba(64, 200, 224, 0.3);
}

.leave-item .leave-dates {
  font-size: 14px;
  color: #a0a0a0;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.leave-item .leave-dates::before {
  content: '📅';
  font-size: 12px;
}

.leave-item .leave-note {
  font-size: 13px;
  color: #b0b0b0;
  font-style: italic;
  line-height: 1.4;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  border-left: 3px solid rgba(64, 200, 224, 0.3);
}

.leave-item .leave-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.leave-item .leave-actions button {
  padding: 8px 14px;
  font-size: 12px;
  height: 36px;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.leave-item .leave-actions button:hover {
  transform: translateY(-1px);
}

/* Modal form styling */
.modal .form-group {
  margin-bottom: 24px;
}

.modal .form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.modal .form-group .input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(16, 16, 16, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 14px;
  transition: all 0.2s ease;
}

.modal .form-group .input:focus {
  outline: none;
  border-color: #ff5c00;
  background: rgba(24, 24, 24, 1);
  box-shadow: 0 0 0 3px rgba(255, 92, 0, 0.2);
}

/* Table styling for admin */
.admin-container .table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-container .table th,
.admin-container .table td {
  padding: 10px 12px;
  border-bottom: none;
  text-align: left;
}

.admin-container .table th {
  background: rgba(255, 92, 0, 0.1);
  font-weight: 600;
  color: #ff5c00;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-container .table tr:hover {
  background: rgba(255, 92, 0, 0.05);
}

.admin-container .table tr:last-child td {
  border-bottom: none;
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* Responsive admin layout */
@media (max-width: 1200px) {
  .admin-container .compact-grid {
    gap: 16px;
  }
  
  .admin-container .stats-grid {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .admin-container .compact-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .admin-container .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .admin-container .input-group {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .admin-container .button-group {
    justify-content: center;
  }
  
  .admin-container .button-group .button {
    min-width: 120px;
  }
}

/* Tab Navigation Styles */
.tab-navigation {
  display: flex;
  gap: 8px;
  margin: 32px 0 24px 0;
  border-bottom: none;
  padding-bottom: 16px;
  justify-content: center;
}

.tab-button {
  background: rgba(24, 24, 24, 0.9);
  border: none;
  color: #a0a0a0;
  padding: 12px 24px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.tab-button:hover {
  background: rgba(32, 32, 32, 0.9);
  color: #ffffff;
  border: none;
}

.tab-button.active {
  background: rgba(255, 92, 0, 0.1);
  color: #ff5c00;
  border: none;
}

.tab-content {
  margin-top: 24px;
}

/* Add spacing between chart cards */
.tab-pane .card + .card {
  margin-top: 24px;
}

/* Add spacing between different sections in export settings */
#export-settings .card + .card {
  margin-top: 24px;
}

#export-settings .compact-grid + .compact-grid {
  margin-top: 32px;
}

#export-settings .compact-grid + section {
  margin-top: 32px;
}

/* Manual entry section styling */
.manual-entry-section {
  margin-top: 24px;
}

.manual-entry-section .time-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.manual-entry-section .time-inputs label {
  color: #a0a0a0;
  font-size: 13px;
  margin-bottom: 8px;
  display: block;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Chart Container Styles */
.chart-container {
  position: relative;
  height: 300px;
  margin: 16px 0;
  background: rgba(16, 16, 16, 0.5);
  border-radius: 12px;
  padding: 16px;
  border: none;
}

/* Table Container Styles */
.table-container {
  margin: 16px 0;
  background: rgba(16, 16, 16, 0.3);
  border-radius: 12px;
  padding: 16px;
  border: none;
  overflow-x: auto;
}

.chart-container canvas {
  max-height: 100%;
  width: 100% !important;
}

/* Responsive adjustments for tabs */
@media (max-width: 768px) {
  .admin-container {
    padding: 16px 20px;
    max-width: 100%;
  }
  
  .tab-navigation {
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
  }
  
  .tab-button {
    padding: 10px 16px;
    font-size: 13px;
    flex: 1;
    min-width: 120px;
  }
  
  .chart-container {
    height: 250px;
    padding: 16px;
  }
  
  .admin-container .compact-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .admin-container .input-group {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
