:root {
    --auth-primary: #0b1f3a;
    --auth-primary-dark: #061326;
    --auth-accent: #2563eb;
    --auth-accent-soft: #dbeafe;
    --auth-bg: #f4f7fb;
    --auth-surface: #ffffff;
    --auth-text: #111827;
    --auth-muted: #64748b;
    --auth-border: #d8e0ea;
    --auth-success: #16a34a;
    --auth-warning: #f59e0b;
    --auth-danger: #dc2626;
    --auth-radius: 8px;
    --auth-shadow: 0 22px 55px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.auth-modern {
    margin: 0;
    min-height: 100vh;
    color: var(--auth-text);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(11, 31, 58, 0.02) 42%, rgba(22, 163, 74, 0.05)),
        var(--auth-bg);
    font-family: var(--aniel-font-sans);
    letter-spacing: 0;
}

body.auth-modern a {
    color: var(--auth-accent);
    text-decoration: none;
}

body.auth-modern a:hover,
body.auth-modern a:focus {
    color: var(--auth-primary);
    text-decoration: none;
}

.auth-page {
    min-height: 100vh;
    width: 100%;
    padding: 32px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-reset-page .auth-page {
    min-height: calc(100vh - 82px);
}

.auth-shell {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1fr);
    gap: 24px;
    align-items: stretch;
}

.auth-shell.auth-shell-wide {
    width: min(1220px, 100%);
    grid-template-columns: minmax(300px, 0.75fr) minmax(520px, 1.25fr);
}

.auth-shell.auth-shell-centered {
    width: min(960px, 100%);
}

.auth-brand-panel,
.auth-card,
.form-inner {
    border-radius: var(--auth-radius);
}

