/**
 * Custom Header Styling - Saberis CRM
 * 
 * Melhorias visuais do header e interface
 * @since 2025-12-15
 */

/* ===================================
   HEADER PRINCIPAL - Melhorias
   =================================== */

#footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid #298cba;
}

#footerwrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    height: auto;
}

/* Melhorar tipografia do header */
#footer .username,
#footer .today-date {
    font-weight: 500;
    letter-spacing: 0.5px;
}

#footer .username {
    color: #00b9eb;
}

/* ===================================
   MENU LATERAL - Melhorias
   =================================== */

#menu {
    background: linear-gradient(to bottom, #1a1a1a 0%, #0f0f0f 100%);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
    border-right: 1px solid #333;
}

.menu-top {
    transition: all 0.3s ease;
    border-bottom: 1px solid #222;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.menu-top:hover {
    background-color: #298cba;
    color: #fff;
    padding-left: 10px;
    box-shadow: inset 2px 0 0 #00b9eb;
}

#selectedModuleLink {
    background: linear-gradient(90deg, #298cba, #1d6385);
    box-shadow: inset 2px 0 4px rgba(0, 0, 0, 0.3);
    color: #fff;
    font-weight: 600;
    border-left: 4px solid #00b9eb;
    padding-left: 6px;
}

/* Menu submenu */
.wp-submenu {
    background: linear-gradient(to bottom, #0a0a0a, #1a1a1a);
    border-color: #222 #000;
    box-shadow: 2px 0 6px rgba(0, 0, 0, 0.3);
}

.wp-submenu a:hover {
    background-color: #1d6385;
    color: #00b9eb;
    padding-left: 14px;
    transition: all 0.2s ease;
}

/* ===================================
   HEADERS DAS PÁGINAS (h2, h3, etc)
   =================================== */

.header1 h2 {
    color: #2d2d2d;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #298cba;
    padding-bottom: 8px;
    display: inline-block;
    margin-bottom: 16px;
}

.header1 h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 28px;
    background: linear-gradient(to right, #00b9eb, #298cba);
    margin-right: 8px;
    border-radius: 2px;
}

h3 {
    color: #1d6385;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-left: 4px solid #298cba;
    padding-left: 10px;
    margin-top: 20px;
    margin-bottom: 12px;
}

/* ===================================
   ELEMENTOS DE DESTAQUE
   =================================== */

.highlight {
    background-color: #e8f4f8 !important;
    border-left: 4px solid #298cba;
    padding-left: 8px;
    border-radius: 3px;
}

.button-primary,
input.button-primary {
    background: linear-gradient(135deg, #298cba, #1d6385);
    box-shadow: 0 4px 6px rgba(41, 140, 186, 0.3);
    transition: all 0.3s ease;
}

.button-primary:hover,
input.button-primary:hover {
    background: linear-gradient(135deg, #1d6385, #0f3d52);
    box-shadow: 0 6px 12px rgba(41, 140, 186, 0.4);
    transform: translateY(-2px);
}

.button-primary:active,
input.button-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(41, 140, 186, 0.3);
}

/* ===================================
   TABELAS - Melhorias
   =================================== */

.widefat {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.widefat thead th {
    background: linear-gradient(135deg, #f9f9f9, #efefef);
    color: #1d6385;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #298cba;
}

.widefat tbody tr:hover {
    background-color: #f0f7fb !important;
    box-shadow: inset 0 0 8px rgba(41, 140, 186, 0.1);
}

.widefat tr.highlight {
    background: linear-gradient(90deg, #e8f4f8, #f0f7fb);
}

/* ===================================
   INPUTS & FORMS
   =================================== */

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=search],
input[type=tel],
input[type=url],
select,
textarea {
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    border-radius: 3px;
}

input[type=text]:focus,
input[type=email]:focus,
input[type=password]:focus,
input[type=number]:focus,
input[type=search]:focus,
input[type=tel]:focus,
input[type=url]:focus,
select:focus,
textarea:focus {
    border-color: #298cba;
    box-shadow: 0 0 8px rgba(41, 140, 186, 0.2);
    outline: none;
}

/* ===================================
   NOTIFICAÇÕES & ALERTAS
   =================================== */

div.error {
    border-left: 4px solid #d32f2f;
    background: #ffebee;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(211, 47, 47, 0.1);
}

div.updated {
    border-left: 4px solid #388e3c;
    background: #e8f5e9;
    border-radius: 3px;
    box-shadow: 0 2px 4px rgba(56, 142, 60, 0.1);
}

/* ===================================
   ÍCONES DO MÓDULO
   =================================== */

.module-icon {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.menu-top:hover .module-icon {
    transform: scale(1.1);
}

/* ===================================
   LINKS & NAVEGAÇÃO
   =================================== */

a {
    transition: color 0.2s ease;
}

a:hover {
    color: #0090c3;
    text-decoration: none;
}

/* ===================================
   RESPONSIVE - Melhorias Mobile
   =================================== */

@media only screen and (max-width: 736px) {
    .header1 h2 {
        font-size: 24px;
        padding-bottom: 6px;
    }
    
    #footer {
        border-bottom-width: 2px;
    }
    
    .menu-top:hover {
        padding-left: 8px;
    }
    
    h3 {
        padding-left: 8px;
    }
}

/* ===================================
   MODO ESCURO - Suporte
   =================================== */

@media (prefers-color-scheme: dark) {
    body {
        background: #0a0a0a;
        color: #e0e0e0;
    }
    
    .postbox,
    .widefat {
        background: #1a1a1a;
        color: #e0e0e0;
    }
    
    .widefat thead th {
        background: linear-gradient(135deg, #2a2a2a, #1a1a1a);
        color: #00b9eb;
    }
}
