/* === Base === */
body {
  background: black;
  color: #aaa;
  font-family: sans-serif;
  max-width: 600px;
  margin: auto;
  padding: 20px;
}

a {
  color: #1a73e8;
  text-decoration: underline;
  word-break: break-word;
}
input, textarea, button {
  width: 100%;
  padding: 10px;
  margin: 8px 0;
  font-size: 1em;
  border-radius: 4px;
  border: none;
  box-sizing: border-box;
}
textarea {
  resize: vertical;
  min-height: 80px;
}

/* === Notes Card === */
.note {
  border: 1px solid #444;
  padding: 10px 10px 5px 10px;
  margin-top: 8px;
  background: #111;
  border-radius: 6px;
  position: relative;
}
.timestamp {
  font-size: 0.85em;
  color: #666;
}
.title {
  font-weight: bold;
  font-size: 1.1em;
  margin-bottom: 5px;
  color: #ccc;
}
.content {
  margin-top: 5px;
}
.delete-btn {
  position: static;
  top: 50%;
  right: -50px;
  transform: translateY(-10%);
  background: #e53935;
  color: white;
  padding: 4px 10px;
  font-size: 0.9em;
  border-radius: 3px;
  cursor: pointer;
}
.note .content {
  max-height: 3.2em; /* ~2 lines */
  overflow: hidden;
  cursor: pointer;
  word-break: break-word;
  white-space: normal;
  transition: max-height 0.3s ease;
}
.note .actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}
.note.expanded .content {
  max-height: none;
  overflow: visible;
}

/* === Login Page Layout === */
.page-login {
  /* override rule body lama */
  max-width: none;
  /* center layar penuh */
  min-height: 100svh;         /* aman buat mobile chrome */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;            /* biar ada napas di kiri-kanan */
}
.page-login .card {
  width: min(420px, 92vw);
  margin: 0 auto;
  background: #111;
  padding: 20px;
  border-radius: 6px;
  text-align: center;
}
.page-login .card h1 {
  margin-top: 0;
  color: #fff;
}

/* PIN tetap center */
.card input[type="password"],
.page-login .card input[type="password"]{
  text-align:center !important;
  letter-spacing: 6px;
}

/* pesan error login */
#loginSection p,
.login-error {
  color: #f88;
  font-weight: bold;
  margin-top: 10px;
}

/* Responsive tweak */
@media (max-width: 400px) {
  body { padding: 10px; }
}

.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

.page-header h1 {
  margin: 0;
}

.page-header .logout-link {
  color: #1a73e8;
  text-decoration: underline;
  font-weight: bold;
}

main {
  padding-top: 40px; /* sesuaikan sama tinggi header */
}
