/* ============================================
   Pulso CX - Modern UI System
   ============================================ */

/* === Base === */
body {
    background: #f1f5f9;
    min-height: 100vh;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
}

/* === Login — Dark split-screen 2026 === */
body.login-body {
    background: #050a18;
    overflow: hidden;
}

.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* --- Brand panel (left) --- */
.login-brand-panel {
    flex: 1;
    background: linear-gradient(160deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 3rem;
}

.login-brand-content {
    position: relative;
    z-index: 2;
    max-width: 420px;
    animation: fadeInUp 0.7s ease-out;
}

.login-brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.login-logo-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.login-brand-name {
    font-size: 2rem;
    font-weight: 800;
    color: #f1f5f9;
    letter-spacing: -0.5px;
    margin: 0;
}
.login-brand-name span {
    color: #818cf8;
}

.login-brand-tagline {
    font-size: 1.05rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

/* Features list */
.login-brand-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}
.login-feature:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateX(4px);
}

.login-feature-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.15);
    display: flex; align-items: center; justify-content: center;
    color: #818cf8; font-size: 0.85rem;
}

.login-feature-text strong {
    display: block;
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.login-feature-text span {
    color: #64748b;
    font-size: 0.78rem;
}

/* Animated orbs */
.login-brand-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
}
.login-orb-1 {
    width: 300px; height: 300px;
    background: #6366f1;
    top: -80px; right: -60px;
    animation: orbFloat1 12s ease-in-out infinite;
}
.login-orb-2 {
    width: 200px; height: 200px;
    background: #818cf8;
    bottom: 10%; left: -40px;
    animation: orbFloat2 15s ease-in-out infinite;
}
.login-orb-3 {
    width: 150px; height: 150px;
    background: #a78bfa;
    bottom: -40px; right: 30%;
    animation: orbFloat3 18s ease-in-out infinite;
}

@keyframes orbFloat1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-30px, 40px) scale(1.1); }
}
@keyframes orbFloat2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(25px, -35px) scale(0.9); }
}
@keyframes orbFloat3 {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, -25px); }
}

/* --- Form panel (right) --- */
.login-form-panel {
    width: 480px; min-width: 400px;
    background: #0b1120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    border-left: 1px solid rgba(99, 102, 241, 0.1);
}

.login-card {
    width: 100%;
    max-width: 380px;
    animation: fadeInUp 0.6s ease-out 0.15s both;
}

.login-card-header {
    margin-bottom: 2rem;
}

.login-mobile-logo {
    display: none;
    margin-bottom: 1.25rem;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: -0.4px;
    margin-bottom: 0.4rem;
}
.login-subtitle {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
}

