/* =========================================================
   AUTH (login / signup) + DASHBOARD
   Matches the site theme: navy #182638, red #ee1c25, Golos Text
   ========================================================= */

/* ---------- Header: logged-in user chip ---------- */
.aamg-header__user {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px 0 6px;
  color: #fff; text-decoration: none; border: 1px solid rgba(255,255,255,.25);
  transition: background .3s ease, border-color .3s ease;
}
.aamg-header__user:hover { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.5); }
.aamg-header__avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: #ee1c25; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .5px;
}
.aamg-header__user-name { font-size: 15px; font-weight: 500; max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Auth page ---------- */
.aamg-auth {
  position: relative; overflow: hidden; color: #101827;
  background: #ffffff;
  padding: 80px 0 90px;
}
.aamg-auth::before {
  content: ""; position: absolute; top: -220px; left: -420px; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(84,140,214,.22), transparent 70%);
  pointer-events: none;
}
.aamg-auth::after {
  content: ""; position: absolute; right: -260px; bottom: -300px; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(238,28,37,.20), transparent 70%);
  pointer-events: none;
}
.aamg-auth .container { position: relative; z-index: 1; }

.aamg-auth-row { display: flex; align-items: stretch; gap: 0; max-width: 1040px; margin: 0 auto; box-shadow: 0 30px 70px rgba(16,24,40,.18); border: 1px solid #e6e9ee; }

.aamg-auth-side {
  flex: 0 0 42%; padding: 48px 42px; color: #fff;
  background: #182638; border-left: 4px solid #ee1c25;
  display: flex; flex-direction: column; justify-content: center;
}
.aamg-auth-side .brand-logo { width: 190px; max-width: 100%; margin-bottom: 30px; }
.aamg-auth-eyebrow { display: block; font-size: 13px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: #ff7a80; margin-bottom: 12px; }
.aamg-auth-side h2 { font-size: 30px; font-weight: 700; line-height: 1.25; margin-bottom: 22px; }
.aamg-auth-side h2 span { color: #ee1c25; }
.aamg-auth-list { list-style: none; padding: 0; margin: 0 0 26px; }
.aamg-auth-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.5; margin-bottom: 12px; color: rgba(255,255,255,.88); }
.aamg-auth-list li i { color: #2ecc71; margin-top: 4px; }
.aamg-auth-side-contact a { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.85); text-decoration: none; font-size: 14px; margin-top: 8px; }
.aamg-auth-side-contact a i { color: #ee1c25; }
.aamg-auth-side-contact a:hover { color: #fff; }

.aamg-auth-card { flex: 1 1 auto; background: #fff; color: #101010; padding: 48px 46px; }
.aamg-auth-title { font-size: 28px; font-weight: 700; color: #101827; margin-bottom: 6px; }
.aamg-auth-sub { font-size: 15px; color: #5b6472; margin-bottom: 26px; }

.aamg-auth-field { position: relative; margin-bottom: 16px; }
.aamg-auth-field label { display: block; font-size: 13px; font-weight: 600; color: #344054; margin-bottom: 6px; }
.aamg-auth-field .aamg-auth-input-wrap { position: relative; }
.aamg-auth-field .aamg-auth-input-wrap > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #8b93a1; font-size: 14px; pointer-events: none; }
.aamg-auth-input {
  width: 100%; height: 48px; background: #fff; border: 1px solid #dfe2e8; border-radius: 4px;
  padding: 12px 14px 12px 42px; font-size: 15px; color: #101010; font-family: inherit;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.aamg-auth-input::placeholder { color: #9aa1ad; }
.aamg-auth-input:hover { border-color: #c4c9d2; }
.aamg-auth-input:focus { outline: 0; border-color: #ee1c25; box-shadow: 0 0 0 3px rgba(238,28,37,.12); }
.aamg-auth-input.is-invalid { border-color: #ee1c25; }
.aamg-auth-error { display: block; font-size: 13px; color: #d11a22; margin-top: 6px; }
.aamg-auth-hint { font-size: 12px; color: #8b93a1; margin-top: 6px; }

.aamg-auth-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: #8b93a1; padding: 6px; cursor: pointer; font-size: 14px;
}
.aamg-auth-toggle:hover { color: #182638; }

.aamg-auth-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; font-size: 14px; }
.aamg-auth-meta label { display: flex; align-items: center; gap: 8px; color: #344054; cursor: pointer; margin: 0; }
.aamg-auth-meta input { accent-color: #ee1c25; }
.aamg-auth-link { color: #ee1c25; text-decoration: none; font-weight: 500; }
.aamg-auth-link:hover { color: #b8121a; text-decoration: underline; }

.aamg-auth-submit {
  width: 100%; height: 52px; border: 0; border-radius: 4px; cursor: pointer;
  background: linear-gradient(90deg,#ff0a1f,#df1a2c,#ff0a1f); background-size: 200% 100%;
  color: #fff; font-size: 16px; font-weight: 600; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  transition: background-position .5s, transform .3s, box-shadow .3s;
}
.aamg-auth-submit:hover { background-position: 100% 0; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(255,10,31,.28); }
.aamg-auth-submit:focus-visible { outline: 2px solid #182638; outline-offset: 3px; }

.aamg-auth-switch { text-align: center; font-size: 14px; color: #5b6472; margin: 22px 0 0; }

/* ---------- Alerts ---------- */
.aamg-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 4px; font-size: 14px; margin-bottom: 20px; border: 1px solid transparent; }
.aamg-alert i { margin-top: 2px; }
.aamg-alert-danger  { background: #fdecec; color: #9b1116; border-color: #f7c2c5; }
.aamg-alert-success { background: #e9f8ef; color: #156b3a; border-color: #bfe8cf; }
.aamg-alert-warning { background: #fff6e5; color: #8a5a00; border-color: #ffe1a8; }
.aamg-alert ul { margin: 0; padding-left: 18px; }

/* ---------- Dashboard ---------- */
.aamg-dash { background: #f3f5f8; color: #101827; min-height: calc(100vh - 80px); padding: 36px 0 60px; }
.aamg-dash-grid { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }

.aamg-dash-side { background: #182638; color: #fff; border-radius: 6px; overflow: hidden; position: sticky; top: 96px; }
.aamg-dash-profile { display: flex; align-items: center; gap: 14px; padding: 22px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.aamg-dash-profile .aamg-header__avatar { width: 48px; height: 48px; font-size: 17px; }
.aamg-dash-profile strong { display: block; font-size: 15px; font-weight: 600; line-height: 1.2; }
.aamg-dash-profile span { display: block; font-size: 12px; color: rgba(255,255,255,.6); margin-top: 3px; word-break: break-all; }
.aamg-dash-nav { list-style: none; margin: 0; padding: 10px 0; }
.aamg-dash-nav a {
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  color: rgba(255,255,255,.78); text-decoration: none; font-size: 15px;
  border-left: 3px solid transparent; transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.aamg-dash-nav a i { width: 18px; text-align: center; font-size: 14px; }
.aamg-dash-nav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.aamg-dash-nav a.is-active { color: #fff; background: rgba(238,28,37,.14); border-left-color: #ee1c25; }
.aamg-dash-nav .aamg-dash-nav-sep { height: 1px; margin: 8px 20px; background: rgba(255,255,255,.1); }
.aamg-dash-nav a.aamg-dash-logout { color: #ff8a8f; }
.aamg-dash-nav a.aamg-dash-logout:hover { color: #fff; background: rgba(238,28,37,.2); }

.aamg-dash-main { min-width: 0; }
.aamg-dash-welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 28px 30px; border-radius: 6px; color: #fff;
  background: linear-gradient(115deg,#1a2431,#1d2e43,#233a55); position: relative; overflow: hidden;
}
.aamg-dash-welcome::after {
  content: ""; position: absolute; right: -120px; top: -160px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(238,28,37,.35), transparent 70%); pointer-events: none;
}
.aamg-dash-welcome > * { position: relative; z-index: 1; }
.aamg-dash-welcome p.aamg-dash-eyebrow { font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: #ff7a80; font-weight: 600; margin: 0 0 6px; }
.aamg-dash-welcome h1 { font-size: 28px; font-weight: 700; margin: 0 0 6px; }
.aamg-dash-welcome h1 span { color: #ee1c25; }
.aamg-dash-welcome p.aamg-dash-lead { margin: 0; color: rgba(255,255,255,.8); font-size: 15px; max-width: 560px; }

.aamg-dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 24px; }
.aamg-dash-stat { background: #fff; border-radius: 6px; padding: 20px 22px; border: 1px solid #e6e9ee; display: flex; align-items: center; gap: 16px; transition: transform .3s ease, box-shadow .3s ease; }
.aamg-dash-stat:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(16,24,40,.08); }
.aamg-dash-stat-icon { width: 46px; height: 46px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; color: #ee1c25; background: rgba(238,28,37,.1); flex-shrink: 0; }
.aamg-dash-stat strong { display: block; font-size: 24px; font-weight: 700; line-height: 1.1; color: #101827; }
.aamg-dash-stat span { display: block; font-size: 13px; color: #5b6472; margin-top: 4px; }

.aamg-dash-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-top: 18px; }
.aamg-dash-card { background: #fff; border-radius: 6px; border: 1px solid #e6e9ee; padding: 24px 26px; }
.aamg-dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.aamg-dash-card-head h2 { font-size: 18px; font-weight: 700; margin: 0; color: #101827; }
.aamg-dash-card-head a { font-size: 14px; }

.aamg-dash-empty { text-align: center; padding: 34px 20px; color: #5b6472; }
.aamg-dash-empty i { font-size: 36px; color: #c9ced7; margin-bottom: 12px; display: block; }
.aamg-dash-empty p { margin: 0 0 16px; font-size: 15px; }

.aamg-dash-dl { margin: 0; }
.aamg-dash-dl div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid #eef1f5; font-size: 14px; }
.aamg-dash-dl div:last-child { border-bottom: 0; }
.aamg-dash-dl dt { color: #5b6472; font-weight: 500; }
.aamg-dash-dl dd { margin: 0; color: #101827; font-weight: 500; text-align: right; word-break: break-word; }
.aamg-dash-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; background: #e9f8ef; color: #156b3a; }

.aamg-dash .aamg-btn { border-radius: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
  .aamg-dash-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .aamg-auth-row { flex-direction: column; max-width: 560px; }
  .aamg-auth-side { flex-basis: auto; padding: 36px 30px; border-left: 0; border-top: 4px solid #ee1c25; }
  .aamg-auth-card { padding: 36px 30px; }
  .aamg-dash-grid { grid-template-columns: 1fr; }
  .aamg-dash-side { position: static; }
  .aamg-dash-row { grid-template-columns: 1fr; }
  .aamg-header__user-name { display: none; }
  .aamg-header__user { padding-right: 6px; }
}
@media (max-width: 575px) {
  .aamg-auth { padding: 50px 0 60px; }
  .aamg-auth-card, .aamg-auth-side { padding: 28px 20px; }
  .aamg-auth-title { font-size: 24px; }
  .aamg-dash-stats { grid-template-columns: 1fr; }
  .aamg-dash-welcome { padding: 22px 20px; }
  .aamg-dash-welcome h1 { font-size: 23px; }
}
