:root {
  --bg: #ffffff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --surface-alt: #f6faef;
  --border: rgba(46, 71, 12, 0.14);
  --border-strong: rgba(46, 71, 12, 0.24);
  --text: #2e470c;
  --muted: #597722;
  --brand: #abc661;
  --brand-strong: #597722;
  --brand-soft: #e2eec4;
  --danger: #b24141;
  --shadow: 0 20px 60px rgba(46, 71, 12, 0.12);
  --shadow-soft: 0 12px 28px rgba(46, 71, 12, 0.08);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-width: 1560px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Century Gothic", CenturyGothic, "Apple Gothic", "URW Gothic L", sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
input,
a {
  font: inherit;
}

a {
  color: inherit;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: 0.65rem 1.1rem;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(46, 71, 12, 0.12);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  width: auto;
  height: 46px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.welcome {
  color: var(--muted);
  font-weight: 500;
}

.ghost-button,
.primary-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.ghost-button {
  padding: 0.62rem 0.95rem;
  color: #fff;
  background: #597722;
  font-weight: 600;
}

.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

.ghost-button:hover {
  background: #abc661;
}

.primary-button {
  padding: 0.82rem 1.15rem;
  color: #fff;
  background: var(--brand-strong);
  font-weight: 700;
}

.primary-button:disabled,
.ghost-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--brand);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.intro {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.login-view {
  position: relative;
  min-height: calc(100vh - 64px);
  background:
    linear-gradient(120deg, rgba(10, 34, 31, 0.72), rgba(8, 46, 41, 0.48)),
    url("./assets/img/home.jpg") center / cover no-repeat;
}

.login-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16), transparent 24%),
    radial-gradient(circle at 80% 30%, rgba(173, 207, 88, 0.28), transparent 18%);
}

.login-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 1.2rem;
}

.login-panel {
  width: min(100%, 390px);
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 0.95;
}

.login-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.05rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field span {
  color: var(--muted);
  font-weight: 600;
}

.field input {
  width: 100%;
  padding: 0.78rem 0.9rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
}

.field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(141, 185, 45, 0.22);
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-weight: 600;
}

.login-logo {
  position: absolute;
  right: 1.5rem;
  bottom: 1.25rem;
  width: 110px;
  height: auto;
}

.home-view {
  width: min(calc(100% - 1.2rem), var(--max-width));
  margin: 0 auto;
  padding: 0.95rem 0 1.6rem;
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.82rem;
  align-items: start;
}

.section-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 0.82rem;
  color: #fff;
  background: var(--brand-strong);
}

.section-head h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.15;
  font-weight: 500;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.material-symbols-outlined {
  font-variation-settings:
    "FILL" 0,
    "wght" 500,
    "GRAD" 0,
    "opsz" 24;
}

.section-links {
  display: grid;
  padding: 5px;
}

.section-link {
  display: block;
  padding: 5px;
  color: var(--text);
  background: #fff;
  border: 0;
  border-radius: 12px;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.section-link:hover {
  color: var(--text);
  background: #abc661;
}

.page-message {
  width: min(calc(100% - 2rem), 640px);
  margin: 2rem auto;
  padding: 1rem 1.2rem;
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

@media (max-width: 720px) {
  .topbar {
    padding-inline: 1rem;
  }

  .brand img {
    height: 40px;
  }

  .topbar-actions {
    gap: 0.75rem;
  }

  .welcome {
    display: none;
  }

  .login-content {
    align-items: flex-start;
    padding: 1rem;
  }

  .login-panel {
    margin-top: 1.5rem;
    padding: 1.4rem;
  }

  .login-logo {
    width: 88px;
    right: 1rem;
    bottom: 1rem;
  }

  .home-view {
    width: min(calc(100% - 1rem), var(--max-width));
    padding-top: 0.7rem;
  }

}

@media (min-width: 1180px) {
  .mosaic {
    grid-template-columns: minmax(260px, 1fr) minmax(230px, 1fr) minmax(230px, 1fr) minmax(260px, 1fr);
    grid-template-areas:
      "resources support databases servers"
      "resources drive domains servers";
  }

  .section-card--servers {
    grid-area: servers;
  }

  .section-card--resources {
    grid-area: resources;
  }

  .section-card--support {
    grid-area: support;
  }

  .section-card--databases {
    grid-area: databases;
  }

  .section-card--drive {
    grid-area: drive;
  }

  .section-card--domains {
    grid-area: domains;
  }
}
