:root {
  --wine: #7a2357;
  --wine-dark: #54183c;
  --rose: #f7e8ef;
  --rose-2: #fff5f8;
  --text: #241c21;
  --muted: #766b72;
  --border: #eadde4;
  --success: #24704b;
  --warning-bg: #fff4dd;
  --warning: #8c5d00;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(70, 25, 52, .12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #f8f5f7;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background:
    radial-gradient(
      circle at top right,
      rgba(184, 91, 142, .12),
      transparent 34%
    ),
    #f8f5f7;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.no-scroll {
  overflow: hidden;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    18px
    max(24px, env(safe-area-inset-bottom));
}

.login-card {
  width: min(100%, 430px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.brand-mark,
.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-symbol,
.mini-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
  background:
    linear-gradient(
      145deg,
      var(--wine),
      #a84e80
    );
  color: white;
  font-weight: 900;
  box-shadow:
    0 8px 18px
    rgba(122, 35, 87, .20);
}

.brand-symbol {
  width: 58px;
  height: 58px;
  font-size: 27px;
}

.mini-logo {
  width: 44px;
  height: 44px;
  font-size: 21px;
}

.brand-mark h1,
.topbar-brand strong {
  margin: 0;
  color: var(--wine-dark);
}

.brand-mark h1 {
  font-size: 27px;
}

.brand-mark p,
.topbar-brand small {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
}

.brand-mark p {
  font-size: 12px;
  line-height: 1.45;
}

.welcome {
  text-align: center;
  padding: 35px 4px 25px;
}

.welcome-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: auto;
  border-radius: 50%;
  background: var(--rose);
  color: var(--wine);
  font-size: 28px;
}

.welcome h2 {
  margin: 14px 0 6px;
  font-size: 26px;
}

.welcome p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.form {
  display: grid;
  gap: 17px;
}

.form label {
  display: grid;
  gap: 7px;
  font-weight: 700;
  font-size: 13px;
}

.form input {
  width: 100%;
  height: 50px;
  border: 1px solid #d9ccd3;
  border-radius: 14px;
  outline: none;
  padding: 0 14px;
  color: var(--text);
  background: #fff;
}

.form input:focus {
  border-color: var(--wine);
  box-shadow:
    0 0 0 3px
    rgba(122, 35, 87, .09);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 50px;
}

.eye-button {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
}

.primary-button,
.read-button {
  border: 0;
  color: white;
  background:
    linear-gradient(
      135deg,
      var(--wine),
      #9a4275
    );
  font-weight: 800;
}

.primary-button {
  min-height: 52px;
  border-radius: 14px;
  margin-top: 3px;
}

.primary-button:active,
.read-button:active {
  transform: translateY(1px);
}

.form-error {
  min-height: 19px;
  color: #a02638;
  font-size: 13px;
  text-align: center;
}

.privacy-note {
  margin-top: 20px;
  padding: 13px;
  background: #faf7f9;
  border-radius: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  padding:
    max(10px, env(safe-area-inset-top))
    18px
    10px;
  background:
    rgba(255, 255, 255, .93);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
}

.topbar-brand strong {
  font-size: 17px;
}

.topbar-brand small {
  font-size: 11px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.notification-button,
.close-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 13px;
  background: #f5eff2;
  color: var(--wine-dark);
}

.install-hidden {
  display: none;
}

.badge {
  position: absolute;
  top: -4px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: #c52f4c;
  font-size: 10px;
  font-weight: 900;
  border: 2px solid white;
}

.dashboard {
  width: min(100%, 760px);
  margin: auto;
  padding:
    18px
    16px
    calc(35px + env(safe-area-inset-bottom));
}

.hello-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 170px;
  padding: 26px;
  border-radius: 25px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(
      circle at 92% 10%,
      rgba(255,255,255,.22),
      transparent 25%
    ),
    linear-gradient(
      135deg,
      var(--wine-dark),
      var(--wine),
      #a7487e
    );
  box-shadow:
    0 18px 35px
    rgba(91, 24, 63, .20);
}

.hello-card span {
  opacity: .82;
  font-size: 14px;
}

.hello-card h1 {
  margin: 4px 0;
  font-size: clamp(25px, 7vw, 36px);
}

.hello-card p {
  margin: 0;
  opacity: .85;
  font-size: 13px;
}

