.navbar__inner {
  width: 90% !important;
  margin: 0 auto;
}

.page {
  min-height: 75vh;
}

.plans-shell {
  padding: 10px 0 40px;
}

.plans-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.plans-header h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.plans-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan-card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  padding: 16px;
  position: relative;
}

.plan-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.plan-card p {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.plan-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.03);
  color: #334155;
}

.plan-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.plan-actions a {
  text-decoration: none;
}

.plans-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  background: rgba(15, 23, 42, 0.02);
}

.plan-actions > .btn {
  height: 50px;
  width: 80px;
}

.plans-tools {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.input {
  width: min(420px, 100%);
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.plans-pager {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.plan-info-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.7;
}

.plan-info-btn:hover {
  opacity: 1;
}

/* --- modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999;
}

.modal {
  width: min(560px, 100%);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.modal-body {
  padding: 14px 16px;
  display: grid;
  gap: 12px;
}

.modal-footer {
  padding: 14px 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.modal-error {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
  color: #991b1b;
  font-weight: 700;
  font-size: 13px;
}

.modal-overlay[hidden] {
  display: none !important;
}

/* --- details --- */
.details-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  justify-content: flex-end;
  z-index: 999;
}

.details-panel {
  width: min(420px, 100%);
  background: white;
  height: 100%;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.details-body {
  padding: 16px;
  overflow-y: auto;
}

.details-overlay[hidden] {
  display: none !important;
}

@media (max-width: 980px) {
  .plans-grid {
    grid-template-columns: 1fr;
  }
  .plans-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (max-width: 1200px) {
  .plans-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
  }

  .plans-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .plans-actions {
    width: 100%;
    justify-content: space-between;
  }

  .plans-tools {
    width: 100%;
    flex-wrap: wrap;
  }

  .input {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .plans-shell {
    padding: 6px 0 30px;
  }

  .plans-header h1 {
    font-size: 24px;
  }

  .plan-card {
    padding: 14px;
  }

  .plan-card h2 {
    font-size: 17px;
  }

  .plan-card p {
    white-space: normal;
    overflow: visible;
  }

  .plan-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .plan-actions > .btn {
    width: 100%;
    height: 44px;
  }
}

@media (max-width: 560px) {
  .plans-header h1 {
    font-size: 22px;
  }

  .badge {
    font-size: 11px;
    padding: 6px 9px;
  }

  .plan-meta {
    gap: 6px;
  }

  .plan-info-btn {
    top: 8px;
    right: 8px;
  }

  .plans-pager {
    flex-wrap: wrap;
  }

  .modal {
    border-radius: 14px;
  }

  .modal-body {
    gap: 10px;
  }

  .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-footer .btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .navbar__inner {
    width: 95% !important;
  }

  .plans-shell {
    padding: 4px 0 24px;
  }

  .plan-card {
    padding: 12px;
    border-radius: 14px;
  }

  .plan-card h2 {
    font-size: 15px;
  }

  .plan-card p {
    font-size: 13px;
  }

  .badge {
    font-size: 10px;
  }

  .btn {
    font-size: 13px;
    padding: 8px 10px;
  }

  .details-panel {
    width: 100%;
  }
}

@media (max-width: 360px) {
  .plans-header h1 {
    font-size: 18px;
  }

  .plan-card h2 {
    font-size: 14px;
  }

  .plan-card p {
    font-size: 12px;
  }

  .badge {
    font-size: 9px;
    padding: 5px 8px;
  }

  .btn {
    font-size: 12px;
  }
}
