/* === GLOBAL BODY STYLE === */
body.login-page {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    background: radial-gradient(ellipse at center, #011c2b 0%, #010a13 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    overflow: hidden;
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
}

/* === DATE INPUT FIX FOR DARK MODE === */
input[type="date"] {
  background-color: #031a2d;
  color: white;
  border: 1px solid #00f0ff;
  border-radius: 6px;
  padding: 8px 10px;
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

input[type="date"]:hover::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.5);
}

/* === ENERGY GLOW EFFECT === */
body::before {
    content: '';
    position: absolute;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.08), transparent 70%);
    top: -250px;
    left: -250px;
    z-index: 0;
    animation: glow 6s ease-in-out infinite;
    pointer-events: none;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

@keyframes glow {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.2; }
}

/* === CONTAINER & BOX === */
.login-container {
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    background: rgba(0, 14, 24, 0.95);
    border: 2px solid #00f0ff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 0 25px rgba(0, 255, 255, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

/* === LOGO === */
.logo {
    width: 180px;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 12px #00ffff);
}

/* === BACK LINK STYLE === */
.back-link {
    margin-top: 20px;
}

.back-link a {
    color: #00f0ff;
    font-size: 14px;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.back-link a:hover {
    text-decoration: underline;
    color: #ffffff;
}

.dashboard-button {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: linear-gradient(to right, #00d0ff, #0077ff);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px #00d0ff;
}

.dashboard-button:hover {
    background: linear-gradient(to right, #00ffff, #0099ff);
    transform: scale(1.03);
}

/* === DASHBOARD STYLES === */
.dashboard-page {
  display: flex;
  margin: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: linear-gradient(to right, #010a13, #021c2b);
  color: white;
  height: 100vh;
}

.sidebar {
  width: 160px;
  background-color: #031a2d;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-right: 1px solid #00f0ff;
  z-index: 1000;
  position: relative;
}

.logo-container {
  margin-bottom: 20px;
}

.logo-small {
  width: 120px;
  filter: drop-shadow(0 0 10px #00f0ff);
  margin-bottom: 40px;
}

.nav-links {
  list-style: none;
  padding: 0;
  width: 100%;
}

.nav-links li {
  margin: 10px 0;
  text-align: center;
}

.nav-links a {
  color: #00f0ff;
  text-decoration: none;
  font-weight: bold;
  display: block;
  padding: 8px 0;
  border-radius: 6px;
  transition: background 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  background: #00f0ff;
  color: #000;
}

.main-content {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  padding: 20px;
  height: calc(100vh - 40px); /* account for padding or headers */
  overflow-y: auto;
}

.hero-header {
  background: rgba(0, 255, 255, 0.05);
  border-left: 5px solid #00f0ff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
  margin-bottom: 30px;
}

.hero-header h1 {
  margin: 0 0 10px;
  font-size: 50px;
  color: #00f0ff;
}

.dashboard-widgets {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.dashboard-container {
  height: 100vh; /* Or: min-height: 100vh */
  display: flex;
  flex-direction: row;
}

.widget {
  flex: 1 1 250px;
  background: rgba(0, 20, 40, 0.8);
  border: 1px solid #00f0ff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

.widget h3 {
  margin-top: 0;
  color: #00f0ff;
  margin-bottom: 10px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .dashboard-page {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    border-right: none;
    border-bottom: 1px solid #00f0ff;
  }

  .nav-links {
    display: flex;
    justify-content: center;
    gap: 15px;
  }

  .main-content {
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    padding: 20px;
    overflow-y: auto;     /* Allows vertical scroll if needed */
    display: block;       /* Default layout instead of flex */
  }

  .dashboard-widgets {
    flex-direction: column;
  }
}

.profile-form {
  margin-top: 20px;
  max-width: 400px;
}

.profile-form label {
  display: block;
  margin: 12px 0 6px;
  font-weight: bold;
  color: #00f0ff;
}

.profile-form input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  background-color: #051b27;
  border: 1px solid #00f0ff;
  border-radius: 6px;
  color: white;
  font-size: 14px;
}

.profile-form button {
  margin-top: 10px;
  width: 100%;
  background: linear-gradient(to right, #00d0ff, #0077ff);
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.profile-form button:hover {
  background: linear-gradient(to right, #00ffff, #0099ff);
  transform: scale(1.02);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: rgba(0, 20, 40, 0.9);
  color: white;
}

.admin-table th,
.admin-table td {
  border: 1px solid #00f0ff;
  padding: 10px;
  text-align: left;
}

.admin-table th {
  background-color: #031a2d;
  color: #00f0ff;
}

.export-section {
  margin-top: 30px;
}

.export-section label {
  margin-right: 10px;
  color: #00f0ff;
  font-weight: bold;
}

.export-section select {
  background-color: #031a2d;
  color: white;
  border: 1px solid #00f0ff;
  border-radius: 6px;
  padding: 6px 12px;
  margin-right: 10px;
}

.dashboard-button.small {
  padding: 6px 10px;
  font-size: 13px;
  margin-top: 4px;
}

.table-controls {
  margin-bottom: 10px;
}

#searchInput {
  width: 250px;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #00f0ff;
  background-color: #031a2d;
  color: white;
  font-size: 14px;
}

.pagination {
  margin-top: 20px;
  text-align: center;
}

.pagination a {
  color: #00f0ff;
  margin: 0 10px;
  text-decoration: none;
  font-weight: bold;
}

.pagination span {
  color: white;
  font-size: 14px;
}

.table-controls {
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.table-controls input {
  padding: 6px 10px;
  border-radius: 6px;
  background-color: #031a2d;
  border: 1px solid #00f0ff;
  color: white;
}

.dashboard-button.small {
  padding: 6px 12px;
  font-size: 13px;
}

select {
  background-color: #031a2d;
  color: white;
  border: 1px solid #00f0ff;
  border-radius: 6px;
  padding: 6px 10px;
  margin-left: 5px;
}

textarea {
  background-color: #010f1a;
  color: white;
  border: 1px solid #00f0ff;
  border-radius: 8px;
  padding: 10px;
  font-size: 16px;
}

.preview-box {
  width: 100%;
  background: rgba(0, 20, 40, 0.95);
  border: 1px solid #00f0ff;
  border-radius: 10px;
  padding: 15px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#previewArea {
  width: 100%;
  overflow: visible;
}

.preview-content {
  width: 100%;
  height: auto;
  min-height: 600px;
  border: none;
  display: block;
}

/* === ACCESSIBILITY & FEEDBACK === */
input:focus,
button:focus,
select:focus,
a:focus {
  outline: 2px solid #00f0ff;
  outline-offset: 2px;
}

.error-message {
  color: #ff4f4f;
  background: rgba(255, 0, 0, 0.1);
  border-left: 4px solid #ff4f4f;
  padding: 10px;
  margin-top: 10px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* === FIT EXPANDED CONTENT IN SIDEBAR === */
.sidebar .collapsible-content {
  width: 100%;
  overflow-x: hidden;
}

.sidebar input[type="file"],
.sidebar input[type="text"],
.sidebar input[type="search"],
.sidebar button,
.sidebar .dashboard-button,
.sidebar select,
.sidebar textarea {
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
  padding: 8px 10px;
  margin-bottom: 8px;
}

.sidebar .dashboard-button {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Style file input text and button */
input[type="file"] {
  color: white;               /* File name text */
  background-color: #031a2d;  /* Optional: match your theme */
  border: 1px solid #00f0ff;
  padding: 6px;
  border-radius: 6px;
}

/* For better results in WebKit (Chrome, Safari): */
input[type="file"]::file-selector-button {
  color: white;
  background-color: #00f0ff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}

/* Results section font color */
.result-block,
.result-block p,
.result-block td,
.result-block th {
  color: white;
}

input[type="file"]::-ms-value {
  color: white;
}

