/*
 * Login page (resources/views/auth/loginCodeCanyon.blade.php), all screen sizes. It is built from the dashboard's own pieces: the green
 * sky header with the animated school picture, the mint page, white rounded cards that overlap the header, soft tinted tiles, amber
 * action buttons, Poppins. Tokens (--ym-*, light and dark) come from yes-mobile.css, loaded first.
 */
.yl-login {
    --amber: #f2a93b; --amber-dark: #d98e1f;
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--ym-mint); color: var(--ym-ink); font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
}
.yl-login *, .yl-login *::before, .yl-login *::after { box-sizing: border-box; }

/* ---------- header: the dashboard hero ---------- */
.yl-login__hero { position: relative; overflow: hidden; flex: 0 0 auto; min-height: 300px; padding: 40px 20px 110px; display: flex; align-items: center; justify-content: center; color: #fff;
    background: radial-gradient(70% 60% at 18% 0%, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .15) 45%, transparent 75%), linear-gradient(180deg, #4cb87a 0%, var(--ym-green-500) 55%, var(--ym-green-700) 100%); }
html[data-theme="dark"] .yl-login__hero { background: radial-gradient(70% 60% at 18% 0%, rgba(255, 255, 255, .12) 0%, transparent 70%), linear-gradient(180deg, var(--ym-green-700) 0%, var(--ym-green-900) 100%); }
.yl-login__hero .ym-hero__sky { position: absolute; inset: 0; pointer-events: none; }
.yl-login__hero .ym-hero__sky svg, .yl-login__hero .ym-hero__land svg { display: block; width: 100%; height: 100%; }
.yl-login__hero .ym-hero__land { position: absolute; right: 0; bottom: 0; width: min(100%, 420px); aspect-ratio: 400 / 110; pointer-events: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26%); mask-image: linear-gradient(to right, transparent 0, #000 26%); }
.yl-login__hero-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; animation: yl-login-in .55s ease both; }
.yl-login__logo { display: inline-flex; align-items: center; justify-content: center; max-width: 190px; padding: 10px 18px; margin-bottom: 14px; border-radius: 18px; background: rgba(255, 255, 255, .96); box-shadow: 0 10px 26px rgba(0, 0, 0, .16); }
.yl-login__logo img { display: block; max-width: 100%; max-height: 54px; object-fit: contain; }
.yl-login__hello { margin: 0 0 2px; font-size: 15px; opacity: .92; }
.yl-login__school { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .14); }

/* ---------- main: the card that overlaps the header, then tiles ---------- */
.yl-login__main { position: relative; z-index: 2; flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; margin-top: -84px; padding: 0 16px 28px; }
.yl-login__card { width: 100%; max-width: 460px; padding: 26px 24px 24px; border-radius: 24px; background: var(--ym-card); border: 1px solid var(--ym-line); box-shadow: 0 14px 36px rgba(16, 40, 28, .14); animation: yl-login-rise .55s ease .05s both; }
@keyframes yl-login-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes yl-login-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.yl-login__head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.yl-login__badge { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 15px; background: var(--ym-green-bg); color: var(--ym-green-fg); font-size: 20px; }
.yl-login__title { margin: 0; font-size: 22px; font-weight: 800; color: var(--ym-ink); letter-spacing: -.01em; }
.yl-login__sub { margin: 2px 0 0; color: var(--ym-muted); font-size: 13px; }

.yl-login__alert { margin: 0 0 16px; padding: 12px 16px; border-radius: 14px; font-size: 14px; font-weight: 600; }
.yl-login__alert--ok { background: var(--ym-green-bg); color: var(--ym-green-fg); }
.yl-login__alert--bad { background: var(--ym-rose-bg); color: var(--ym-rose-fg); }

.yl-login__schools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.yl-login__school-link { padding: 6px 12px; border-radius: 999px; background: var(--ym-green-bg); color: var(--ym-green-fg); font-size: 12px; font-weight: 700; text-decoration: none; }

