:root {
  /* Swap this file if you want another background graphic. */
  --dashboard-bg-image: url("../img/dashboard-background.svg");
  --surface: rgba(255, 255, 255, 0.88);
  --ink: #111827;
  --muted: #46566d;
  --line: rgba(17, 24, 39, 0.12);
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
  --teal: #007d70;
  --blue: #255fc7;
  --amber: #b86016;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  background-color: #eef4f2;
  background-image:
    linear-gradient(90deg, rgba(238, 244, 242, 0.98) 0%, rgba(238, 244, 242, 0.92) 45%, rgba(238, 244, 242, 0.72) 100%),
    var(--dashboard-bg-image);
  background-position: center, top right;
  background-repeat: no-repeat;
  background-size: cover, 960px auto;
  color: var(--ink);
}

a {
  color: inherit;
}

.page {
  width: min(1120px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 34px 0 56px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #172033;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.12);
}

.logout-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #172033;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.logout-link:hover,
.logout-link:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
  outline: none;
}

.hero {
  max-width: 760px;
  margin-top: 72px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  max-width: 720px;
  margin: 0;
  color: #0c1829;
  font-size: 58px;
  line-height: 1.02;
  letter-spacing: 0;
}

.identity-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.identity-panel p {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #243247;
  font-size: 14px;
  font-weight: 700;
}

.lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.6;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 46px;
}

.app-card {
  --card-accent: var(--teal);
  --card-soft: rgba(0, 125, 112, 0.1);
  position: relative;
  display: flex;
  min-height: 282px;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.app-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--card-accent);
  content: "";
}

.app-card[data-accent="blue"] {
  --card-accent: var(--blue);
  --card-soft: rgba(37, 95, 199, 0.1);
}

.app-card[data-accent="amber"] {
  --card-accent: var(--amber);
  --card-soft: rgba(184, 96, 22, 0.1);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.card-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: var(--card-soft);
  color: var(--card-accent);
  font-size: 13px;
  font-weight: 900;
}

.card-label {
  color: var(--card-accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.app-card h2 {
  margin: 0;
  color: #0c1829;
  font-size: 26px;
  line-height: 1.2;
}

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

.card-link {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding: 0 16px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 8px;
  background: #edf2f7;
  color: #111827;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.card-link:hover,
.card-link:focus-visible {
  border-color: var(--card-accent);
  background: #ffffff;
  color: var(--card-accent);
  outline: none;
  transform: translateY(-2px);
}

.app-card[data-accent="teal"] .card-link {
  border-color: var(--card-accent);
  background: var(--card-accent);
  color: #ffffff;
}

.app-card[data-accent="teal"] .card-link:hover,
.app-card[data-accent="teal"] .card-link:focus-visible {
  background: #00675d;
  color: #ffffff;
}

.app-card-loading {
  grid-column: 1 / -1;
  min-height: 180px;
}

.page-narrow {
  width: min(860px, calc(100% - 48px));
}

.feedback-hero {
  max-width: 720px;
}

.feedback-panel {
  margin-top: 42px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.feedback-form {
  display: grid;
  gap: 22px;
}

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

.feedback-form label {
  display: grid;
  gap: 8px;
}

.feedback-form label span {
  color: #243247;
  font-size: 14px;
  font-weight: 800;
}

.feedback-form input,
.feedback-form select,
.feedback-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid rgba(17, 24, 39, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  font: inherit;
}

.feedback-form textarea {
  min-height: 158px;
  resize: vertical;
}

.feedback-form input:focus,
.feedback-form select:focus,
.feedback-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 125, 112, 0.12);
  outline: none;
}

.message-field {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.back-link {
  color: #243247;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--teal);
  outline: none;
}

.submit-button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
}

.submit-button:hover,
.submit-button:focus-visible {
  background: #00675d;
  outline: none;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
}

.form-status[data-type="success"] {
  color: var(--teal);
}

.form-status[data-type="error"] {
  color: #b42318;
}

@media (max-width: 900px) {
  body {
    background-size: cover, 760px auto;
  }

  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-card {
    min-height: 250px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 30px, 1120px);
    padding: 24px 0 40px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    margin-top: 48px;
  }

  h1 {
    font-size: 42px;
  }

  .lead {
    font-size: 18px;
  }

  .page-narrow {
    width: min(100% - 30px, 860px);
  }

  .feedback-panel {
    padding: 20px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .submit-button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .brand {
    font-size: 13px;
  }

  h1 {
    font-size: 34px;
  }

  .app-card {
    padding: 20px;
  }

  .card-link {
    font-size: 14px;
  }
}