/* Alerts */
.login-alert {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    animation: fadeInUp 0.3s ease;
}
.login-alert-error {
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: #fca5a5;
}
.login-alert-error i { color: #f87171; }
.login-alert-success {
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    color: #6ee7b7;
}
.login-alert-success i { color: #34d399; }

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-field { display: flex; flex-direction: column; gap: 0.4rem; }

.login-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.login-label i { font-size: 0.7rem; color: #475569; }

.login-input {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    font-size: 0.92rem;
    color: #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    width: 100%;
    font-family: 'Inter', sans-serif;
}
.login-input::placeholder { color: #475569; }
.login-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15), 0 0 20px rgba(99, 102, 241, 0.08);
    background: #1a2540;
}

.login-input-group {
    position: relative;
}
.login-input-group .login-input {
    padding-right: 3rem;
}

.login-toggle-pw {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #475569;
    cursor: pointer;
    font-size: 0.95rem;
    padding: 4px;
    transition: color 0.2s ease;
}
.login-toggle-pw:hover { color: #818cf8; }

/* Remember checkbox */
.login-options {
    display: flex;
    align-items: center;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

.login-remember input[type="checkbox"] {
    display: none;
}

.login-check-mark {
    width: 18px; height: 18px;
    border-radius: 5px;
    border: 1.5px solid #334155;
    background: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.login-remember input[type="checkbox"]:checked + .login-check-mark {
    background: #6366f1;
    border-color: #6366f1;
}
.login-remember input[type="checkbox"]:checked + .login-check-mark::after {
    content: '';
    width: 5px; height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    position: absolute;
    top: 2px;
}

/* Submit button */
.login-btn {
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    border: none;
    border-radius: 14px;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.2px;
    margin-top: 0.25rem;
}

.login-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}
.login-btn:hover::after { left: 100%; }

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.4);
}
.login-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

.login-btn i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}
.login-btn:hover i {
    transform: translateX(4px);
}

/* Footer */
.login-footer {
    text-align: center;
    color: #475569;
    font-size: 0.75rem;
    margin-top: 2rem;
    letter-spacing: 0.02em;
}

.login-footer a {
    color: #818cf8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
.login-footer a:hover {
    color: #a5b4fc;
}


/* ============================================
   NAVBAR
   ============================================ */
.navbar-top {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
    height: 56px; background: #0f172a;
    border-bottom: 1px solid #1e293b;
    display: flex; align-items: center;
}

.navbar-inner {
    width: 100%; padding: 0 1.25rem;
    display: flex; align-items: center; justify-content: space-between;
}

.navbar-logo {
    display: flex; align-items: center; gap: 0.6rem;
    text-decoration: none; color: #fff;
}

.logo-icon {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.95rem;
}

.logo-text {
    font-size: 1.1rem; font-weight: 700; color: #f1f5f9;
    letter-spacing: -0.3px;
}
.logo-accent { color: #818cf8; }

.navbar-right { display: flex; align-items: center; gap: 0.75rem; }

.navbar-user {
    display: flex; align-items: center; gap: 0.6rem;
    cursor: pointer; padding: 0.35rem 0.6rem;
    border-radius: 10px; transition: background 0.2s ease;
    position: relative;
}
.navbar-user:hover { background: #1e293b; }

.user-avatar {
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700;
}

.user-name { font-size: 0.85rem; font-weight: 500; color: #cbd5e1; }
.user-chevron { font-size: 0.6rem; color: #64748b; transition: transform 0.2s ease; }

.user-dropdown-menu {
    position: absolute; top: calc(100% + 0.5rem); right: 0;
    background: #1e293b; border: 1px solid #334155; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4); padding: 0.4rem;
    min-width: 200px; opacity: 0; visibility: hidden;
    transform: translateY(-8px); transition: all 0.2s ease; z-index: 1050;
}
.user-dropdown-menu.show {
    opacity: 1; visibility: visible; transform: translateY(0);
}

.dropdown-item-custom {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.55rem 0.85rem; border-radius: 8px;
    font-size: 0.84rem; color: #cbd5e1; text-decoration: none;
    transition: all 0.15s ease;
}
.dropdown-item-custom:hover { background: #334155; color: #f1f5f9; }
.dropdown-item-custom.logout { color: #f87171; }
.dropdown-item-custom.logout:hover { background: rgba(239,68,68,0.1); color: #fca5a5; }
.dropdown-item-custom i { width: 16px; text-align: center; font-size: 0.82rem; }
.dropdown-divider-custom { height: 1px; background: #334155; margin: 0.3rem 0; }


/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: 230px; min-width: 230px;
    background: #0f172a;
    border-right: 1px solid #1e293b;
    position: fixed; top: 56px; left: 0; bottom: 0;
    overflow-y: auto; z-index: 1020;
    padding: 1.25rem 0.75rem;
}

.sidebar-section-title {
    font-size: 0.65rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.08em; color: #475569;
    padding: 0.5rem 0.75rem 0.4rem; margin-bottom: 0.15rem;
}

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }

.sidebar-link {
    display: flex; align-items: center; gap: 0.65rem;
    padding: 0.6rem 0.75rem; border-radius: 10px;
    color: #94a3b8; text-decoration: none;
    font-size: 0.85rem; font-weight: 500;
    transition: all 0.2s ease;
}
.sidebar-link:hover { background: #1e293b; color: #e2e8f0; }
.sidebar-link.active {
    background: linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(129,140,248,0.1) 100%);
    color: #a5b4fc;
}

.sidebar-icon {
    width: 32px; height: 32px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem; flex-shrink: 0;
    background: #1e293b; color: #64748b;
    transition: all 0.2s ease;
}
.sidebar-link:hover .sidebar-icon { background: #334155; color: #a5b4fc; }
.sidebar-link.active .sidebar-icon {
    background: #6366f1; color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}


/* ============================================
   LAYOUT
   ============================================ */
.layout-wrapper {
    display: flex; margin-top: 56px;
    min-height: calc(100vh - 56px);
    position: relative;
}

.main-content {
    padding: 1.75rem 2rem;
    background-color: #f8fafc;
    flex: 1; min-height: calc(100vh - 56px);
    overflow-y: auto; margin-left: 230px;
}


/* ============================================
   BREADCRUMB (clear Bootstrap defaults)
   ============================================ */
.breadcrumb { background: none; padding: 0; margin: 0; }


/* ============================================
   ALERTS (app-wide defaults)
   ============================================ */
.alert { border-radius: 10px; border: none; font-size: 0.88rem; }


/* ============================================
   USER DROPDOWN (Bootstrap compat removed)
   ============================================ */
.user-dropdown .dropdown-toggle::after { margin-left: 0.5rem; }


/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .login-brand-panel { display: none; }
    .login-form-panel {
        width: 100%; min-width: 0;
        border-left: none;
        background: linear-gradient(160deg, #0b1120 0%, #0f172a 100%);
    }
    .login-mobile-logo { display: flex !important; }
}

@media (max-width: 768px) {
    .sidebar {
        left: -230px; transition: left 0.3s ease;
    }
    .sidebar.show { left: 0; }

    .main-content { margin-left: 0; }

    .user-name { display: none; }

    .login-form-panel { padding: 2rem 1.5rem; }
    .login-card { max-width: 100%; }
    .login-title { font-size: 1.5rem; }
}

/* ============================================
   APP FOOTER
   ============================================ */
.app-footer {
    margin-top: 2.5rem;
    padding: 1rem 0 0;
    border-top: 1px solid #e2e8f0;
}

.app-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0.5rem;
}

.app-footer-copy {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 400;
}

.app-footer-copy a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
.app-footer-copy a:hover {
    color: #818cf8;
}

.app-footer-version {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

.app-footer-version span {
    color: #64748b;
    font-weight: 400;
}


/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.5s ease-out; }
