﻿* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    height: 100%;
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}

.border-bottom {
    border-bottom: 1px solid #dee2e6;
}

/* ========================================================================= */
/* LAYOUT STRUCTURING */
/* ========================================================================= */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Top Bar / Header Component */
.navbar {
    background-color: #212529;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    height: 56px;
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
}

.brand-logo {
    color: #0d6efd;
    font-size: 1.4rem;
}

/* User Context Dropdown Elements */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    cursor: pointer;
    gap: 0.6rem;
    user-select: none;
}

.avatar-placeholder {
    width: 32px;
    height: 32px;
    background-color: #6c757d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.5rem;
    background-color: white;
    min-width: 160px;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 0.25rem;
    z-index: 1000;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
}

    .dropdown-menu.show {
        display: block;
    }

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    color: #212529;
    text-decoration: none;
    font-size: 0.9rem;
    text-align: left;
    border: 0;
    background: transparent;
    cursor: pointer;
}

    .dropdown-item:hover {
        background-color: #f8f9fa;
    }

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid #dee2e6;
}

.text-danger {
    color: #dc3545 !important;
}

/* Workspace Grid Splitter */
.workspace-layout {
    display: flex;
    flex-grow: 1;
    height: calc(100vh - 56px);
}

/* Left Sidebar Panel */
.sidebar {
    width: 240px;
    min-width: 240px;
    background-color: #ffffff;
    border-right: 1px solid #dee2e6;
    padding-top: 1rem;
}

.sidebar-menu {
    list-style: none;
    padding: 0 0.75rem;
}

.sidebar-item {
    margin-bottom: 0.25rem;
}

.sidebar-link {
    display: block;
    padding: 0.6rem 0.75rem;
    color: #333;
    text-decoration: none;
    border-radius: 0.25rem;
    font-size: 0.95rem;
}

    .sidebar-link:hover {
        background-color: #f1f3f5;
    }

    .sidebar-link.active {
        background-color: #0d6efd;
        color: white;
        font-weight: 500;
    }

/* Center Grid App View Canvas & Sticky Footer Controls */
.main-canvas {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
    height: 100%;
    overflow-y: auto;
}

.content-area {
    padding: 2rem;
}

.page-title {
    font-size: 1.75rem;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Component Cards */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(0,0,0,.05);
}

.metric-title {
    color: #6c757d;
    font-size: 0.85rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
}

/* Bottom Sticky Footer Panel */
.footer {
    background-color: white;
    border-top: 1px solid #dee2e6;
    padding: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
}

/* ========================================================================= */
/* 1. LOGIN VIEW STYLES */
/* ========================================================================= */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.login-card {
    background: #fff;
    padding: 2rem;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-brand-icon {
    font-size: 3rem;
    color: #0d6efd;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.login-card h2 {
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.text-muted {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

    .form-group label {
        display: block;
        margin-bottom: 0.4rem;
        font-size: 0.85rem;
        font-weight: 600;
    }

.form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    outline: none;
}

    .form-control:focus {
        border-color: #86b7fe;
        box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
    }

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.btn-primary {
    width: 100%;
    padding: 0.6rem;
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 0.25rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #0b5ed7;
}