.auth-brand-panel {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    padding: 38px;
    color: #ffffff;
    background: var(--auth-primary);
    box-shadow: var(--auth-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-brand-panel:before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(37, 99, 235, 0.25), transparent 46%),
        linear-gradient(0deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.auth-brand-panel > * {
    position: relative;
    z-index: 1;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0;
}

.auth-logo-mark {
    width: 42px;
    height: 42px;
    border-radius: var(--auth-radius);
    background-color: #ffffff;
    background-image: url("../icons/icon-192x192.png?v=1783260416");
    background-position: center;
    background-repeat: no-repeat;
    background-size: 78%;
    color: transparent !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
    flex: 0 0 auto;
    overflow: hidden;
    text-indent: -999px;
    text-shadow: none !important;
}

.auth-brand-copy {
    margin-top: 52px;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    margin-bottom: 18px;
    padding: 7px 11px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.auth-brand-panel h1 {
    margin: 0 0 16px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1.18;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-brand-panel p {
    max-width: 430px;
    margin: 0;
    color: #dbeafe;
    font-size: 16px;
    line-height: 1.7;
}

.auth-benefits {
    display: grid;
    gap: 12px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.auth-benefits li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eef6ff;
    font-size: 14px;
}

.auth-benefits i {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.75);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex: 0 0 auto;
}

.auth-panel-foot {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 36px;
}

.auth-stat {
    padding: 14px;
    border-radius: var(--auth-radius);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-stat strong {
    display: block;
    color: #ffffff;
    font-size: 18px;
    line-height: 1.2;
}

.auth-stat span {
    display: block;
    margin-top: 5px;
    color: #cbd5e1;
    font-size: 12px;
}

.auth-card,
.form-inner,
.card.auth-card {
    width: 100%;
    min-width: 0;
    padding: 38px;
    background: var(--auth-surface);
    border: 1px solid rgba(216, 224, 234, 0.9);
    box-shadow: var(--auth-shadow);
}

.auth-card {
    align-self: center;
}

.auth-card.auth-card-tall {
    align-self: stretch;
}

.auth-card-logo,
.logo {
    margin-bottom: 24px;
    text-align: left;
}

.auth-card-logo img,
.logo img {
    max-height: 48px;
    max-width: 210px;
    object-fit: contain;
}

.auth-card-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--auth-primary);
    font-weight: 800;
    font-size: 17px;
}

.auth-heading {
    margin-bottom: 26px;
    text-align: left;
}

.auth-heading h1,
.auth-heading h2,
.auth-heading h3 {
    margin: 0 0 8px;
    color: var(--auth-text);
    font-size: 26px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.65;
}

.auth-alert,
.auth-modern .alert {
    border-radius: var(--auth-radius);
    border: 1px solid transparent;
    font-size: 14px;
    line-height: 1.5;
}

.auth-modern .alert-danger {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.auth-modern .alert-success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.auth-modern .alert-info {
    color: #075985;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.auth-modern form {
    width: 100%;
}

.form-group-material,
.auth-modern .form-group {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.auth-modern label,
.auth-modern .label-material {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
}

.form-group-material .label-material {
    position: static;
    order: -1;
    pointer-events: auto;
}

.auth-field-icon {
    position: absolute;
    left: 14px;
    top: 38px;
    width: 18px;
    color: #94a3b8;
    text-align: center;
    z-index: 2;
}

.auth-field-icon + .form-control,
.auth-field-icon + .input-material {
    padding-left: 42px;
}

.auth-modern .form-control,
.auth-modern .input-material,
.auth-modern input[type="email"],
.auth-modern input[type="password"],
.auth-modern input[type="text"],
.auth-modern input[type="tel"],
.auth-modern select,
.auth-modern textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    background: #ffffff;
    color: var(--auth-text);
    font-size: 14px;
    line-height: 1.5;
    padding: 11px 14px;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-modern textarea {
    min-height: 92px;
    resize: vertical;
}

.auth-modern .form-control:focus,
.auth-modern .input-material:focus,
.auth-modern input[type="email"]:focus,
.auth-modern input[type="password"]:focus,
.auth-modern input[type="text"]:focus,
.auth-modern input[type="tel"]:focus,
.auth-modern select:focus,
.auth-modern textarea:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: 0;
}

.auth-modern .is-invalid,
.auth-modern .form-control.is-invalid {
    border-color: var(--auth-danger);
}

.auth-modern .invalid-feedback,
.auth-modern .text-danger,
.auth-modern .help-block {
    color: var(--auth-danger) !important;
    font-size: 12px;
}

.auth-modern select.form-control {
    height: 46px;
}

.auth-modern .btn,
.auth-modern button[type="submit"],
.auth-modern input[type="submit"] {
    border-radius: var(--auth-radius);
    min-height: 46px;
    padding: 11px 18px;
    border: 1px solid transparent;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0;
    box-shadow: none;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.auth-modern .btn:hover,
.auth-modern button[type="submit"]:hover,
.auth-modern input[type="submit"]:hover {
    transform: translateY(-1px);
}

.auth-modern .btn:focus,
.auth-modern button[type="submit"]:focus,
.auth-modern input[type="submit"]:focus {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
    outline: 0;
}

.auth-modern .btn-primary,
.auth-modern input[type="submit"].btn-primary {
    color: #ffffff;
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-modern .btn-primary:hover,
.auth-modern input[type="submit"].btn-primary:hover {
    color: #ffffff;
    background: var(--auth-primary-dark);
    border-color: var(--auth-primary-dark);
    box-shadow: 0 14px 26px rgba(11, 31, 58, 0.22);
}

.auth-modern .btn-secondary {
    color: var(--auth-primary);
    background: #f8fafc;
    border-color: var(--auth-border);
}

.auth-modern .btn-outline-primary {
    color: var(--auth-primary);
    background: #ffffff;
    border-color: var(--auth-border);
}

.auth-modern .btn-outline-primary:hover,
.auth-modern .btn-secondary:hover {
    color: #ffffff;
    background: var(--auth-accent);
    border-color: var(--auth-accent);
}

.btn.login-btn,
.auth-modern .login-btn {
    width: 100%;
    margin-top: 4px;
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    row-gap: 0;
}

.auth-form-grid .full-width,
.auth-form-grid .auth-field-full,
.auth-form-grid .customer-section,
.auth-form-grid #customer-section {
    grid-column: 1 / -1;
}

.auth-section-title {
    grid-column: 1 / -1;
    margin: 10px 0 16px;
    color: var(--auth-primary);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.demo-login-group {
    margin-top: 22px;
    padding: 16px;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    background: #f8fafc;
}

.demo-login-group p {
    margin: 0 0 12px;
    color: var(--auth-muted);
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    text-transform: uppercase;
}

.demo-login-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.demo-login-actions .btn {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 13px;
    white-space: nowrap;
}

.auth-links {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    color: var(--auth-muted);
    font-size: 14px;
}

.auth-links .not-registered {
    color: var(--auth-muted);
}

.auth-divider {
    height: 1px;
    margin: 24px 0;
    background: var(--auth-border);
}

.auth-footer-note,
.copyrights {
    margin-top: 22px;
    color: var(--auth-muted);
    font-size: 12px;
    text-align: center;
}

.auth-modern .badge {
    border-radius: 999px;
    padding: 7px 10px;
    font-weight: 800;
}

.auth-modern .badge-primary {
    background: var(--auth-accent);
}

.auth-modern .custom-control-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--auth-muted);
}

.auth-modern input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--auth-accent);
}

.auth-modern .navbar-laravel {
    background: rgba(255, 255, 255, 0.92) !important;
    border-bottom: 1px solid var(--auth-border);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06) !important;
}

