/* ========================================
   DASHBOARD MODERNO - GBS OFICIAL
   ======================================== */

/* Variáveis CSS */
:root {
    --primary-color: #007cba;
    --primary-dark: #005a8a;
    --primary-light: #4da6d9;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #007cba 0%, #4da6d9 100%);
    --gradient-success: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    --gradient-warning: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    --gradient-danger: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%);
    --gradient-info: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
    --gradient-dark: linear-gradient(135deg, #343a40 0%, #495057 100%);
    
    /* Sombras */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --shadow-xl: 0 1.5rem 4rem rgba(0, 0, 0, 0.2);
    
    /* Transições */
    --transition-fast: all 0.2s ease;
    --transition-normal: all 0.3s ease;
    --transition-slow: all 0.5s ease;
    
    /* Bordas */
    --border-radius: 0.75rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 1.5rem;
}

/* ========================================
   HEADER DO DASHBOARD
   ======================================== */

.dashboard-header {
    background: var(--gradient-primary);
    padding: 2rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.dashboard-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>') repeat;
    opacity: 0.3;
}

.dashboard-header .container-fluid {
    position: relative;
    z-index: 2;
}

.welcome-content {
    color: white;
}

.avatar-wrapper {
    position: relative;
}

.avatar-circle {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background: var(--success-color);
    border-radius: 50%;
    border: 3px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.welcome-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.header-stats {
    display: flex;
    gap: 1.5rem;
    flex-direction: column;
    align-items: flex-end;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    font-size: 0.95rem;
    font-weight: 500;
}

.stat-item i {
    font-size: 1.1rem;
}

/* ========================================
   DASHBOARD CONTENT
   ======================================== */

.dashboard-content {
    padding: 0 1.5rem 2rem;
}

/* ========================================
   CARDS DE ESTATÍSTICAS
   ======================================== */

.stat-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-normal);
    position: relative;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.stat-card-body {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 3;
}

.stat-card-primary .stat-icon {
    background: var(--gradient-primary);
}

.stat-card-success .stat-icon {
    background: var(--gradient-success);
}

.stat-card-warning .stat-icon {
    background: var(--gradient-warning);
}

.stat-card-info .stat-icon {
    background: var(--gradient-info);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.stat-card-primary .stat-number {
    color: var(--primary-color);
}

.stat-card-success .stat-number {
    color: var(--success-color);
}

.stat-card-warning .stat-number {
    color: var(--warning-color);
}

.stat-card-info .stat-number {
    color: var(--info-color);
}

.stat-label {
    font-size: 0.95rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    font-weight: 500;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.stat-trend.positive {
    color: var(--success-color);
}

.stat-trend.negative {
    color: var(--danger-color);
}

.stat-trend:not(.positive):not(.negative) {
    color: var(--gray-500);
}

.stat-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0.8;
}

.stat-card-success .stat-wave {
    background: var(--gradient-success);
}

.stat-card-warning .stat-wave {
    background: var(--gradient-warning);
}

.stat-card-info .stat-wave {
    background: var(--gradient-info);
}

/* ========================================
   CARDS MODERNOS
   ======================================== */

.modern-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition-normal);
    border: 1px solid var(--gray-200);
}

.modern-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.modern-card-header {
    padding: 1.5rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.modern-card-body {
    padding: 1.5rem;
}

.card-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.card-icon-warning {
    background: var(--gradient-warning);
}

.card-icon-success {
    background: var(--gradient-success);
}

.card-icon-info {
    background: var(--gradient-info);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
}

.card-actions .btn-modern {
    border-radius: var(--border-radius);
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition-fast);
}

/* ========================================
   AÇÕES RÁPIDAS
   ======================================== */

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    text-decoration: none;
    color: var(--gray-800);
    transition: var(--transition-fast);
}

