/* ========================================
   GLOBAL
======================================== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #111;
  color: white;
  text-align: center;
}

.hidden {
  display: none;
}

/* ========================================
   SPLASH SCREEN
======================================== */
#splash {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, #b30000, #000);
  overflow: hidden;
}

.logo {
  width: 240px;
  height: auto;
  opacity: 0;
  transform: scale(0.8);
  animation: logoFadeZoom 2.5s ease forwards;
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.3));
}

.loader {
  margin-top: 30px;
  width: 120px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: #ffffff;
  animation: loadingBar 2.8s ease forwards;
}

.loading-text {
  margin-top: 20px;
  font-size: 14px;
  opacity: 0.8;
  letter-spacing: 1px;
  animation: fadeText 2s ease-in-out infinite;
}

.loader-dots {
  display: flex;
  gap: 6px;
  margin-top: 20px;
}

.loader-dots span {
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
  opacity: 0.3;
  animation: dots 1.5s infinite;
}

.loader-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loader-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

.version {
  position: absolute;
  bottom: 14px;
  font-size: 11px;
  opacity: 0.5;
  letter-spacing: 1px;
}

@keyframes logoFadeZoom {
  0% { opacity: 0; transform: scale(0.7); }
  100% { opacity: 1; transform: scale(1); }
}

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

@keyframes fadeText {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

@keyframes dots {
  0% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
  100% { opacity: 0.3; transform: translateY(0); }
}

@keyframes logoSoftIn {
  from { opacity: 0; transform: scale(0.88); }
  to { opacity: 0.96; transform: scale(1); }
}

/* ========================================
   LOGIN SCREEN
======================================== */
#login {
  position: relative;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(70, 0, 0, 0.25), rgba(0, 0, 0, 0.55)),
    url("media/login-bg.jpg") center center / cover no-repeat;
}

.login-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.12));
  pointer-events: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 350px;
  margin-top: -70px;
  padding: 24px 20px 22px;
  border-radius: 28px;
  background: rgba(10, 6, 6, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}

.login-logo {
  width: 78px;
  height: auto;
  margin: 0 auto 18px;
  display: block;
  opacity: 0.96;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35));
  animation: logoSoftIn 0.9s ease forwards;
}

.login-card h2 {
  margin: 0 0 14px;
  font-size: 30px;
  line-height: 1.06;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.login-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,0.84);
  text-shadow: 0 2px 10px rgba(0,0,0,0.16);
}

#login input {
  width: 100%;
  box-sizing: border-box;
  padding: 17px 18px;
  margin: 0 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.16);
  color: #ffffff;
  font-size: 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

#login input::placeholder {
  color: rgba(255,255,255,0.58);
}

#login input:focus {
  background: rgba(255,255,255,0.20);
  border-color: rgba(255,255,255,0.20);
  box-shadow:
    0 0 0 3px rgba(179,0,0,0.14),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

#login button {
  width: 100%;
  padding: 17px 18px;
  border-radius: 20px;
  border: none;
  background: linear-gradient(180deg, #ff2020 0%, #d80000 58%, #a40000 100%);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.22);
  box-shadow:
    0 10px 20px rgba(179,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.16);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}

#login button:hover {
  filter: brightness(1.02);
}

#login button:active {
  transform: scale(0.985);
}

/* ========================================
   APP / DASHBOARD CLEAN
======================================== */
#app {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #111111 0%, #161616 52%, #101010 100%);
  text-align: left;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 24px 18px 58px;
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 26px;
}

.topbar-left h1 {
  margin: 4px 0 8px;
  font-size: 30px;
  line-height: 1.04;
  color: #ffffff;
}

.topbar-left p {
  margin: 0;
  font-size: 14px;
  color: rgba(255,255,255,0.70);
}

.app-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(220,220,220,0.72);
}

.logout-btn {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.dashboard-section {
  margin-bottom: 28px;
}

.section-heading {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.58);
}

.main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.main-card {
  min-height: 136px;
  padding: 18px 16px;
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 20px rgba(0,0,0,0.10);
}

.main-card-icon {
  font-size: 24px;
  margin-bottom: 14px;
}

.main-card-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.main-card-text {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255,255,255,0.68);
}

.sub-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sub-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.sub-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sub-card-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.sub-card-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.sub-card-text {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255,255,255,0.66);
}

.sub-card-arrow {
  font-size: 24px;
  line-height: 1;
  color: rgba(255,255,255,0.40);
}

.app-version {
  position: fixed;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 11px;
  opacity: 0.5;
  letter-spacing: 1px;
}

/* ========================================
   MOBILE
======================================== */
@media (max-width: 480px) {
  #login {
    padding: 20px;
  }

  .login-card {
    max-width: 100%;
    margin-top: -60px;
    padding: 22px 18px 20px;
    border-radius: 26px;
    background: rgba(10, 6, 6, 0.08);
  }

  .login-card h2 {
    font-size: 28px;
  }

  .login-subtitle {
    font-size: 14px;
  }

  .logo {
    width: 200px;
  }

  .login-logo {
    width: 74px;
    margin-bottom: 16px;
  }

  .app-shell {
    padding: 22px 14px 56px;
  }

  .topbar-left h1 {
    font-size: 28px;
  }

  .main-card {
    min-height: 128px;
    padding: 16px 14px;
  }

  .sub-card {
    padding: 14px;
  }
}
