/* ==================== TimeFlow - Main Styles ==================== */

:root {
    --tf-primary: #2563eb;
    --tf-primary-dark: #1d4ed8;
    --tf-dark: #1e293b;
    --tf-light: #f8fafc;
    --tf-border: #e2e8f0;
}

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background-color: var(--tf-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================== Layout ==================== */

.main-content {
    padding-top: 70px; /* navbar fixed-top */
    flex: 1;
}

/* ==================== Cards ==================== */

.card {
    border: 1px solid var(--tf-border);
    border-radius: 12px;
}

.card-header {
    background-color: white;
    border-bottom: 1px solid var(--tf-border);
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.25rem;
}

/* ==================== Tabelas ==================== */

.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: #64748b;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* ==================== Badges ==================== */

.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
}

/* ==================== Botões ==================== */

.btn-primary {
    background-color: var(--tf-primary);
    border-color: var(--tf-primary);
}

.btn-primary:hover {
    background-color: var(--tf-primary-dark);
    border-color: var(--tf-primary-dark);
}

/* ==================== Navbar ==================== */

.tf-navbar {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    padding: 0.4rem 0;
}

.navbar-brand {
    font-size: 1.3rem;
    letter-spacing: -0.025em;
    color: #fff !important;
}

.tf-brand-icon {
    width: 32px;
    height: 32px;
    background: var(--tf-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: white;
}

.tf-brand-accent {
    color: #60a5fa;
}

/* Nav Links */
.tf-nav-link {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin: 0 1px;
}

.tf-nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
}

.tf-nav-link.active {
    color: #fff !important;
    background: rgba(37, 99, 235, 0.3);
    border-bottom: 2px solid #60a5fa;
}

/* Language Pill */
.tf-nav-pill {
    color: rgba(255, 255, 255, 0.7) !important;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.tf-nav-pill:hover {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

/* Separator */
.tf-nav-separator {
    display: inline-block;
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 0.5rem;
    vertical-align: middle;
}

/* Avatar */
.tf-avatar {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* User button */
.tf-user-btn {
    padding: 0.3rem 0.6rem !important;
    border-radius: 10px;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.85) !important;
}

.tf-user-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

.tf-user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.tf-user-role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.2;
}

/* Dropdowns */
.tf-dropdown {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    min-width: 200px;
}

.tf-dropdown-item {
    border-radius: 8px;
    padding: 0.55rem 0.85rem;
    font-size: 0.88rem;
    transition: all 0.15s ease;
}

.tf-dropdown-item:hover {
    background: #eff6ff;
}

.tf-dropdown-item.active {
    background: #eff6ff;
    color: var(--tf-primary);
    font-weight: 600;
}

.tf-dropdown-user {
    min-width: 220px;
}

/* ==================== Toast ==================== */

.toast-container .toast {
    min-width: 280px;
    border-radius: 8px;
}

/* ==================== Autocomplete ==================== */

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--tf-border);
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1050;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.autocomplete-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
}

.autocomplete-item:hover {
    background-color: #eff6ff;
    color: var(--tf-primary);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* ==================== Footer ==================== */

.footer {
    margin-top: auto;
}

/* ==================== Responsivo Mobile ==================== */

@media (max-width: 768px) {
    .main-content {
        padding-top: 60px;
    }

    .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    .card {
        border-radius: 8px;
    }

    .table th, .table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.82rem;
    }

    h4 {
        font-size: 1.15rem;
    }

    .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.75rem;
    }

    .btn-group .btn {
        font-size: 0.78rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.05rem;
    }
}