.shield {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  border-radius: 24px;
  background: rgba(255,255,255,.16);
  font-size: 38px;
}

.important-notice {
  display: flex;
  gap: 13px;
  margin-top: 16px;
  padding: 17px;
  border: 1px solid #f0d49e;
  border-radius: 18px;
  background: var(--warning-bg);
  color: #553a08;
}

.notice-symbol {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  background: #c58a20;
  font-weight: 900;
}

.important-notice strong {
  font-size: 14px;
}

.important-notice p {
  margin: 5px 0 7px;
  font-size: 12px;
  line-height: 1.5;
}

.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: #704b00;
  font-weight: 900;
  text-decoration: underline;
}

.section {
  padding-top: 28px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.eyebrow {
  display: block;
  color: var(--wine);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
  font-size: 10px;
}

.section-title h2,
.drawer-header h2 {
  margin: 3px 0 0;
}

.section-title h2 {
  font-size: 20px;
}

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

.quick-card {
  min-height: 145px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: white;
  box-shadow:
    0 8px 22px
    rgba(52, 32, 44, .05);
}

.quick-icon {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--rose);
  font-size: 21px;
}

.quick-card strong {
  margin-bottom: 5px;
  font-size: 14px;
}

.quick-card small {
  color: var(--muted);
  line-height: 1.4;
}

.disabled-card {
  opacity: .55;
  cursor: default;
}

.safety-card,
.ios-help {
  margin-top: 18px;
  padding: 17px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: white;
}

.safety-card {
  display: flex;
  gap: 13px;
}

.safety-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #eaf6ef;
}

.safety-card strong,
.ios-help strong {
  font-size: 13px;
}

.safety-card p,
.ios-help p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(24, 11, 19, .42);
  backdrop-filter: blur(3px);
}

.drawer {
  width: min(100%, 620px);
  max-height: 88vh;
  overflow: hidden;
  background: white;
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -20px 60px rgba(0,0,0,.18);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 21px;
  border-bottom: 1px solid var(--border);
}

.drawer-header h2 {
  font-size: 21px;
}

.close-button {
  font-size: 28px;
}

.notification-list {
  max-height: calc(88vh - 80px);
  overflow-y: auto;
  padding:
    15px
    15px
    calc(24px + env(safe-area-inset-bottom));
}

.notification-item {
  padding: 17px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: white;
}

.notification-item.unread {
  border-color: #dfb5cc;
  background: var(--rose-2);
}

.notification-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}

.notification-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wine);
}

.notification-item.read
.notification-dot {
  background: #b7b1b4;
}

.notification-status {
  color: var(--wine);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.notification-item h3 {
  margin: 0 0 7px;
  font-size: 15px;
}

.notification-item p {
  margin: 0;
  color: #554c51;
  line-height: 1.55;
  font-size: 13px;
}

.notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}

.read-button {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 11px;
  font-size: 12px;
}

.empty-state,
.loading {
  padding: 42px 22px;
  text-align: center;
  color: var(--muted);
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 53px;
  height: 53px;
  margin: auto auto 12px;
  border-radius: 50%;
  background: #eaf6ef;
  color: var(--success);
  font-size: 25px;
}

.empty-state strong {
  display: block;
  color: var(--text);
}

.empty-state p {
  max-width: 330px;
  margin: 7px auto 0;
  line-height: 1.5;
  font-size: 13px;
}

.error-state strong {
  color: #a02638;
}

.toast {
  position: fixed;
  left: 50%;
  bottom:
    calc(
      20px +
      env(safe-area-inset-bottom)
    );
  z-index: 200;
  max-width: calc(100% - 32px);
  transform:
    translate(-50%, 25px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 17px;
  border-radius: 12px;
  color: white;
  background: #282126;
  box-shadow: var(--shadow);
  font-size: 12px;
  transition:
    opacity .2s ease,
    transform .2s ease;
}

.toast.show {
  opacity: 1;
  transform:
    translate(-50%, 0);
}

@media (min-width: 700px) {
  .dashboard {
    padding-top: 30px;
  }

  .hello-card {
    min-height: 205px;
  }

  .quick-grid {
    grid-template-columns:
      repeat(4, minmax(0, 1fr));
  }

  .quick-card {
    min-height: 160px;
  }

  .drawer {
    margin-bottom: 22px;
    border-radius: 26px;
  }

  .drawer-overlay {
    align-items: center;
  }
}