.auth-modern .navbar-brand {
    color: var(--auth-primary) !important;
    font-weight: 900;
    letter-spacing: 0;
}

.auth-modern .navbar-light .navbar-nav .nav-link {
    color: var(--auth-muted);
    font-weight: 700;
}

.auth-modern .navbar-light .navbar-nav .nav-link:hover {
    color: var(--auth-accent);
}

.tenant-signup-page .auth-shell {
    grid-template-columns: minmax(300px, 0.75fr) minmax(540px, 1.25fr);
}

.tenant-signup-page .auth-card {
    align-self: center;
}

.tenant-signup-page .auth-card .row {
    margin-left: 0;
    margin-right: 0;
}

.tenant-signup-page .auth-card [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

.auth-plan-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--auth-primary);
    background: var(--auth-accent-soft);
    font-size: 12px;
    font-weight: 800;
}

.auth-signup-form .custom-control {
    grid-column: 1 / -1;
    margin: 4px 0 18px;
}

@media (max-width: 991.98px) {
    .auth-page {
        padding: 24px 16px;
    }

    .auth-shell,
    .auth-shell.auth-shell-wide,
    .tenant-signup-page .auth-shell {
        grid-template-columns: 1fr;
        max-width: 620px;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 28px;
    }

    .auth-brand-copy {
        margin-top: 34px;
    }

    .auth-panel-foot {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .auth-page {
        min-height: 100vh;
        padding: 16px;
    }

    .auth-brand-panel {
        display: none;
    }

    .auth-card,
    .form-inner,
    .card.auth-card {
        padding: 24px;
    }

    .auth-heading h1,
    .auth-heading h2,
    .auth-heading h3 {
        font-size: 23px;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
    }

    .demo-login-actions {
        grid-template-columns: 1fr;
    }

    .auth-links {
        display: grid;
        justify-content: stretch;
    }
}

/* Refined AnielPro entry screens */
:root {
    --aniel-font-sans: "Google Sans", "Inter", "Segoe UI", Arial, sans-serif;
}

body.auth-modern {
    background:
        linear-gradient(135deg, rgba(20, 31, 52, 0.06), rgba(255, 255, 255, 0) 42%),
        linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
}

body.auth-modern .auth-shell.auth-shell-centered {
    width: min(1040px, 100%);
    grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 0.82fr);
}

body.auth-modern .auth-command-panel {
    min-height: 560px;
    background:
        linear-gradient(145deg, rgba(45, 70, 104, 0.96), rgba(16, 31, 55, 0.98)),
        #142034;
    box-shadow: 0 24px 70px rgba(20, 31, 52, 0.18);
}

body.auth-modern .auth-command-panel:before {
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.13), transparent 42%),
        linear-gradient(20deg, rgba(69, 179, 157, 0.2), transparent 54%);
}

body.auth-modern .auth-card,
body.auth-modern .form-inner {
    border: 1px solid rgba(209, 216, 226, 0.9);
    box-shadow: 0 22px 60px rgba(20, 31, 52, 0.12);
}

body.auth-modern .auth-logo-mark {
    border-radius: 8px;
    background-color: #ffffff !important;
    background-image: url("../icons/icon-192x192.png?v=1783260416") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 78% !important;
    color: transparent !important;
}

body.auth-modern .auth-card .auth-logo-mark {
    background-color: #ffffff !important;
    background-image: url("../icons/icon-192x192.png?v=1783260416") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 78% !important;
    color: transparent !important;
    box-shadow: none;
}

body.auth-modern .auth-kicker {
    border-radius: 8px;
    color: #d9f5ef;
    background: rgba(255, 255, 255, 0.1);
    text-transform: none;
}

body.auth-modern .auth-brand-panel h1 {
    max-width: 520px;
    font-size: 32px;
}

body.auth-modern .auth-brand-panel p {
    color: #d7e1ee;
}

body.auth-modern .auth-stat {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.11);
}

body.auth-modern .auth-card {
    align-self: center;
}

body.auth-modern .auth-heading h1 {
    font-size: 28px;
}

body.auth-modern .input-material,
body.auth-modern .form-control {
    border-radius: 8px;
    background: #f9fbfd;
}

body.auth-modern .btn-primary,
body.auth-modern .login-btn {
    border-radius: 8px;
    background: #142034;
    border-color: #142034;
}

body.auth-modern .btn-primary:hover,
body.auth-modern .login-btn:hover {
    background: #263b5a;
    border-color: #263b5a;
}

body.auth-modern .auth-links {
    align-items: center;
}

@media (max-width: 991.98px) {
    body.auth-modern .auth-shell.auth-shell-centered {
        grid-template-columns: 1fr;
    }

    body.auth-modern .auth-command-panel {
        min-height: auto;
    }
}
