/* CarePlus HMS — Public / Auth Pages */

:root {
    --pub-primary: #4f46e5;
    --pub-primary-dark: #4338ca;
    --pub-accent: #0d9488;
    --pub-dark: #0f172a;
    --pub-muted: #64748b;
    --pub-bg: #f8fafc;
    --pub-radius: 16px;
}

body.public-app {
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    background: var(--pub-bg);
    color: #1e293b;
    min-height: 100vh;
}

/* Navbar */
.public-navbar {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
    padding: 0.65rem 0;
}

.public-navbar .navbar-brand {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--pub-dark) !important;
}

.public-navbar .brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--pub-primary), #6366f1);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
}

.public-navbar .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    color: #475569 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
}

.public-navbar .nav-link:hover {
    color: var(--pub-primary) !important;
    background: rgba(79, 70, 229, 0.06);
}

.btn-pub-primary {
    background: linear-gradient(135deg, var(--pub-primary), #6366f1);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1.25rem;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-pub-primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

.btn-pub-outline {
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.55rem 1.25rem;
}

.btn-pub-outline:hover {
    border-color: var(--pub-primary);
    color: var(--pub-primary);
    background: rgba(79, 70, 229, 0.04);
}

.btn-pub-accent {
    background: linear-gradient(135deg, var(--pub-accent), #14b8a6);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.3);
}

.btn-pub-accent:hover { color: #fff; }

/* Hero */
.hero-section {
    position: relative;
    padding: 4rem 0 5rem;
    overflow: hidden;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -20%;
    width: 70%;
    height: 140%;
    background: radial-gradient(ellipse, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: rgba(79, 70, 229, 0.08);
    color: var(--pub-primary);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 1.25rem;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--pub-dark);
    margin-bottom: 1.25rem;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--pub-primary), var(--pub-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-lead {
    font-size: 1.1rem;
    color: var(--pub-muted);
    line-height: 1.65;
    max-width: 540px;
    margin-bottom: 2rem;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--pub-muted);
}

.hero-trust span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Stats card on hero */
.hero-stats-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.hero-stat-item {
    padding: 1rem;
    border-radius: 14px;
    height: 100%;
    transition: transform 0.2s;
}

.hero-stat-item:hover { transform: translateY(-2px); }

.hero-stat-item.indigo { background: linear-gradient(135deg, rgba(79,70,229,0.08), rgba(99,102,241,0.04)); }
.hero-stat-item.green { background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(16,185,129,0.04)); }
.hero-stat-item.amber { background: linear-gradient(135deg, rgba(245,158,11,0.08), rgba(251,191,36,0.04)); }
.hero-stat-item.red { background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(248,113,113,0.04)); }

.hero-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    margin: 0.35rem 0;
}

/* Feature cards */
.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--pub-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--pub-muted);
    margin-bottom: 2.5rem;
}

.feature-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--pub-radius);
    padding: 1.75rem;
    height: 100%;
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}

.feature-card:hover {
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    transform: translateY(-4px);
    border-color: rgba(79, 70, 229, 0.2);
}

.feature-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.feature-icon.indigo { background: rgba(79,70,229,0.1); color: var(--pub-primary); }
.feature-icon.green { background: rgba(34,197,94,0.1); color: #16a34a; }
.feature-icon.teal { background: rgba(13,148,136,0.1); color: var(--pub-accent); }

.dept-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--pub-radius);
    padding: 1.35rem;
    height: 100%;
    transition: all 0.2s;
}

.dept-card:hover {
    border-color: var(--pub-primary);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
}

/* CTA section */
.cta-section {
    background: linear-gradient(135deg, var(--pub-dark) 0%, #1e293b 100%);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    color: #fff;
    margin: 3rem 0;
}

.cta-section h3 { font-weight: 800; margin-bottom: 0.75rem; }
.cta-section p { opacity: 0.85; margin-bottom: 1.5rem; }

/* Auth pages */
.auth-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    padding: 2rem 0 3rem;
}

.auth-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 580px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.12);
    background: #fff;
}

.auth-split-panel {
    padding: 2.5rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-split-brand {
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.auth-split-brand::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 100%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
}

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

.auth-form-card {
    max-width: 420px;
    margin: 0 auto;
    width: 100%;
}

.auth-form-card h2 {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--pub-dark);
    margin-bottom: 0.35rem;
}

.auth-form-card .auth-subtitle {
    color: var(--pub-muted);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

.auth-form-card .form-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
}

.auth-form-card .form-control,
.auth-form-card .form-select {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    background: #f8fafc;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form-card .form-control:focus,
.auth-form-card .form-select:focus {
    border-color: var(--pub-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.auth-input-group {
    position: relative;
}

.auth-input-group .input-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1rem;
    pointer-events: none;
}

.auth-input-group .form-control {
    padding-left: 2.5rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.78rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.public-footer {
    background: #fff;
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem 0;
    font-size: 0.82rem;
    color: var(--pub-muted);
}

@media (max-width: 991.98px) {
    .auth-split { grid-template-columns: 1fr; }
    .auth-split-brand { display: none; }
    .auth-split-panel { padding: 2rem 1.5rem; }
    .hero-section { padding: 2.5rem 0 3rem; }
}
