/* Professional Auth Layout - LIOSCare Portal */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f8fafc;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}

.auth-topbar {
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.auth-brand .brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.auth-brand .brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auth-brand strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    color: #1e293b;
}

.auth-brand span {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.2rem;
    letter-spacing: 0.02em;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-footer {
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
}

.auth-footer-links {
    display: flex;
    gap: 1.5rem;
}

.auth-footer a {
    color: #475569;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: #2563eb;
}

/* Login Page */
.login-wrap {
    width: 100%;
    max-width: 1100px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}

.login-hero {
    padding: 1rem;
}

.login-hero .brand.big {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.login-hero .brand.big .brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.login-hero .brand.big .brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-hero .brand.big strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: #1e293b;
}

.login-hero .brand.big span {
    display: block;
    font-size: 0.85rem;
    color: #64748b;
}

.login-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.login-hero p {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 90%;
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.hero-grid div {
    background: rgba(255,255,255,0.7);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-grid div::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #10b981;
    color: #fff;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.login-panel {
    display: flex;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
}

.login-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: #0f172a;
}

.login-card > p {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-card label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.login-card input[type="text"],
.login-card input[type="password"],
.login-card input[type="email"] {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #fff;
    color: #111827;
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 1.1rem;
}

.login-card input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-card .check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 1.25rem;
    cursor: pointer;
}

.login-card .check input {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    margin: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn.w-100 {
    width: 100%;
}

.validation {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.validation.validation-summary-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.validation.validation-summary-errors ul {
    margin: 0;
    padding-left: 1.25rem;
}

.demo {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

.demo b {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.demo span {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    font-family: 'SF Mono', monospace;
    margin-bottom: 0.25rem;
}

/* Error Page */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
}

.error-card {
    background: #fff;
    border-radius: 16px;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    border: 1px solid #e2e8f0;
    max-width: 520px;
    width: 100%;
}

.error-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fef3c7;
    color: #d97706;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.error-content h2 {
    color: #0f172a;
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    font-weight: 700;
}

.error-content p {
    color: #64748b;
    margin-bottom: 1.75rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.error-code {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-family: 'SF Mono', monospace;
    font-size: 0.75rem;
    margin-bottom: 1.5rem;
}

.error-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    padding: 1rem;
}

.modal-content {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.modal-body {
    padding: 1.5rem;
    color: #475569;
    font-size: 0.95rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

/* Responsive */
@media (max-width: 900px) {
    .login-wrap {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .login-hero {
        text-align: center;
        order: 1;
    }

    .login-hero h1 {
        font-size: 1.8rem;
    }

    .login-hero p {
        max-width: 100%;
    }

    .login-panel {
        order: 2;
    }

    .hero-grid {
        max-width: 420px;
        margin: 0 auto;
    }

    .auth-footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

@media (max-width: 520px) {
    .auth-topbar {
        padding: 1rem;
    }

    .login-card {
        padding: 1.75rem;
    }

    .error-card {
        padding: 2rem;
    }
}
