:root {
  --brand: #0097b9;
  --brand-dark: #007e9b;
  --brand-soft: rgba(0, 151, 185, 0.10);
  --bg: #f3f7fa;
  --surface: #ffffff;
  --surface-soft: #f8fbfd;
  --text: #17212b;
  --muted: #70808f;
  --border: #dde7ee;
  --danger: #dc3545;
  --danger-soft: rgba(220, 53, 69, 0.08);
  --radius: 18px;
  --radius-sm: 14px;
  --shadow-sm: 0 8px 24px rgba(19, 32, 45, 0.06);
  --shadow-md: 0 16px 42px rgba(19, 32, 45, 0.10);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top, rgba(0, 151, 185, 0.06), transparent 28%),
    linear-gradient(180deg, #f7fbfd 0%, var(--bg) 100%);
}

a {
  text-decoration: none;
}


.back-btn {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #dbe6ee;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #17212b;
    text-decoration: none;
    font-weight: 600;
}

.app-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1050;
  border-bottom: 1px solid rgba(221, 231, 238, 0.95);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.82));
  backdrop-filter: blur(14px);
}

.topbar-inner {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand-mark {
  position: relative;
  overflow: hidden;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand), #39b5cf);
  color: #fff;
  font-size: 1.08rem;
  box-shadow: var(--shadow-sm);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.28), transparent 58%);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.08;
}

.brand-copy strong {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-copy small {
  padding-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-user {
  height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 600;
}

/* General layout */
.page-area {
  padding: 24px 0 40px;
}

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
}

.page-shell-wide {
  max-width: 1120px;
  margin: 0 auto;
}

/* Intro block */
.page-intro-box {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 22px 22px 20px;
  border-radius: 24px;
  border: 1px solid rgba(0, 151, 185, 0.14);
  background:
    radial-gradient(circle at top right, rgba(0, 151, 185, 0.14), transparent 28%),
    radial-gradient(circle at bottom left, rgba(57, 181, 207, 0.12), transparent 22%),
    linear-gradient(180deg, #fbfeff 0%, #f4fbfd 100%);
  box-shadow: 0 14px 34px rgba(19, 32, 45, 0.07);
}

.page-intro-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0));
  pointer-events: none;
}

.page-intro-grid {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.page-intro-left {
  min-width: 0;
  flex: 1;
}

.page-intro-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.page-intro-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.page-intro-text {
  margin: 8px 0 0;
  max-width: 660px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.page-intro-visual {
  position: relative;
  flex: 0 0 auto;
  width: 62px;
  height: 62px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 151, 185, 0.16), rgba(57, 181, 207, 0.08));
  border: 1px solid rgba(0, 151, 185, 0.12);
  color: var(--brand);
  font-size: 2rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.page-intro-visual::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -50px;
  top: -55px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0,151,185,0.08), transparent 65%);
  pointer-events: none;
}

/* Cards */
.app-card {
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(221, 231, 238, 0.95);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.card-head-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.card-head-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1rem;
  flex: 0 0 auto;
}

.card-title {
  margin: 0 0 4px;
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
}

.card-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* Forms */
.form-stack {
  display: grid;
  gap: 16px;
}

.form-label {
  display: inline-block;
  margin-bottom: 8px;
  color: #22313d;
  font-size: 0.92rem;
  font-weight: 700;
}

.form-control.app-input {
  min-height: 52px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: none;
  padding-left: 15px;
  padding-right: 15px;
}

.form-control.app-input:focus {
  border-color: rgba(0, 151, 185, 0.6);
  box-shadow: 0 0 0 4px rgba(0, 151, 185, 0.10);
}

/* Buttons */
.app-btn {
  min-height: 48px;
  border-radius: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 18px;
  padding-right: 18px;
}

.btn-primary.app-btn {
  background: var(--brand);
  border-color: var(--brand);
}

