/**
 * SBLMS Template — Base reset
 *
 * Minimal reset so component CSS has a clean slate.
 *
 * @package    tpl_sblms
 * @copyright  (C) 2025 Quadronet, https://www.quadronet.cz
 * @license    GPL-2.0-or-later
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #1a1f36;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
}

/* Hide Joomla system message container when empty */
#system-message-container:empty {
    display: none;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* ==========================================================================
   Login Page — Split layout
   ========================================================================== */

.sblms-login {
    display: flex;
    min-height: 100vh;
}

/* --- Brand panel (left) --- */

.sblms-login__brand {
    display: none;
    position: relative;
    width: 45%;
    background: linear-gradient(135deg, #1a2654 0%, #151f47 50%, #111a3a 100%);
    overflow: hidden;
}

.sblms-login__brand-bg {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    pointer-events: none;
}

.sblms-login__brand-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
}

.sblms-login__brand-blob--top {
    top: -5rem;
    right: -3rem;
    width: 20rem;
    height: 20rem;
    background: rgba(255, 255, 255, 0.25);
}

.sblms-login__brand-blob--bottom {
    bottom: -8rem;
    left: -5rem;
    width: 28rem;
    height: 28rem;
    background: rgba(255, 255, 255, 0.1);
}

.sblms-login__brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 3rem;
}

.sblms-login__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-bottom: 3rem;
}

.sblms-login__logo-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sblms-login__logo-icon span {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a2654;
}

.sblms-login__logo-text {
    font-size: 1.375rem;
    font-weight: 700;
    color: #fff;
}

.sblms-login__brand-text h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 1rem;
}

.sblms-login__brand-text p {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin: 0;
    max-width: 28rem;
}

.sblms-login__brand-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sblms-login__brand-stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
}

.sblms-login__brand-stat-label {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Form panel (right) --- */

.sblms-login__form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #f8f9fc;
    min-height: 100vh;
}

.sblms-login__form-panel--centered {
    width: 100%;
}

.sblms-login__mobile-logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
    margin-bottom: 2.5rem;
}

.sblms-login__logo-icon--dark {
    background: #1a2654;
}

.sblms-login__logo-icon--dark span {
    color: #fff;
}

.sblms-login__logo-text--dark {
    color: #1a2654;
}

.sblms-login__form-wrap {
    width: 100%;
    max-width: 400px;
}

.sblms-login__form-header {
    margin-bottom: 2rem;
}

.sblms-login__form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1f36;
    margin: 0 0 0.5rem;
}

.sblms-login__form-header p {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
}

/* --- Form fields --- */

.sblms-login__form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sblms-login__field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1a1f36;
    margin-bottom: 0.375rem;
}

.sblms-login__input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    color: #1a1f36;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.sblms-login__input::placeholder {
    color: #a0aec0;
}

.sblms-login__input:focus {
    border-color: #2d4a9e;
    box-shadow: 0 0 0 3px rgba(45, 74, 158, 0.12);
}

/* --- Remember me --- */

.sblms-login__remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sblms-login__checkbox {
    width: 1rem;
    height: 1rem;
    accent-color: #2d4a9e;
    margin: 0;
    cursor: pointer;
}

.sblms-login__remember label {
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
    margin: 0;
}

/* --- Buttons --- */

.sblms-login__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8125rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    text-decoration: none;
    line-height: 1.5;
}

.sblms-login__btn--primary {
    background: #1a2654;
    color: #fff;
}

.sblms-login__btn--primary:hover {
    background: #2d4a9e;
    box-shadow: 0 4px 12px rgba(26, 38, 84, 0.25);
}

.sblms-login__btn--secondary {
    background: #fff;
    color: #1a1f36;
    border: 1px solid #e2e8f0;
    margin-bottom: 0.5rem;
}

.sblms-login__btn--secondary:hover {
    background: #f1f5f9;
}

.sblms-login__btn svg {
    flex-shrink: 0;
}

/* --- Links below form --- */

.sblms-login__links {
    text-align: center;
    margin-top: 1.5rem;
}

.sblms-login__links a {
    font-size: 0.875rem;
    color: #2d4a9e;
    text-decoration: none;
    transition: color 0.2s;
}

.sblms-login__links a:hover {
    color: #1a2654;
    text-decoration: underline;
}

.sblms-login__back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    margin-top: 2rem;
    font-size: 0.875rem;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.sblms-login__back:hover {
    color: #1a1f36;
}

/* --- Joomla system messages inside login --- */

.sblms-login joomla-alert {
    max-width: 400px;
    margin: 0 auto 1rem;
}

/* --- Desktop: show brand panel --- */

@media (min-width: 1024px) {
    .sblms-login__brand {
        display: block;
    }

    .sblms-login__mobile-logo {
        display: none;
    }

    .sblms-login__form-panel {
        width: 55%;
        padding: 3rem;
    }
}
