/* Lifesoftw Partner - Estilos principales */
:root {
    --primary: #1ed0d5;
    --primary-dark: #07ADAD;
    --text: #535454;
    --white: #FFFFFF;
    --sidebar-width: 260px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: #f4f7f8;
    margin: 0;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }

/* Login */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 1rem;
}

.auth-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 200px;
    min-height: 52px;
    margin: 0 auto 0.85rem;
}

.auth-logo-img {
    max-height: 52px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    margin: 0;
}

.auth-logo h1 {
    color: var(--primary-dark);
    font-size: 1.75rem;
    margin: 0;
}

.auth-logo p {
    color: var(--text);
    opacity: 0.7;
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
}

.auth-logo small {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    line-height: 1.35;
}

.btn-primary-custom {
    background: var(--primary);
    border: none;
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    width: 100%;
    transition: background 0.2s;
}

.btn-primary-custom:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(30, 208, 213, 0.25);
}

/* Layout app */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #2d3436 0%, #1e2729 100%);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s;
}

.sidebar-brand {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand h2 {
    font-size: 1.25rem;
    margin: 0;
    color: var(--primary);
}

.sidebar-brand small {
    opacity: 0.6;
    font-size: 0.75rem;
}

.sidebar-nav {
    padding: 1rem 0;
    list-style: none;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.75);
    transition: all 0.2s;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    background: rgba(30, 208, 213, 0.15);
    color: var(--primary);
}

.sidebar-nav .nav-section {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.4;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
}

.topbar {
    background: var(--white);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-content {
    padding: 1.5rem;
}

/* Stats cards */
.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    opacity: 0.7;
    margin-top: 0.25rem;
}

.stat-card.success { border-left-color: #28a745; }
.stat-card.warning { border-left-color: #ffc107; }
.stat-card.info { border-left-color: var(--primary); }

/* Cards */
.card-custom {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: none;
}

.card-custom .card-header {
    background: transparent;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* Badges */
.badge-status {
    padding: 0.35em 0.75em;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-activo { background: #d4edda; color: #155724; }
.badge-pendiente { background: #fff3cd; color: #856404; }
.badge-inactivo { background: #f8d7da; color: #721c24; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.welcome-banner h3 { margin: 0; }
.welcome-banner p { margin: 0.5rem 0 0; opacity: 0.9; }

/* Product cards */
.product-card { overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.product-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

.product-img { height: 160px; object-fit: cover; }
.product-img-lg { max-height: 280px; object-fit: cover; }

.product-img-placeholder {
    height: 160px;
    background: linear-gradient(135deg, #e8fafa 0%, #d0f0f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary-dark);
    opacity: 0.5;
}
.product-img-placeholder.lg { height: 280px; font-size: 5rem; }

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.commission-tag {
    background: rgba(30, 208, 213, 0.15);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.commission-box {
    background: #f0fdfd;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

/* Followup timeline */
.followup-timeline { position: relative; padding-left: 1rem; }
.followup-item {
    border-left: 3px solid var(--primary);
    padding: 0 0 1.25rem 1.25rem;
    margin-left: 0.5rem;
    position: relative;
}
.followup-item::before {
    content: '';
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    left: -7px;
    top: 4px;
}
.followup-item:last-child { padding-bottom: 0; }
.followup-date { font-size: 0.8rem; color: #888; margin-bottom: 0.25rem; }
.followup-content { background: #f8fafa; border-radius: 8px; padding: 0.75rem 1rem; }