.btn-primary.app-btn:hover,
.btn-primary.app-btn:focus {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

.btn-light.app-btn {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-light.app-btn:hover,
.btn-light.app-btn:focus {
  background: #f8fbfd;
  border-color: #d0dde6;
  color: var(--text);
}

.btn-danger.app-btn {
  border-color: var(--danger);
}

/* Footer links */
.page-links {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.94rem;
}

.page-links a {
  color: var(--brand-dark);
  font-weight: 700;
}

/* Alerts */
.alert {
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

/* Store toolbar */
.store-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.store-toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Store cards */
.store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.store-card {
  position: relative;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.96);
  border-radius: 20px;
  padding: 16px;
  min-height: 156px;
  cursor: pointer;
  transition: 0.18s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  outline: none;
}

.store-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 151, 185, 0.34);
}

.store-card.is-selected {
  border-color: rgba(0, 151, 185, 0.92);
  box-shadow: 0 18px 40px rgba(0, 151, 185, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #f4fcfe 100%);
}

.store-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.store-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.store-delete-btn {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(220, 53, 69, 0.14);
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.store-delete-btn:hover,
.store-delete-btn:focus {
  background: rgba(220, 53, 69, 0.12);
  color: var(--danger);
}

.store-title {
  margin: 14px 0 6px;
  font-size: 1.02rem;
  font-weight: 800;
  line-height: 1.35;
}

.store-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.store-selected-mark {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-dark);
  font-weight: 700;
  font-size: 0.9rem;
}


.app-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(19, 32, 45, 0.05);
}

.app-alert .app-alert-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.app-alert .app-alert-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-alert .app-alert-content strong {
  font-size: 0.92rem;
  font-weight: 800;
}

.app-alert .app-alert-content span {
  font-size: 0.92rem;
  line-height: 1.5;
}

.alert-success.app-alert {
  background: #f1fcf6;
  border-color: #ccefdc;
  color: #0f6b3c;
}

.alert-success.app-alert .app-alert-icon {
  background: #dff6ea;
  color: #13834b;
}

.alert-danger.app-alert {
  background: #fff4f4;
  border-color: #f2d2d6;
  color: #a12b36;
}

.alert-danger.app-alert .app-alert-icon {
  background: #ffe3e6;
  color: #c4303f;
}

.alert-warning.app-alert {
  background: #fff9ef;
  border-color: #f3e0b8;
  color: #8a6512;
}

.alert-warning.app-alert .app-alert-icon {
  background: #ffefcc;
  color: #a97708;
}

.alert-info.app-alert {
  background: #f2fbff;
  border-color: #cdeaf5;
  color: #0d627d;
}

.alert-info.app-alert .app-alert-icon {
  background: #dff4fb;
  color: #0c7c9f;
}


/* Empty state */
.empty-card {
  text-align: center;
  padding: 32px 22px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
}

/* Modal */
.modal-content.app-modal {
  border: 0;
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

.delete-name-box {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f6fafc;
  border: 1px solid var(--border);
  font-weight: 700;
}

/* Responsive */
@media (max-width: 991.98px) {
  .page-shell-wide {
    max-width: 100%;
  }
}

@media (max-width: 767.98px) {
  .topbar-inner {
    padding-top: 10px;
    padding-bottom: 10px;
    align-items: flex-start;
  }

  .topbar-right {
    justify-content: flex-end;
  }

  .page-area {
    padding: 18px 0 28px;
  }

  .page-intro-box {
    padding: 18px;
    border-radius: 20px;
  }

  .page-intro-grid {
    align-items: flex-start;
    gap: 14px;
  }

  .page-intro-visual {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    font-size: 1.45rem;
  }

  .page-intro-title {
    font-size: 20px;
  }

  .page-intro-text {
    font-size: 14px;
  }

  .app-card {
    padding: 18px;
    border-radius: 20px;
  }

  .store-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .store-toolbar-actions {
    width: 100%;
  }

  .store-toolbar-actions .btn,
  .store-toolbar-actions form,
  .store-toolbar-actions form .btn {
    width: 100%;
  }

  .store-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}