.quick-action-item:hover {
    background: white;
    box-shadow: var(--shadow-sm);
    transform: translateX(5px);
    color: var(--gray-800);
    text-decoration: none;
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.quick-action-icon-success {
    background: var(--gradient-success);
}

.quick-action-icon-info {
    background: var(--gradient-info);
}

.quick-action-icon-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.quick-action-content {
    flex: 1;
}

.quick-action-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.quick-action-desc {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.quick-action-arrow {
    color: var(--gray-400);
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.quick-action-item:hover .quick-action-arrow {
    color: var(--primary-color);
    transform: translateX(3px);
}

/* ========================================
   TABELAS MODERNAS
   ======================================== */

.table-modern {
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern th {
    background: var(--gray-50);
    border: none;
    font-weight: 600;
    color: var(--gray-700);
    padding: 1rem;
    font-size: 0.9rem;
}

.table-modern td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-200);
}

.table-modern tbody tr:hover {
    background: var(--gray-50);
}

.table-modern tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   BADGES MODERNOS
   ======================================== */

.badge-modern {
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-success-modern {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.badge-danger-modern {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.badge-warning-modern {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(255, 193, 7, 0.2);
}

/* ========================================
   BOTÕES MODERNOS
   ======================================== */

.btn-modern-group {
    display: flex;
    gap: 0.5rem;
}

.btn-icon-modern {
    width: 35px;
    height: 35px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-600);
    transition: var(--transition-fast);
}

.btn-icon-modern:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ========================================
   ANIMAÇÕES
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

@media (max-width: 768px) {
    .dashboard-header {
        padding: 1.5rem 0;
    }
    
    .welcome-title {
        font-size: 1.5rem;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
    }
    
    .avatar-circle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-card-body {
        padding: 1.5rem;
    }
    
    .modern-card-header,
    .modern-card-body {
        padding: 1rem;
    }
    
    .header-stats {
        flex-direction: row;
        gap: 1rem;
    }
    
    .quick-action-item {
        padding: 0.75rem;
    }
    
    .quick-action-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .dashboard-content {
        padding: 0 1rem 2rem;
    }
    
    .card-title-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .card-actions {
        margin-top: 1rem;
    }
    
    .stat-card-body {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
}

/* ========================================
   DARK MODE SUPPORT
   ======================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --gray-100: #2d2d2d;
        --gray-200: #3d3d3d;
        --gray-300: #4d4d4d;
        --gray-400: #5d5d5d;
        --gray-500: #6d6d6d;
        --gray-600: #8d8d8d;
        --gray-700: #adadad;
        --gray-800: #cdcdcd;
        --gray-900: #ededef;
    }
    
    .modern-card {
        background: var(--gray-100);
        border-color: var(--gray-300);
    }
    
    .modern-card-header {
        background: var(--gray-200);
        border-color: var(--gray-300);
    }
    
    .stat-card {
        background: var(--gray-100);
    }
    
    .quick-action-item {
        background: var(--gray-200);
        border-color: var(--gray-300);
        color: var(--gray-800);
    }
    
    .quick-action-item:hover {
        background: var(--gray-100);
        color: var(--gray-900);
    }
}

/* ========================================
   ELEMENTOS ESPECÍFICOS DO DASHBOARD
   ======================================== */

/* Ícones de produtos */
.product-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.product-name {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 0.95rem;
}

.product-id {
    color: var(--gray-500);
    font-size: 0.8rem;
}

/* Status de expiração */
.expire-today {
    color: var(--danger-color);
    font-weight: 700;
    font-size: 0.9rem;
}

.expire-soon {
    color: var(--warning-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.expire-ok {
    color: var(--success-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.expire-expired {
    color: var(--danger-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.expire-unknown {
    color: var(--gray-500);
    font-style: italic;
    font-size: 0.9rem;
}

.expire-date {
    color: var(--gray-500);
    font-size: 0.75rem;
}

/* Seção vazia de licenças */
.empty-licenses {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-500);
}

.empty-licenses i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-licenses h5 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.empty-licenses p {
    margin-bottom: 2rem;
}

.empty-licenses .btn {
    padding: 0.75rem 2rem;
    font-weight: 500;
}

/* Estatísticas em tempo real */
.stat-realtime {
    position: relative;
    overflow: hidden;
}

.stat-realtime::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Indicadores de status */
.status-indicator-online {
    color: var(--success-color);
    animation: pulse-green 2s infinite;
}

.status-indicator-offline {
    color: var(--gray-400);
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.loading-skeleton-text {
    height: 1rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.loading-skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Informações do Sistema */
.system-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.system-info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    background: var(--gray-50);
    transition: var(--transition-fast);
}

.system-info-item:hover {
    background: white;
    box-shadow: var(--shadow-sm);
}

.system-info-icon {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.system-info-content {
    flex: 1;
}

.system-info-title {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
}

.system-info-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* Melhorias na responsividade */
@media (max-width: 992px) {
    .btn-modern-group {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-icon-modern {
        width: 100%;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .product-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .product-name {
        font-size: 0.9rem;
    }
    
    .product-id {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .table-modern {
        font-size: 0.85rem;
    }
    
    .table-modern th,
    .table-modern td {
        padding: 0.75rem 0.5rem;
    }
    
    .badge-modern {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .btn-modern-group {
        flex-direction: row;
        gap: 0.25rem;
    }
    
    .btn-icon-modern {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
}

/* ========================================
   UTILITÁRIOS
   ======================================== */

.text-gradient-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.shadow-modern {
    box-shadow: var(--shadow);
}

.shadow-modern-lg {
    box-shadow: var(--shadow-lg);
}

.border-radius-modern {
    border-radius: var(--border-radius);
}

.border-radius-modern-lg {
    border-radius: var(--border-radius-lg);
}

.transition-modern {
    transition: var(--transition-normal);
} 