html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  color: #111;
  text-align: center;

  .app-container {
  max-width: 85%;
  margin: 0 auto;
  padding: 40px 20px;
}

  /* AURORA BOREALE BACKGROUND */
  background: linear-gradient(
    135deg,
    #0f2027,
    #203a43,
    #2c5364,
    #1b4332,
    #0b1320
  );
  background-size: 300% 300%;
  animation: aurora 12s ease infinite;
}

/* animazione leggera */
@keyframes aurora {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* TITOLONE */
h1 {
  font-size: 42px;
  color: white;
  margin-bottom: 40px;
  letter-spacing: -1px;
}

/* NAV */
nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
}

nav button {
  padding: 12px 18px;
  border: none;
  background: rgba(0,0,0,0.6);
  color: white;
  cursor: pointer;
  border-radius: 12px;
  font-weight: bold;
  backdrop-filter: blur(6px);
}

nav button:hover {
  opacity: 0.85;
}

/* DASHBOARD CARDS */
.account-card {
  width: 100%;
  max-width: 320px;   /* 🔴 stessa dimensione sempre */
  height: 160px;      /* 🔴 blocca altezza */
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  background: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* LABEL */
.account-card h2 {
  margin-bottom: 10px;
  font-size: 16px;
  opacity: 0.6;
}

/* NUMERO GRANDE */
.balance {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 15px;
  letter-spacing: -1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* BOTTONI GLOBALI */
button {
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: #111;
  color: white;
  cursor: pointer;
  font-weight: bold;
}

button:hover {
  opacity: 0.85;
}

/* TRANSAZIONI (SEK / EUR) */
#sekList div,
#eurList div {
  background: rgba(255, 255, 255, 0.95);
  padding: 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

/* optional container */
#dashboardView {
  margin-top: 10px;
}


/* SEK */

#backBtn {
  padding: 14px 20px;
  font-size: 16px;
  border-radius: 12px;
  background: rgba(0,0,0,0.7);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 20px;
}

#backBtn:hover {
  opacity: 0.85;
}

.balance-card {
  background: white;
  max-width: 400px;
  margin: 20px auto;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.balance-label {
  font-size: 14px;
  opacity: 0.6;
  margin-bottom: 8px;
}

.balance-value {
  font-size: 34px;
  font-weight: 800;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;

  background: rgba(255,255,255,0.92);
  padding: 18px;
  border-radius: 16px;
  max-width: 100%;
  margin: 20px auto;

  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.sort-box {
  padding: 8px 12px;
  background: #111;
  color: white;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
}

.filter-bar input,
.filter-bar select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.form-card {
  background: rgba(255,255,255,0.95);
  max-width: 100%;   /* più largo */
  margin: 30px auto;
  padding: 15px;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.form-card form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.form-card input {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
  min-width: 120px;
  flex: 1;
}

.form-card button {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: #111;
  color: white;
  font-weight: bold;
  cursor: pointer;
  flex: 0;
}

.tx-card {
  background: rgba(255,255,255,0.95);
  padding: 18px 20px;
  margin: 12px auto;
  max-width: 900px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.tx-left {
  text-align: left;
}

.tx-date {
  font-size: 18px;
  opacity: 0.65;
}

.tx-meta {
  font-size: 14px;
  font-weight: 500;
}

.tx-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tx-amount {
  font-size: 18px;
  font-weight: 800;
}

.tx-amount.in {
  color: #1b8f3a;
}

.tx-amount.out {
  color: #c0392b;
}

.tx-delete {
  border: none;
  background: rgba(0,0,0,0.08);
  color: #111;
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tx-delete:hover {
  background: rgba(0,0,0,0.15);
}

.tx-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.tx-details {
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-size: 14px;
  opacity: 0.8;
  display: none;
  text-align: left;
}

.tx-card.open .tx-details {
  display: block;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 30px;
  max-width: 900px;
  margin: 0 auto;
}

.export-buttons {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.filters-dashboard {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  margin-bottom: 20px;
  margin: 25px auto 20px auto;
  width: fit-content;
  
}

.filters-dashboard input,
.filters-dashboard select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
}

#sortDate {
  cursor: pointer;
  font-weight: 600;
  padding: 6px 10px;
  background: #f3f3f3;
  border-radius: 8px;
}

/* LOGIN BOX */

.login-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
  box-sizing: border-box;
}

.login-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  padding: 40px;
  border-radius: 16px;
  width: 380px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  margin: 0;
}

/* TITLE */
.login-card h1 {
  font-size: 20px;
  margin-bottom: 20px;
  text-align: center;
  opacity: 0.9;
}

/* INPUT */
.login-card input {
  width: 100%;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: none;
  outline: none;
  background: rgba(255,255,255,0.1);
  color: white;
}

/* BUTTON */
.login-card button {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: none;
  background: #10b981;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

.login-card button:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}