.yl-login__field { margin-bottom: 16px; }
.yl-login__field label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--ym-muted); }
.yl-login__control { position: relative; display: flex; align-items: center; height: 52px; border: 1px solid var(--ym-line); border-radius: 14px; background: var(--ym-mint); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.yl-login__control:focus-within { border-color: var(--ym-green-fg); background: var(--ym-card); box-shadow: 0 0 0 3px var(--ym-ring); }
.yl-login__control.is-invalid { border-color: var(--ym-rose-fg); }
.yl-login__control > i { flex: 0 0 auto; width: 48px; text-align: center; color: var(--ym-green-fg); font-size: 16px; }
.yl-login__control input { flex: 1 1 auto; min-width: 0; height: 100%; padding: 0 14px 0 0; border: 0; outline: 0; background: transparent; color: var(--ym-ink); font-size: 15px; font-family: inherit; box-shadow: none; }
.yl-login__control input::placeholder { color: var(--ym-muted); opacity: .8; }
.yl-login__eye { flex: 0 0 auto; width: 48px; height: 100%; border: 0; background: transparent; color: var(--ym-muted); cursor: pointer; border-radius: 0 14px 14px 0; }
.yl-login__eye:hover, .yl-login__eye[aria-pressed="true"] { color: var(--ym-green-fg); }
.yl-login__error { display: block; margin-top: 6px; color: var(--ym-rose-fg); font-size: 12px; font-weight: 600; }

.yl-login__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; }
.yl-login__check { position: relative; display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; color: var(--ym-ink); cursor: pointer; user-select: none; }
.yl-login__check input { position: absolute; opacity: 0; width: 0; height: 0; }
.yl-login__box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--ym-line); background: var(--ym-card); display: inline-flex; align-items: center; justify-content: center; transition: background .15s ease, border-color .15s ease; }
.yl-login__check input:checked + .yl-login__box { background: var(--ym-green-700); border-color: var(--ym-green-700); }
.yl-login__check input:checked + .yl-login__box::after { content: ""; width: 6px; height: 11px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.yl-login__check input:focus-visible + .yl-login__box { box-shadow: 0 0 0 3px var(--ym-ring); }
.yl-login__link { color: var(--ym-green-fg); font-size: 14px; font-weight: 600; text-decoration: none; }
.yl-login__link:hover { text-decoration: underline; color: var(--ym-green-fg); }

/* the same amber pill the dashboard uses for its main action */
.yl-login__submit { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 52px; border: 0; border-radius: 999px; background: var(--amber); color: #0b1b26; font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer; box-shadow: 0 8px 18px rgba(242, 169, 59, .34); transition: transform .15s ease, background .15s ease; }
.yl-login__submit:hover { background: var(--amber-dark); transform: translateY(-1px); }
.yl-login__submit:active { transform: scale(.98); }
.yl-login__submit:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--ym-ring); }
.yl-login__submit.is-busy { opacity: .75; cursor: progress; }
.yl-login__submit.is-busy i { animation: yl-login-pulse 1s ease-in-out infinite; }
@keyframes yl-login-pulse { 50% { transform: translateX(5px); } }

.yl-login__demo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--ym-line); }
.yl-login__demo form { margin: 0; }
.yl-login__chip { width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--ym-green-bg); color: var(--ym-green-fg); font-family: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; transition: background .15s ease, color .15s ease; }
.yl-login__chip:hover { background: var(--ym-green-700); color: #fff; }

/* soft tinted tiles, like the dashboard's shortcuts */
.yl-login__tiles { list-style: none; margin: 22px 0 0; padding: 0; width: 100%; max-width: 460px; display: grid; grid-template-columns: 1fr; gap: 10px; animation: yl-login-rise .55s ease .15s both; }
.yl-login__tiles li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--ym-card); border: 1px solid var(--ym-line); font-size: 14px; font-weight: 600; color: var(--ym-ink); }
.yl-login__tiles li span { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: var(--bg, var(--ym-green-bg)); color: var(--fg, var(--ym-green-fg)); font-size: 16px; }

.yl-login__foot { margin-top: 24px; text-align: center; color: var(--ym-muted); font-size: 12px; }
.yl-login__foot a { color: var(--ym-green-fg); }

/* ---------- desktop: a wider header, the tiles in one row ---------- */
@media (min-width: 992px) {
    .yl-login__hero { min-height: 380px; padding: 56px 32px 150px; border-radius: 0 0 36px 36px; box-shadow: 0 14px 34px rgba(11, 90, 49, .22); }
    .yl-login__logo { max-width: 240px; padding: 12px 22px; margin-bottom: 18px; }
    .yl-login__logo img { max-height: 64px; }
    .yl-login__hello { font-size: 17px; }
    .yl-login__school { font-size: 40px; }
    .yl-login__hero .ym-hero__land { width: min(46%, 560px); }
    .yl-login__main { margin-top: -110px; }
    .yl-login__card { max-width: 480px; padding: 32px 32px 28px; box-shadow: 0 22px 54px rgba(16, 40, 28, .18); }
    .yl-login__title { font-size: 24px; }
    .yl-login__tiles { max-width: 900px; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
    .yl-login__tiles li { flex-direction: column; gap: 10px; padding: 18px 16px; text-align: center; border-radius: 20px; }
    .yl-login__tiles li span { width: 48px; height: 48px; border-radius: 15px; font-size: 20px; }
}

/* right-to-left */
html.rtl .yl-login__control input { padding: 0 0 0 14px; }
html.rtl .yl-login__eye { border-radius: 14px 0 0 14px; }

@media (prefers-reduced-motion: reduce) {
    .yl-login__hero-in, .yl-login__card, .yl-login__tiles, .yl-login__submit.is-busy i { animation: none; }
}
