/* ===== BeeTech Solutions - Plataforma de Gerenciamento ===== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bee-yellow: #FFC107;
    --bee-yellow-dark: #e5ac00;
    --bee-dark: #1a1a2e;
    --bee-blue: #16213e;
    --bee-accent: #0f3460;
    --bee-light: #f4f6f9;
    --bee-bg: #eef1f5;
    --bee-card: #ffffff;
    --bee-border: #e2e8f0;
    --bee-text: #334155;
    --bee-text-light: #64748b;
    --bee-radius: 12px;
    --bee-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --bee-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --bee-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --bee-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bee-bg);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--bee-text);
    font-size: 0.9rem;
    -webkit-font-smoothing: antialiased;
}

/* ===== NAVBAR ===== */
.navbar {
    background: linear-gradient(135deg, var(--bee-dark) 0%, var(--bee-blue) 100%) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    padding: 0.5rem 1rem;
    z-index: 1030;
}

.navbar-brand {
    font-size: 1.15rem;
    padding: 0.25rem 0;
    letter-spacing: -0.01em;
}

.navbar-brand img {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
    border-radius: 6px;
    object-fit: contain;
}

.navbar .nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.6rem 1rem !important;
    border-radius: 8px;
    transition: var(--bee-transition);
    color: rgba(255,255,255,0.75) !important;
}

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

.navbar .nav-link.active {
    color: var(--bee-yellow) !important;
    background: rgba(255,193,7,0.1);
}

.navbar .badge {
    font-size: 0.6rem;
    padding: 0.2em 0.5em;
    vertical-align: middle;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-top: 62px;
    min-height: calc(100vh - 62px);
    padding-bottom: 2rem;
}

.main-content > .container-fluid {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ===== AUTH PAGES ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bee-dark) 0%, var(--bee-blue) 50%, var(--bee-accent) 100%);
    padding: 1.5rem;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card .logo img {
    border-radius: 8px;
}

.auth-card .logo h2 {
    margin-top: 0.75rem;
    color: var(--bee-dark);
    font-weight: 800;
    font-size: 1.5rem;
}

.auth-card .logo p {
    font-size: 0.85rem;
}

.auth-card .form-control {
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    border-color: var(--bee-border);
    font-size: 0.88rem;
}

.auth-card .form-control:focus {
    border-color: var(--bee-yellow);
    box-shadow: 0 0 0 3px rgba(255,193,7,0.15);
}

.auth-card .input-group-text {
    border-radius: 8px 0 0 8px;
    background: var(--bee-light);
    border-color: var(--bee-border);
}

/* ===== PAGE HEADER ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--bee-dark);
    margin: 0;
    letter-spacing: -0.02em;
}

.page-header h1 i {
    color: var(--bee-yellow);
    margin-right: 0.25rem;
}

/* ===== FILTER BAR ===== */
.filter-bar {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.filter-bar .form-control,
.filter-bar .form-select {
    border-radius: 8px;
    border-color: var(--bee-border);
    font-size: 0.82rem;
    padding: 0.5rem 0.75rem;
    min-height: 40px;
    background-color: white;
}

.filter-bar .form-control:focus,
.filter-bar .form-select:focus {
    border-color: var(--bee-yellow);
    box-shadow: 0 0 0 3px rgba(255,193,7,0.12);
}

.filter-bar .input-group {
    min-width: 200px;
    max-width: 280px;
}

.filter-bar .input-group .btn {
    border-radius: 0 8px 8px 0;
    padding: 0.5rem 0.75rem;
}

.filter-bar .form-select {
    min-width: 140px;
    max-width: 200px;
}

/* ===== BUTTONS ===== */
.btn-warning {
    background-color: var(--bee-yellow);
    border-color: var(--bee-yellow);
    color: #000;
}

.btn-warning:hover {
    background-color: var(--bee-yellow-dark);
    border-color: var(--bee-yellow-dark);
    color: #000;
    transform: translateY(-1px);
    box-shadow: var(--bee-shadow-md);
}

.btn {
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    transition: var(--bee-transition);
}

.btn-sm {
    font-size: 0.78rem;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
}

.btn-lg {
    font-size: 0.95rem;
    padding: 0.65rem 1.5rem;
}

/* ===== CARDS ===== */
.stat-card {
    border: none;
    border-radius: var(--bee-radius);
    box-shadow: var(--bee-shadow);
    transition: var(--bee-transition);
    background: var(--bee-card);
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--bee-shadow-lg);
}

.stat-card .card-body {
    padding: 1.25rem;
}

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

.stat-card .stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--bee-dark);
    line-height: 1.1;
}

