/* ---------------------------------------------------------------------------
   Auth page refresh - 2026-09-21
   Loaded ONLY from views/layouts/auth.php, which Auth::__construct() sets for
   every auth page, so nothing here can reach the logged-in app.
   Brand: orange #9B06CD, charcoal #2b2b33.
--------------------------------------------------------------------------- */

:root {
    --sf-orange: #9B06CD;
    --sf-orange-dark: #7D05A6;
    --sf-ink: #2b2b33;
    --sf-muted: #6b7280;
    --sf-border: #dfe3e8;
}

/* --- Header: white bar so the dark wordmark is actually legible --- */
.navbar.header {
    justify-content: center;          /* logo centred */
    position: fixed;
    background: #ffffff !important;
    border-bottom: 1px solid var(--sf-border) !important;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .04);
    height: auto !important;
    min-height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
}
.navbar.header .logo { padding: 0 !important; float: none !important; }
.navbar.header .logo_link {
    display: flex; align-items: center;
    padding: 12px 0 !important;
    font-size: 0 !important;      /* hides the text node if the logo img loads */
    line-height: 0 !important;
}
.navbar.header .logo_link img { display: block; height: 34px; width: auto; }
.navbar.header .user-nav {
    margin: 0 !important; float: none !important;
    display: flex; align-items: center; gap: 8px;
    /* Taken out of flow so it cannot push the centred logo off-centre. */
    position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
}
.navbar.header .user-nav_item { list-style: none; }
.navbar.header .user-nav_link.signIn {
    display: inline-block;
    padding: 9px 18px !important;
    font-size: 13px; font-weight: 600; letter-spacing: .02em;
    color: var(--sf-ink) !important;
    border: 1px solid var(--sf-border);
    border-radius: 6px;
    text-decoration: none !important;
    transition: all .15s ease;
}
.navbar.header .user-nav_item:last-child .user-nav_link.signIn {
    background: var(--sf-orange); border-color: var(--sf-orange); color: #fff !important;
}
.navbar.header .user-nav_link.signIn:hover { border-color: var(--sf-orange); color: var(--sf-orange) !important; }
.navbar.header .user-nav_item:last-child .user-nav_link.signIn:hover {
    background: var(--sf-orange-dark); border-color: var(--sf-orange-dark); color: #fff !important;
}

/* --- Page canvas: fill the viewport so the background stops cutting off --- */
html, body { height: 100%; }
.page-wrapper, .wrapper { height: auto !important; }
.main.sign_in {
    /* The header is position:fixed (navbar-fixed-top), so it takes NO layout
       space and .main starts at top:0. Subtracting its height here left a
       64px gap at the bottom of the viewport. Fill the full height and pad
       the top instead, so nothing tucks under the fixed bar. */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 112px 16px 64px;
    background-color: #2b2b33;              /* fallback behind the image */
    /* No !important here: login.php no longer sets an inline background, and
       !important would beat the .sf-wave media query below (and force a single
       'cover' onto BOTH background layers). */
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    box-sizing: border-box;
    border: 0 !important;
}
/* Pages with no background image (forgot password, invite) get a branded wash */
.main.sign_in.sf-plain {
    background:
        radial-gradient(1100px 500px at 12% -10%, rgba(241,89,42,.16), transparent 60%),
        radial-gradient(900px 480px at 100% 110%, rgba(103,102,253,.10), transparent 60%),
        #f6f7f9;
}

/* --- Card --- */
.main.sign_in .container-fluid { width: 100%; max-width: 440px; padding: 0; }
.sign_block {
    /* style.css sets .sign_block{width:25%} (and 50% in a breakpoint), which
       left the card ~220px inside a 440px container. */
    width: 100% !important;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid rgba(16,24,40,.06);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(16,24,40,.12), 0 2px 6px rgba(16,24,40,.06);
    padding: 36px 34px 30px !important;
    margin: 0 !important;
}
.sign_title {
    margin: 0 0 6px !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: var(--sf-ink) !important;
    text-align: left !important;
    letter-spacing: -.01em;
}
.sf-sub { margin: 0 0 24px; font-size: 14.5px; line-height: 21px; color: var(--sf-muted); }

/* --- Fields --- */
.sign_block .form-group { margin-bottom: 16px; }
.sf-label {
    display: block; margin-bottom: 6px;
    font-size: 13px; font-weight: 600; color: #3f4451;
}
.sign_block .form-control {
    height: auto !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
    color: var(--sf-ink) !important;
    background: #fff !important;
    border: 1px solid var(--sf-border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
    width: 100%;
}
.sign_block .form-control:focus {
    border-color: var(--sf-orange) !important;
    box-shadow: 0 0 0 3px rgba(155,6,205,.15) !important;
    outline: none !important;
}
.sign_block .form-control::placeholder { color: #9aa1ac; }

/* --- Button --- */
.sign_block .btn-save {
    display: block; width: 100%;
    padding: 12px 20px !important;
    font-size: 15px !important; font-weight: 700 !important;
    color: #fff !important;
    background: var(--sf-orange) !important;
    border: 0 !important; border-radius: 8px !important;
    cursor: pointer;
    transition: background .15s ease, transform .05s ease;
}
.sign_block .btn-save:hover  { background: var(--sf-orange-dark) !important; }
.sign_block .btn-save:active { transform: translateY(1px); }

/* --- Footer row: remember me + forgot link --- */
.sign_block .custom-form { margin-top: 4px; }
.sign_block .custom-form .pull-left,
.sign_block .custom-form .pull-right { float: none !important; }
.sf-row-between {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
/* Our own checkbox, independent of the theme's .cb-checkbox behaviour. */
.sign_block .sf-check {
    display: inline-flex; align-items: center; gap: 8px; margin: 0;
    font-size: 14px; font-weight: 500; color: #4b5162;
    cursor: pointer; user-select: none;
}
.sign_block .sf-check input[type="checkbox"] {
    -webkit-appearance: checkbox; appearance: checkbox;
    width: 16px; height: 16px; min-width: 16px; margin: 0;
    accent-color: #9B06CD; cursor: pointer; flex: 0 0 auto;
}
.sign_block .link, .sf-link {
    font-size: 14px; font-weight: 600;
    color: var(--sf-orange) !important; text-decoration: none !important;
}
.sign_block .link:hover, .sf-link:hover { text-decoration: underline !important; }

.sf-foot {
    margin: 20px 0 0; padding-top: 18px;
    border-top: 1px solid #eef0f3;
    font-size: 14px; color: var(--sf-muted); text-align: center;
}

/* --- Alerts --- */
.alert { border-radius: 8px !important; border: 1px solid transparent; font-size: 14px; }

@media (max-width: 520px) {
    .sign_block { padding: 28px 22px 24px !important; }
    .sign_title { font-size: 21px !important; }
    .navbar.header { padding: 0 16px; }
}

/* --- Login canvas: pixamattic violet ------------------------------- */
.main.sign_in.sf-wave {
    background-color: #f8f5fc;
    background-image:
        radial-gradient(1100px 520px at 10% -12%, rgba(155,6,205,.16), transparent 62%),
        radial-gradient(900px 480px at 100% 112%, rgba(103,102,253,.16), transparent 60%);
    background-repeat: no-repeat, no-repeat;
}

/* Remember Me on the left, Forgot your password on the right. The theme puts
   both inside .pull-left, and the float is already neutralised above, so make
   that wrapper the row. */
.sign_block .custom-form .pull-left {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
    margin-bottom: 18px;
}
.sign_block .custom-form .pull-left > .link,
.sign_block .custom-form .pull-left > a { margin-left: auto; white-space: nowrap; }
