@import url("https://fonts.googleapis.com/css?family=Poppins");

html {
  min-height: 100%;
  background-image: url("../images/background/rocket.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

body {
  font-family: Arial, sans-serif;
  max-width: 900px;
  margin: 100px auto auto;
  padding: 0 20px;
  color: white;
  background: transparent;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;

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

  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(10px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);

  z-index: 99;
}

.logo {
  font-size: 2em;
  color: #fff;
  -webkit-user-select: none;
  user-select: none;
  align-items: center;
  position: relative;
  /*left: 7%;*/
}

.clock {
  margin-left: 1%;
  display: flex;
  flex-direction: column;
  align-items: left;
  font-family: "Poppins", sans-serif;
  font-size: 1em;
  line-height: 1.2;
  color: white;
  margin-left: calc(20px + 1%);
}

.navigation {
  display: flex;
  gap: 30px;
  margin-right: 1%;
}

.navigation a {
  position: relative;
  font-size: 1.1em;
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.navigation a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 5px;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s ease;
}

.navigation a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (max-width: 768px) {
  body {
    padding-top: 60px;
  }

  .header {
    height: 60px;
  }

  .logo {
    font-size: 1.4em;
  }

  .clock {
    display: flex;
  }

  .navigation a {
    font-size: 0.9em;
    margin-left: 10px;
  }

  .table-wrapper {
    overflow-x: auto;
    width: 100%;
  }

  .table-wrapper table {
    min-width: 600px;
  }
}

/*body*/

.card {
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);

  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 18px;
  border-radius: 10px;
  margin-bottom: 18px;
}

label {
  display: block;
  margin: 12px 0 4px;
  font-weight: bold;
}

input {
  width: 100%;
  padding: 9px 10px;
  border: none;
  border-radius: 6px;
  box-sizing: border-box;
}

button {
  margin-top: 12px;
  padding: 10px 16px;
  background: #1976d2;
  border: none;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

button:hover {
  background: #135aa0;
}

/* TABLE FIX */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;

  background: rgba(255, 255, 255, 0.9);
  color: #222;
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #ddd;
}

th {
  background: #e9eef5;
  font-weight: bold;
}

.actions button {
  margin-right: 6px;
  background: #555;
}

.actions button.delete {
  background: #c62828;
}

.actions button:hover {
  opacity: 0.9;
}

/* First + Last Name row */
.name-row {
  display: flex;
  gap: 12px;
}

.field {
  flex: 1;
}

/* Mobile fallback */
@media (max-width: 768px) {
  .name-row {
    flex-direction: column;
  }
}

.alert-box {
  position: fixed;
  inset: 0;
  top: 35px;
  margin: 0 auto;
  width: 350px;
  height: 70px;
  background: transparent;
  -webkit-backdrop-filter: blur(50px);
  backdrop-filter: blur(50px);
  border-radius: 6px;
  padding: 0 15px;
  z-index: 100;
  overflow: hidden;
  transform: translateY(calc(-100% - 35px));
  transition: 0.4s ease;

  left: 0;
  right: 0;
}

.alert-box.show {
  transform: translateY(0);
}

.alert {
  display: flex;
  align-items: center;
  height: 100%;
  color: white;
  font-weight: 500;
}

.alert::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: #0abf31;
  animation: progress 3s linear forwards;
}

.alert.error::after {
  background: red;
}

@keyframes progress {
  100% {
    width: 0;
  }
}

.alert i {
  font-size: 35px;
  color: #0abf31;
  margin-right: 8px;
}

.alert.error ion-icon {
  color: red;
}

/* EDIT MODE: first + last vertical spacing */
.name-edit {
  display: flex;
  flex-direction: column;
  gap: 10px;   /* controls spacing between first & last */
  max-width: 260px; /* optional – keeps them from stretching too wide */
}