:root {
  --bg: #f2f4f7;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --border: #d9e0e7;
  --border-strong: #c3ccd6;
  --text: #1f2933;
  --muted: #66727f;
  --accent: #1f4b75;
  --accent-soft: #e8f0f7;
  --shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f7f8fa 0%, #eef2f6 100%);
}

.page-login,
.page-admin {
  min-height: 100vh;
}

.login-layout {
  width: min(100%, 440px);
  margin: 0 auto;
  padding: 84px 24px 56px;
}

.login-box {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-box__heading {
  margin-bottom: 24px;
  text-align: left;
}

.login-box__heading h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
}

.login-box__heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.93rem;
  font-weight: 700;
}

.field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 75, 117, 0.12);
}

button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

button {
  width: 100%;
  background: var(--accent);
  color: #fff;
}

button:hover,
.secondary-button:hover,
.app-tile:hover {
  transform: translateY(-1px);
}

.secondary-button {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.form-message {
  min-height: 22px;
  margin: 14px 0 0;
  font-size: 0.94rem;
}

.form-message.is-error {
  color: #b42318;
}

.form-message.is-success {
  color: #0f766e;
}

.apps-layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
}

.apps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.apps-header__logo {
  width: 84px;
  height: auto;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 800;
}

.user-card__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-card__name {
  font-size: 1.08rem;
}

.user-card__meta {
  color: var(--muted);
  font-size: 0.94rem;
}

.apps-section {
  margin-top: 28px;
}

.apps-section__heading {
  margin-bottom: 18px;
}

.apps-section__heading h1 {
  margin: 0 0 6px;
  font-size: 1.55rem;
}

.apps-section__heading p {
  margin: 0;
  color: var(--muted);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.app-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 128px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.app-tile--primary {
  border-color: #bfd1e2;
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fb 100%);
}

.app-tile__label {
  font-size: 1.02rem;
  font-weight: 700;
}

.app-tile__text {
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.94rem;
}

@media (max-width: 900px) {
  .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .login-layout,
  .apps-layout {
    padding: 20px;
  }

  .login-box,
  .user-card,
  .app-tile {
    border-radius: 16px;
  }

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

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