.stat-card .stat-label {
    color: var(--bee-text-light);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* ===== TABLES ===== */
.table-card {
    border: none;
    border-radius: var(--bee-radius);
    box-shadow: var(--bee-shadow);
    overflow: hidden;
    background: var(--bee-card);
}

.table-card .card-header {
    border-bottom: 1px solid var(--bee-border);
    padding: 0.85rem 1.25rem;
}

.table-card .table {
    margin: 0;
    font-size: 0.84rem;
}

.table-card .table th {
    background-color: var(--bee-light);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.6px;
    color: var(--bee-text-light);
    border-bottom: 2px solid var(--bee-border);
    padding: 0.7rem 1rem;
    white-space: nowrap;
}

.table-card .table td {
    vertical-align: middle;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.table-card .table tbody tr {
    transition: var(--bee-transition);
}

.table-card .table tbody tr:hover {
    background-color: #fafbfc;
}

.table-card .table td a {
    color: var(--bee-accent);
    font-weight: 600;
    text-decoration: none;
}

.table-card .table td a:hover {
    color: var(--bee-yellow-dark);
    text-decoration: underline;
}

/* ===== BADGES ===== */
.badge {
    font-weight: 600;
    font-size: 0.7rem;
    padding: 0.35em 0.65em;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.badge-active { background-color: #3b82f6; }
.badge-on_hold { background-color: #f59e0b; color: #000; }
.badge-completed { background-color: #10b981; }
.badge-cancelled { background-color: #ef4444; }

.badge-todo { background-color: #94a3b8; }
.badge-in_progress { background-color: #3b82f6; }
.badge-review { background-color: #06b6d4; }
.badge-done { background-color: #10b981; }

/* ===== PRIORITY ===== */
.priority-low { color: #10b981; }
.priority-medium { color: #f59e0b; }
.priority-high { color: #f97316; }
.priority-urgent { color: #ef4444; }

/* ===== KANBAN BOARD ===== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    min-height: 400px;
}

.kanban-column {
    background: var(--bee-light);
    border-radius: var(--bee-radius);
    padding: 0.85rem;
    min-width: 0;
    border: 1px solid var(--bee-border);
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
    padding-bottom: 0.65rem;
    border-bottom: 2px solid var(--bee-border);
}

.kanban-column-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 0.82rem;
}

.kanban-column-header .badge {
    font-size: 0.68rem;
}

.kanban-card {
    background: white;
    border-radius: 8px;
    padding: 0.85rem;
    margin-bottom: 0.6rem;
    box-shadow: var(--bee-shadow);
    cursor: grab;
    transition: var(--bee-transition);
    border-left: 4px solid var(--bee-border);
}

.kanban-card:hover {
    box-shadow: var(--bee-shadow-md);
    transform: translateY(-1px);
}

.kanban-card.priority-low { border-left-color: #10b981; }
.kanban-card.priority-medium { border-left-color: #f59e0b; }
.kanban-card.priority-high { border-left-color: #f97316; }
.kanban-card.priority-urgent { border-left-color: #ef4444; }

.kanban-card .task-title {
    font-weight: 600;
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
    color: var(--bee-dark);
}

.kanban-card .task-meta {
    font-size: 0.7rem;
    color: var(--bee-text-light);
}

/* ===== PROGRESS BAR ===== */
.progress {
    height: 7px;
    border-radius: 4px;
    background-color: #e2e8f0;
}

.progress-bar {
    border-radius: 4px;
}

/* ===== DETAIL PAGE ===== */
.detail-card {
    border: none;
    border-radius: var(--bee-radius);
    box-shadow: var(--bee-shadow);
    background: var(--bee-card);
}

.detail-card .card-header {
    background: linear-gradient(135deg, var(--bee-dark), var(--bee-blue));
    color: white;
    border-radius: var(--bee-radius) var(--bee-radius) 0 0 !important;
    padding: 1rem 1.25rem;
}

.detail-card .card-header h5,
.detail-card .card-header h6 {
    font-weight: 700;
}

.info-label {
    font-weight: 700;
    color: var(--bee-text-light);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== CHARTS ===== */
.chart-card {
    border: none;
    border-radius: var(--bee-radius);
    box-shadow: var(--bee-shadow);
    background: var(--bee-card);
}

.chart-card .card-body h6 {
    font-weight: 700;
    color: var(--bee-dark);
}

/* ===== SEARCH BAR ===== */
.search-bar {
    max-width: 100%;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--bee-text-light);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.empty-state h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.85rem;
}

/* ===== DRAG AND DROP ===== */
.kanban-card.dragging {
    opacity: 0.4;
    transform: rotate(2deg);
}

.kanban-column.drag-over {
    background-color: #dbeafe;
    border-color: #93c5fd;
}

/* ===== PHASE TIMELINE ===== */
.phase-timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    padding: 1.25rem 0.5rem;
    -webkit-overflow-scrolling: touch;
}

.phase-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 90px;
    position: relative;
    text-align: center;
}

.phase-dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #cbd5e1;
    z-index: 2;
    transition: all 0.3s ease;
}

.phase-step.done .phase-dot {
    color: white;
    border-color: transparent;
}

.phase-step.current .phase-dot {
    color: white;
    border-color: transparent;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
    transform: scale(1.2);
}

.phase-step.future .phase-dot {
    background: #f8fafc;
}

.phase-connector {
    position: absolute;
    top: 21px;
    left: -50%;
    right: 50%;
    height: 3px;
    background: #e2e8f0;
    z-index: 1;
}

.phase-step:first-child .phase-connector {
    display: none;
}

.phase-connector.done {
    background: #10b981;
}

.phase-connector.current {
    background: linear-gradient(to right, #10b981, #3b82f6);
}

.phase-label {
    margin-top: 0.5rem;
    font-size: 0.65rem;
    line-height: 1.3;
    max-width: 100px;
    color: var(--bee-text-light);
}

.phase-label strong {
    display: block;
    font-size: 0.67rem;
    color: var(--bee-text);
}

.phase-step.future .phase-label strong {
    color: #cbd5e1;
}

/* ===== PHASE NAVIGATOR (Kanban) ===== */
.phase-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}

.phase-nav::-webkit-scrollbar {
    height: 4px;
}

.phase-nav::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.phase-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border: 2px solid var(--bee-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--bee-text-light);
    font-size: 0.72rem;
    font-weight: 500;
    transition: var(--bee-transition);
    white-space: nowrap;
    background: white;
}

.phase-tab:hover {
    border-color: #94a3b8;
    color: var(--bee-text);
    text-decoration: none;
    background: #fafbfc;
}

.phase-tab.active {
    font-weight: 700;
    color: var(--bee-dark);
    box-shadow: var(--bee-shadow);
}

.phase-tab.current-phase {
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.35);
}

.phase-tab-label {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== FORMS ===== */
.form-control,
.form-select {
    border-radius: 8px;
    border-color: var(--bee-border);
    font-size: 0.85rem;
    transition: var(--bee-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bee-yellow);
    box-shadow: 0 0 0 3px rgba(255,193,7,0.12);
}

.form-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--bee-text);
    margin-bottom: 0.35rem;
}

/* ===== MODALS ===== */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.modal-header {
    border-radius: 16px 16px 0 0;
    padding: 1rem 1.25rem;
}

.modal-footer {
    border-top: 1px solid var(--bee-border);
    padding: 0.85rem 1.25rem;
}

/* ===== ALERTS ===== */
.alert {
    border-radius: 10px;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ===================================================================
   RESPONSIVE BREAKPOINTS
   =================================================================== */

/* Desktop Large (1200+) */
@media (min-width: 1200px) {
    .main-content > .container-fluid {
        padding: 2rem;
    }
}

/* Tablet Landscape (992-1199) */
@media (max-width: 1199px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-card .stat-value {
        font-size: 1.4rem;
    }
}

/* Tablet Portrait (768-991) */
@media (max-width: 991px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header .d-flex {
        width: 100%;
    }

    .filter-bar {
        width: 100%;
    }

    .filter-bar .input-group {
        min-width: 0;
        flex: 1;
    }

    .filter-bar .form-select {
        min-width: 0;
        flex: 1;
    }

    .phase-timeline {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.75rem 0;
    }

    .phase-step {
        flex-direction: row;
        min-width: auto;
        text-align: left;
        gap: 0.75rem;
        padding: 0.35rem 0;
    }

    .phase-connector {
        display: none;
    }

    .phase-label {
        margin-top: 0;
        max-width: none;
    }

    .phase-dot {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 0.85rem;
    }

    .phase-step.current .phase-dot {
        transform: scale(1.1);
    }
}

/* Mobile (max 767px) */
@media (max-width: 767px) {
    .main-content {
        margin-top: 56px;
    }

    .main-content > .container-fluid {
        padding: 1rem;
    }

    .navbar {
        padding: 0.4rem 0.75rem;
    }

    .navbar-brand {
        font-size: 0.95rem;
    }

    .navbar-brand img {
        height: 30px !important;
    }

    .navbar .nav-link {
        font-size: 0.82rem;
        padding: 0.5rem 0.75rem !important;
    }

    .page-header h1 {
        font-size: 1.25rem;
    }

    .kanban-board {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .kanban-column {
        min-height: auto;
    }

    .stat-card .card-body {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.3rem;
    }

    .stat-card .stat-icon {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 1.1rem;
    }

    .filter-bar {
        gap: 0.5rem;
    }

    .filter-bar .input-group,
    .filter-bar .form-select {
        max-width: 100%;
        width: 100%;
    }

    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.72rem;
    }

    .table-card .table {
        font-size: 0.78rem;
    }

    .table-card .table th {
        font-size: 0.62rem;
        padding: 0.5rem 0.6rem;
    }

    .table-card .table td {
        padding: 0.55rem 0.6rem;
    }

    .phase-tab {
        font-size: 0.68rem;
        padding: 0.35rem 0.6rem;
    }

    .phase-tab-label {
        max-width: 70px;
    }

    .auth-card {
        padding: 1.75rem;
        border-radius: 16px;
    }

    .auth-card .logo img {
        width: 90px !important;
    }

    .auth-card .logo h2 {
        font-size: 1.25rem;
    }

    .detail-card .card-body {
        padding: 1rem !important;
    }

    .modal-dialog {
        margin: 0.75rem;
    }
}

/* Very small screens (max 480px) */
@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.1rem;
    }

    .main-content > .container-fluid {
        padding: 0.75rem;
    }

    .kanban-card {
        padding: 0.65rem;
    }

    .kanban-card .task-title {
        font-size: 0.78rem;
    }

    .stat-card .stat-value {
        font-size: 1.15rem;
    }
}
