/* ==========================================
   ENTASK SOLUTIONS - PAINEL DE GESTÃO
   Versão: 1.0.0
   ========================================== */

:root {
    --primary-color: #0066cc;
    --secondary-color: #00c851;
    --dark-bg: #1a1d29;
    --sidebar-bg: #252939;
    --card-bg: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --border-color: #e9ecef;
    --success: #00c851;
    --warning: #ffbb33;
    --danger: #ff4444;
    --info: #33b5e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: var(--text-primary);
}

/* ==========================================
   LOGIN PAGE
   ========================================== */
.login-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, #004999 100%);
}

.login-left {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.95) 0%, rgba(0, 73, 153, 0.95) 100%);
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.login-info {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 500px;
    margin: auto;
}

.logo-container {
    text-align: center;
}

.features {
    margin-top: 80px;
}

.feature-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.feature-item h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-item p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.95rem;
}

.login-right {
    background: white;
    padding: 40px;
}

.login-form-container {
    width: 100%;
    max-width: 450px;
}

.login-form-container .input-group-text {
    background: white;
    border-right: none;
}

.login-form-container .form-control {
    border-left: none;
    padding-left: 0;
}

.login-form-container .form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

.login-form-container .input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==========================================
   DASHBOARD LAYOUT
   ========================================== */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 25px 20px;
    background: var(--dark-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 700;
}

.sidebar-brand i {
    font-size: 2rem;
    margin-right: 15px;
    color: var(--secondary-color);
}

.sidebar.collapsed .sidebar-brand span {
    display: none;
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-section {
    margin-bottom: 30px;
}

.menu-section-title {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 20px;
    margin-bottom: 10px;
    font-weight: 600;
}

.sidebar.collapsed .menu-section-title {
    display: none;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.menu-item.active {
    background: rgba(0, 200, 81, 0.1);
    color: var(--secondary-color);
    border-left: 3px solid var(--secondary-color);
}

.menu-item i {
    font-size: 1.2rem;
    margin-right: 15px;
    width: 25px;
    text-align: center;
}

.sidebar.collapsed .menu-item span {
    display: none;
}

.menu-badge {
    margin-left: auto;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    flex: 1;
    transition: all 0.3s ease;
}

.main-content.expanded {
    margin-left: 80px;
}

/* Topbar */
.topbar {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
}

.toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    margin-right: 20px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.toggle-sidebar:hover {
    background: var(--border-color);
    color: var(--primary-color);
}

.search-bar {
    position: relative;
    width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 45px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    outline: none;
    transition: all 0.3s ease;
}

.search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-btn, .user-menu-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-btn:hover, .user-menu-btn:hover {
    background: var(--border-color);
    color: var(--primary-color);
}

.notification-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 10px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-name {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-name small {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Page Content */
.page-content {
    padding: 30px;
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 10px 0 0 0;
}

/* Cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stat-card-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

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

.stat-card-body {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.stat-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* Charts */
.chart-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Tables */
.table-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.table-actions {
    display: flex;
    gap: 10px;
}

.custom-table {
    width: 100%;
    margin-top: 20px;
}

.custom-table thead {
    background: #f8f9fa;
}

.custom-table thead th {
    padding: 15px;
    font-weight: 600;
    color: var(--text-primary);
    border: none;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.custom-table tbody td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.custom-table tbody tr:hover {
    background: #f8f9fa;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-badge.ativo {
    background: rgba(0, 200, 81, 0.1);
    color: var(--success);
}

.status-badge.inativo {
    background: rgba(255, 68, 68, 0.1);
    color: var(--danger);
}

.status-badge.pendente {
    background: rgba(255, 187, 51, 0.1);
    color: var(--warning);
}

.status-badge.em-dia {
    background: rgba(0, 200, 81, 0.1);
    color: var(--success);
}

.status-badge.atrasado {
    background: rgba(255, 68, 68, 0.1);
    color: var(--danger);
}

.status-badge.vencido {
    background: rgba(255, 68, 68, 0.1);
    color: var(--danger);
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 204, 0.3);
}

.btn-success {
    background: var(--success);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* Action Buttons */
.action-btn {
    padding: 6px 10px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.action-btn:hover {
    background: var(--border-color);
}

.action-btn.edit {
    color: var(--info);
}

.action-btn.delete {
    color: var(--danger);
}

.action-btn.view {
    color: var(--primary-color);
}

/* Filters */
.filters-bar {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: end;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        margin-left: -280px;
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .search-bar {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 20px;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .topbar {
        padding: 15px 20px;
    }
    
    .search-bar {
        display: none;
    }
}

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }

.bg-primary-light { background: rgba(0, 102, 204, 0.1); }
.bg-success-light { background: rgba(0, 200, 81, 0.1); }
.bg-danger-light { background: rgba(255, 68, 68, 0.1); }
.bg-warning-light { background: rgba(255, 187, 51, 0.1); }
.bg-info-light { background: rgba(51, 181, 229, 0.1); }
