/* --- Enhanced Admin Dashboard Styles --- */
body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #23234a 60%, #181828 100%);
  font-family: 'Poppins', Arial, sans-serif;
  color: #f0f0f0;
  transition: background 0.3s;
}
.admin-dashboard {
  display: flex;
  min-height: 100vh;
  background: none;
  position: relative;
}
.sidebar {
  width: 260px;
  background: linear-gradient(135deg, #19193a 80%, #23234a 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 1rem 1rem;
  min-height: 100vh;
  box-shadow: 2px 0 16px 0 rgba(0,0,0,0.12);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 10;
  border-right: 2px solid #23234a;
}
.sidebar .logo img {
  width: 120px;
  height: auto;
  margin-bottom: 1.2rem;
  border-radius: 12px;
  box-shadow: 0 2px 12px #9147ff44;
}
.sidebar-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2.2rem;
  letter-spacing: 0.04em;
  color: #ffda79;
  text-shadow: 0 2px 8px #23234a44;
}
#sidebar-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  align-items: center;
}
.sidebar nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}
.sidebar nav button {
  width: 100%;
  padding: 0.7rem 0;
  border-radius: 10px;
  border: none;
  background: #23234a;
  color: #bdbdbd;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.7;
}
.tab-btn {
  width: 100%;
  padding: 0.9rem 0;
  border-radius: 10px;
  border: none;
  background: #23234a;
  color: #bdbdbd;
  font-size: 1.15rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0.85;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.1s;
  outline: none;
}
.tab-btn.active, .tab-btn:hover, .tab-btn:focus {
  background: #9147ff;
  color: #ffda79;
  box-shadow: 0 2px 8px #9147ff33;
  opacity: 1;
  transform: scale(1.04);
}
.main-content {
  margin-left: 260px;
  flex: 1;
  padding: 3rem 2rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: linear-gradient(135deg, #23234a 60%, #181828 100%);
  min-height: 100vh;
  box-sizing: border-box;
}
.admin-header {
  margin-bottom: 2.5rem;
  text-align: center;
}
.admin-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #ffda79;
  margin-bottom: 0.5rem;
}
.admin-header p {
  color: #fff;
  font-size: 1.1rem;
  margin: 0;
}
.dashboard-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: #ffda79;
  margin-bottom: 0.5rem;
  letter-spacing: 0.03em;
}
.dashboard-desc {
  color: #fff;
  font-size: 1.18rem;
  margin: 0 auto 1.2rem auto;
  max-width: 600px;
}
.tab-title {
  text-align: center;
  color: #ffda79;
  font-size: 2rem;
  margin: 2rem 0 1.5rem 0;
  font-weight: 700;
}
.admin-cards-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-content: center;
  align-items: flex-start;
  margin: 2.5rem 0 2rem 0;
}
.admin-form-card {
  flex: 1 1 340px;
  max-width: 420px;
  min-width: 300px;
  background: rgba(36, 37, 62, 0.92);
  border-radius: 18px;
  box-shadow: 0 2px 16px #0002;
  padding: 2.5rem 2rem 2rem 2rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border: 1.5px solid #9147ff33;
  transition: box-shadow 0.2s, border 0.2s;
  box-sizing: border-box;
}
.admin-form-card:hover {
  box-shadow: 0 4px 24px #9147ff33;
  border: 1.5px solid #9147ff;
}
.admin-form-card h2 {
  color: #ffda79;
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  font-weight: 700;
}
.admin-form input, .admin-form select, .admin-form textarea {
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1.5px solid #23234a;
  background: #23234a;
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.7rem;
  font-family: inherit;
  transition: border 0.2s;
}
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus {
  border: 1.5px solid #9147ff;
  outline: none;
}
.admin-form button[type="submit"], .admin-form button[type="button"], .btn-discord-login, .btn-logout {
  background: #9147ff;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.2s, color 0.2s, transform 0.1s;
  box-shadow: 0 1px 4px #0002;
}
.admin-form button[type="submit"]:hover, .admin-form button[type="button"]:hover, .btn-discord-login:hover, .btn-logout:hover {
  background: #ffda79;
  color: #23234a;
  transform: scale(1.04);
}
.applications-list {
  max-width: 950px;
  margin: 0 auto 2rem auto;
}
.admin-form-card, .application-card, .applications-list {
  box-sizing: border-box;
}
/* --- Application Card Visual Styles (Reinforced) --- */
.application-card {
  background: linear-gradient(135deg, #23234a 70%, #181828 100%);
  border: 2.5px solid #9147ff;
  border-radius: 18px;
  box-shadow: 0 4px 24px #0003;
  margin: 2.5rem auto;
  max-width: 700px;
  padding: 0;
  overflow: hidden;
  color: #fff;
  font-family: 'Poppins', Arial, sans-serif;
  transition: box-shadow 0.2s, border 0.2s;
}
.application-card:hover {
  box-shadow: 0 8px 32px #9147ff44;
  border: 2.5px solid #ffda79;
}
.app-card-header {
  background: #9147ff;
  color: #fff;
  padding: 1.1rem 2rem 0.7rem 2rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 600;
}
.app-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.app-card-tag {
  background: #ffda79;
  color: #23234a;
  border-radius: 8px;
  padding: 0.1rem 0.7rem;
  font-size: 1rem;
  margin-left: 0.7rem;
}
.app-card-date {
  font-size: 1rem;
  color: #ffda79;
  font-weight: 500;
}
.app-card-fields {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.5rem 1.2rem;
  padding: 2rem 2rem 1.2rem 2rem;
  background: transparent;
}
.app-card-fields div {
  padding: 0.3rem 0;
  font-size: 1.05rem;
  border-bottom: 1px solid #2c2c4a;
}
.app-card-fields div:last-child {
  border-bottom: none;
}
.app-card-fields span:first-child {
  color: #ffda79;
  font-weight: 600;
}
.app-card-fields span:last-child {
  color: #e0e0e0;
  font-weight: 400;
  word-break: break-word;
}
.app-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1.2rem;
  padding: 1.2rem 2rem 1.7rem 2rem;
  background: transparent;
}
.approve-btn, .reject-btn {
  font-size: 1.08rem;
  font-weight: bold;
  padding: 0.7rem 2.2rem;
  border: none;
  border-radius: 8px;
  box-shadow: 0 1px 4px #0002;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.1s;
}
.approve-btn {
  background: #2ecc40;
  color: #fff;
}
.approve-btn:hover {
  background: #27ae60;
  color: #fff;
  transform: scale(1.04);
}
.reject-btn {
  background: #ff4b5c;
  color: #fff;
}
.reject-btn:hover {
  background: #c0392b;
  color: #fff;
  transform: scale(1.04);
}
.app-card-fields a {
  color: #4fc3f7;
  text-decoration: underline;
  font-weight: 500;
}
/* --- Robust Overlap Fix --- */
@media (min-width: 901px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 10;
  }
  .main-content {
    margin-left: 260px !important;
    width: auto;
    min-width: 0;
    box-sizing: border-box;
  }
  .admin-header {
    margin-left: 0 !important;
    width: 100%;
    box-sizing: border-box;
    position: static;
  }
}
@media (max-width: 900px) {
  .sidebar {
    position: static !important;
    width: 100vw !important;
    min-height: unset;
    flex-direction: row;
    align-items: flex-start;
    padding: 1rem 0.5rem;
    box-shadow: none;
    border-right: none;
    z-index: 1;
  }
  .main-content, .admin-header {
    margin-left: 0 !important;
    width: 100vw !important;
    padding: 1rem 0.5rem;
    min-width: 0;
    box-sizing: border-box;
  }
}
