/* ==========================================================================
   Suite — public authentication pages (CakeDC/Users login, request reset,
   request login link). Rendered under the standalone `auth` layout.
   Palette matches the branded transactional emails
   (templates/layout/email/html/suite.php).
   ========================================================================== */

:root {
    --blue: #086ad8;
    --blue-dark: #0755ad;
    --blue-soft: #eaf2fd;
    --bg: #f1f5fb;
    --ink: #0b1220;
    --muted: #5a6a82;
    --muted-2: #8a97ab;
    --border: #e5eaf2;
    --card: #ffffff;
    --danger: #d64545;
    --shadow: 0 12px 34px rgba(11, 18, 32, 0.08);
    --radius: 20px;
    --font: "Inter", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---- Top bar (centered logo) ------------------------------------------- */

.topbar {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
}

.topbar-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-badge {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: var(--blue);
    color: #fff;
    font-weight: 800;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--blue);
}

/* ---- Buttons ------------------------------------------------------------ */

.btn,
button.ht-btn,
.auth-card button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 22px;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    background-color: var(--blue);
    color: #fff;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.btn:hover,
button.ht-btn:hover,
.auth-card button[type="submit"]:hover {
    background-color: var(--blue-dark);
}

.btn-ghost {
    background-color: transparent;
    color: var(--blue);
    border-color: var(--border);
}

.btn-ghost:hover {
    background-color: var(--blue-soft);
}

/* ---- Layout wrapper ----------------------------------------------------- */

.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.auth-wrap {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ---- Auth card ---------------------------------------------------------- */

.auth-card {
    background-color: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    border-top: 5px solid var(--blue);
    padding: 36px 36px 32px 36px;
}

.auth-card__head {
    margin-bottom: 26px;
    text-align: center;
}

.auth-card__head h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 6px 0;
}

.auth-card__hint {
    font-size: 15px;
    color: var(--muted);
    margin: 0;
}

/* Form fields */

.auth-field { margin-bottom: 18px; }

.auth-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
}

.auth-field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: var(--font);
    font-size: 15px;
    color: var(--ink);
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(8, 106, 216, 0.15);
}

.auth-field input.is-invalid {
    border-color: var(--danger);
}

.auth-field .error-message {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--danger);
}

/* Remember-me checkbox */

.auth-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--muted);
    cursor: pointer;
}

.auth-check input { margin: 0; }

/* Links row under the form */

.auth-links {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.auth-links a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover { text-decoration: underline; }

.auth-links .sep {
    margin: 0 8px;
    color: var(--muted-2);
}

/* Flash messages */

.message {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    margin-bottom: 18px;
    text-align: center;
}

.message.success { background-color: #e7f6ec; color: #1f7a44; }
.message.error   { background-color: #fdeaea; color: var(--danger); }
.message.warning { background-color: #fdf3e2; color: #a3610a; }
.message.info    { background-color: var(--blue-soft); color: var(--blue-dark); }

/* ---- Footer ------------------------------------------------------------- */

.auth-footer {
    text-align: center;
    padding: 24px;
    font-size: 13px;
    color: var(--muted-2);
}

/* ---- Responsive --------------------------------------------------------- */

@media (max-width: 480px) {
    .auth-card { padding: 28px 22px 26px 22px; }
    .main { padding: 28px 16px; }
}
