/**
 * Pine Training Academy CRM
 * LeadCRM 1.1 Stylesheet
 */

:root {
    --pine-primary: #0284c7;
    --pine-primary-dark: #0369a1;
    --pine-primary-light: #e0f2fe;
    --pine-secondary: #0f172a;
    --pine-accent: #0d9488;
    --pine-success: #10b981;
    --pine-warning: #f59e0b;
    --pine-danger: #ef4444;
    --pine-info: #3b82f6;
    --pine-body-bg: #f8fafc;
    --pine-sidebar-bg: #0f172a;
    --pine-sidebar-hover: #1e293b;
    --pine-sidebar-text: #94a3b8;
    --pine-sidebar-active: #38bdf8;
    --pine-card-border: #e2e8f0;
    --pine-card-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--pine-body-bg);
    color: #334155;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout Structure */
.app-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styles */
.app-sidebar {
    width: 260px;
    background-color: var(--pine-sidebar-bg);
    color: var(--pine-sidebar-text);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.sidebar-brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0284c7, #0d9488);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0.75rem;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    padding: 0.75rem 0.75rem 0.25rem;
    font-weight: 600;
}

.sidebar-item {
    margin-bottom: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: var(--pine-sidebar-text);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.885rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-link:hover {
    color: #ffffff;
    background-color: var(--pine-sidebar-hover);
}

.sidebar-link.active {
    color: #ffffff;
    background: linear-gradient(90deg, rgba(2, 132, 199, 0.25), rgba(13, 148, 136, 0.15));
    border-left: 3px solid var(--pine-sidebar-active);
    font-weight: 600;
}

.sidebar-link.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.78rem;
    color: #64748b;
}

/* App Main Area */
.app-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Navigation Bar */
.app-topnav {
    background-color: #ffffff;
    height: 64px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--pine-card-border);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--pine-primary-light);
    color: var(--pine-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Page Content Body */
.app-content {
    padding: 1.5rem;
    flex-grow: 1;
}

/* Pine Cards */
.card-pine {
    background: #ffffff;
    border: 1px solid var(--pine-card-border);
    border-radius: 10px;
    box-shadow: var(--pine-card-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.card-pine-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--pine-card-border);
    background-color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    border-radius: 10px 10px 0 0;
}

/* Stat Cards */
.stat-card {
    padding: 1.25rem;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid var(--pine-card-border);
    box-shadow: var(--pine-card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

/* Lifecycle flow visualization */
.lifecycle-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.lifecycle-step {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background-color: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.lifecycle-step.active {
    background-color: var(--pine-primary-light);
    color: var(--pine-primary-dark);
    border: 1px solid rgba(2, 132, 199, 0.3);
}

.lifecycle-arrow {
    color: #cbd5e1;
    font-size: 0.75rem;
}

/* Auth Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.auth-header {
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}

.auth-body {
    padding: 0 2rem 2rem;
}

/* Loading Overlay */
.pine-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: -260px;
        height: 100vh;
    }
    .app-sidebar.show {
        left: 0;
    }
}
