/* * TimeFlow - Professional SaaS Design System 
 * Author: Senior Full-Stack Engineer
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #2563eb;       /* Azul Moderno */
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --background-body: #f1f5f9;     /* Cinza muito suave */
    --surface-color: #ffffff;
    --sidebar-width: 260px;
    --header-height-mobile: 60px;
    --bottom-nav-height: 70px;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-body);
    color: var(--text-main);
    overflow-x: hidden;
}

/* --- LAYOUT GERAL --- */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    padding: 2rem;
    margin-left: var(--sidebar-width); /* Espaço para a sidebar */
    padding-bottom: 2rem;
    transition: margin-left 0.3s ease;
}

/* --- SIDEBAR (DESKTOP) --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: #0f172a; /* Dark Navy */
    color: white;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-brand img {
    width: 32px;
    height: auto;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.05);
    color: white;
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.user-profile {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- MOBILE NAVIGATION (BOTTOM BAR) --- */
.mobile-nav {
    display: none; /* Oculto em desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background-color: var(--surface-color);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom); /* Para iPhone X+ */
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    gap: 4px;
    width: 100%;
    height: 100%;
}

.mobile-nav-item i {
    font-size: 1.4rem;
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

/* --- MOBILE HEADER --- */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height-mobile);
    background-color: var(--surface-color);
    z-index: 999;
    padding: 0 1.5rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

/* --- COMPONENTES UI --- */

/* Cards */
.card {
    background-color: var(--surface-color);
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden; /* Para o header não sair */
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Botões */
.btn {
    border-radius: 50px; /* Pílula */
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Tabela */
.table {
    vertical-align: middle;
}
.table thead th {
    background-color: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: none;
}

/* KPIs */
.kpi-card {
    border-left: none !important; /* Remove a borda antiga */
    position: relative;
}
.kpi-card::after {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 4px;
    background-color: var(--primary-color);
    border-radius: 0 4px 4px 0;
}

/* Login */
.login-container {
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    padding: 3rem;
}

/* --- RESPONSIVIDADE --- */
@media (max-width: 991px) {
    .sidebar {
        display: none; /* Esconde sidebar em mobile/tablet */
    }
    
    .main-content {
        margin-left: 0;
        padding: 1.5rem;
        padding-top: calc(var(--header-height-mobile) + 1.5rem);
        padding-bottom: calc(var(--bottom-nav-height) + 2rem);
    }

    .mobile-nav {
        display: flex; /* Mostra nav inferior */
    }

    .mobile-header {
        display: flex; /* Mostra header superior */
    }
}