/* * Ruff Greens BI Dashboard - Main Stylesheet
 * Version 16.1.2 - Added Login & Admin Styles
 */

/* --- 1. Utilities & Resets --- */
body {
    background-color: #f1f5f9;
    color: #0f172a;
    font-family: "Mulish", ui-sans-serif, system-ui, sans-serif;
}

[v-cloak] {
    display: none !important;
}

/* --- 2. Login Page Specifics --- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: rgb(2, 64, 18); /* Brand Dark Green */
    background-image: linear-gradient(135deg, rgba(255,255,255,0.05) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.05) 50%, rgba(255,255,255,0.05) 75%, transparent 75%, transparent);
    background-size: 40px 40px;
}

.login-container {
    background: white;
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    border-radius: 1.5rem;
   
    text-align: center;
}

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

.login-logo {
    height: 5.5rem;
    width: auto;
    margin: 0 auto 1rem;
    border-radius: 0.5rem;
}

.login-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: rgb(2, 64, 18);
    text-transform: uppercase;
    letter-spacing: -0.025em;
}

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

.login-error {
    background-color: #fef2f2;
    color: #991b1b;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    border: 1px solid #fecaca;
    text-align: left;
}

.login-group {
    text-align: left;
}

.login-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 900;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.login-group input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    font-weight: 700;
    color: #334155;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box; /* Fix for padding causing overflow */
}

.login-group input:focus {
    border-color: rgb(2, 64, 18);
}

.login-btn {
    background-color: rgb(2, 64, 18);
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: opacity 0.2s;
    border: none;
    margin-top: 0.5rem;
}

.login-btn:hover {
    opacity: 0.9;
}

.login-footer {
    margin-top: 2rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* --- 3. Layout --- */
.main-content {
    padding: 1rem;
}

@media (min-width: 768px) {
    .main-content {
        padding: 2rem;
    }
}

.sticky-col {
    position: sticky;
    left: 0;
    background: white;
    z-index: 10;
  
}

/* --- 4. Header & Navigation --- */
.global-header {
    height: 5rem;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 2rem;
    padding-right: 2rem;
    position: sticky;
    top: 0;
    z-index: 30;
   
}

.header-title {
    font-weight: 900;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: -0.025em;
    font-size: 1.25rem;
}

.header-date-badge {
    padding: 0.125rem 0.5rem;
    background-color: #f0fdf4;
    color: rgb(2, 64, 18);
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 0.25rem;
    text-transform: uppercase;
}

/* --- 5. Sidebar --- */
.sidebar-container {
    width: 16rem;
    background-color: rgb(2, 64, 18);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 40;
    
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgb(2, 64, 18);
}

.sidebar-logo {
    height: 3.4rem;
    width: auto;
    border-radius: 0.5rem;
    margin-bottom: 0px;
}

.sidebar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-app-name {
    display: none;
    font-size: 0.625rem;
    text-transform: uppercase;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.1em;
}

.sidebar-version {
    font-size: 0.5625rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    border-radius: 1rem;
    border-left-width: 4px;
    transition: all 0.2s;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.nav-item.active {
    background-color: #ffffff;
    color: rgb(2, 64, 18);
    
    border-color: transparent;
}

.nav-item.inactive {
    color: rgba(255, 255, 255, 0.7);
    background-color: transparent;
    border-color: transparent;
}

.nav-item.inactive:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-icon {
    width: 1.25rem;
    text-align: center;
    font-size: 1.125rem;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    background-color: rgba(0, 0, 0, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.75rem;
}

.user-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
}

.user-role {
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.6);
}

/* --- 6. Cards & Containers --- */
.dashboard-card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
   
}

.kpi-card-sm {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
  
}

.kpi-card-lg {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    
}

.chart-container {
    position: relative;
    height: 320px;
    width: 100%;
}

.hist-chart-container {
    position: relative;
    height: 220px;
    width: 100%;
}

/* --- 7. Controls & Inputs --- */
.control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.5);
    padding: 1rem;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    backdrop-filter: blur(4px);
    margin-bottom: 2rem;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(241, 245, 249, 0.5);
    padding: 0.25rem;
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
}

.select-input {
    background-color: #ffffff;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 900;
    outline: none;
    color: #334155;
    cursor: pointer;
   
}

.date-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.date-label {
    font-size: 0.56rem;
    text-transform: uppercase;
    font-weight: 900;
    color: #94a3b8;
    line-height: 1;
    margin-bottom: 0.125rem;
}

.date-field {
    background-color: transparent;
    border: none;
    font-size: 0.85rem;
    font-weight: 900;
    outline: none;
    padding: 0;
    width: 7rem;
    color: #15803d;
}

.btn-icon {
    background-color: rgb(2, 64, 18);
    color: #ffffff;
    width: 2rem;
    height: 2rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    
    transition: transform 0.1s;
}

.btn-icon:hover {
    background-color: #15803d;
}

.btn-icon:active {
    transform: scale(0.95);
}

/* --- 8. Tables --- */
.table-container {
    background-color: #ffffff;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.data-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
}

.data-table th {
    padding: 1rem 2rem;
    cursor: pointer;
    transition: color 0.15s;
}

.data-table th:hover {
    color: rgb(2, 64, 18);
}

.data-table td {
    padding: 1rem 1.2rem;
}

.table-header-row {
    background-color: rgba(248, 250, 252, 0.5);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
}

.table-row {
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    transition: background-color 0.15s;
}

.table-row:hover {
    background-color: rgba(248, 250, 252, 0.8);
}

.col-metric {
    font-family: monospace;
    font-weight: 700;
    text-align: right;
}

.col-currency-positive {
    color: #0f172a;
    background-color: rgba(209, 250, 229, 0.3);
}

.col-currency-negative {
    color: #f43f5e;
}

.col-highlight {
    color: rgb(2, 64, 18);
    background-color: rgba(22, 163, 74, 0.05);
    font-weight: 900;
}

.table-footer {
    background: linear-gradient(to right, #f0fdf4, #dcfce7);
    color: #15803d;
    font-weight: 900;
    border-top: 4px solid rgb(2, 64, 18);
}

.footer-cell {
    padding: 1.25rem 2rem;
    text-align: right;
    font-size: 1.125rem;
}

.bg-brand-gradient {
    background: linear-gradient(0deg, #dfece2, #f0f7f2);
}

/* --- 9. Tooltips & Modals --- */
.weighted-tooltip {
    pointer-events: none;
    z-index: 9999;
}

.dropdown-content {
    display: none;
}

.dropdown-content.show {
    display: block;
}

/* --- 10. Loading & Animations --- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(2px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 11. Scrollbars --- */
.custom-scrollbar::-webkit-scrollbar {
    height: 8px;
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f5f9;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* --- 12. LTV View Specifics --- */
.ltv-aggregate-section {
    background-color: #024012; /* brand-600 */
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.ltv-horizon-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: all 0.2s;
}

.ltv-horizon-card:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.ltv-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 0.375rem;
    background-color: #bbf7d0; /* brand-200 */
    transition: all 0.3s;
    opacity: 0.3;
}

.ltv-cohort-cell {
    color: white;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-radius: 0.75rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 900;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.ltv-cohort-cell:hover {
    transform: scale(1.05);
}
