/* Reset e configurações globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1a73e8;
    --primary-dark: #0d47a1;
    --primary-light: #4dabf7;
    --secondary-blue: #e3f2fd;
    --text-dark: #1a2332;
    --text-light: #6b7a8f;
    --white: #ffffff;
    --shadow: 0 2px 12px rgba(26, 115, 232, 0.15);
    --shadow-hover: 0 4px 20px rgba(26, 115, 232, 0.25);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f9ff 0%, #e8f0fe 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--text-dark);
}

/* Tela de Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: var(--white);
    padding: 50px 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 420px;
    transition: var(--transition);
}

.login-box:hover {
    box-shadow: var(--shadow-hover);
}

.login-box .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-box .logo h1 {
    color: var(--primary-blue);
    font-size: 28px;
    font-weight: 700;
}

.login-box .logo p {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 5px;
}

.login-box .form-group {
    margin-bottom: 20px;
}

.login-box label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e7f0;
    border-radius: 8px;
    font-size: 15px;
    transition: var(--transition);
    background: #f8faff;
}

.login-box input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
    background: var(--white);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login .btn-icon {
    transition: var(--transition);
}

.btn-login:hover .btn-icon {
    transform: translateX(4px);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.error-message {
    background: #fee;
    color: #c62828;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid #c62828;
    display: none;
}

/* Login em duas etapas */
.login-step {
    display: none;
    animation: fadeInStep 0.4s ease;
}

.login-step.active {
    display: block !important;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-step.active {
    display: block !important;
}

.user-display {
    text-align: center;
    padding: 16px 0 20px;
    margin-bottom: 24px;
    border-bottom: 2px solid #eef2f7;
}

.user-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 12px;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.user-email-display {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
    word-break: break-all;
}

.btn-back {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
    padding: 4px 12px;
}

.btn-back:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 48px !important;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
    font-size: 18px;
}

.password-toggle:hover {
    color: var(--text-dark);
}

.login-help {
    text-align: center;
    margin-top: 16px;
    color: var(--text-light);
}

.login-help small {
    font-size: 12px;
}

/* Layout Principal - Dashboard */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--primary-dark), #0a3a7a);
    color: var(--white);
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
    box-shadow: 2px 0 12px rgba(0,0,0,0.1);
}

.sidebar-brand {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-brand h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-brand small {
    display: block;
    font-size: 12px;
    opacity: 0.7;
    margin-top: 4px;
}

.sidebar-nav {
    padding: 20px 0;
    list-style: none;
}

.sidebar-nav .nav-item {
    padding: 12px 24px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    border-left: 4px solid transparent;
}

.sidebar-nav .nav-item:hover {
    background: rgba(255,255,255,0.08);
    border-left-color: var(--primary-light);
}

.sidebar-nav .nav-item.active {
    background: rgba(255,255,255,0.12);
    border-left-color: var(--primary-light);
    font-weight: 600;
}

.sidebar-nav .nav-item .icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sidebar-nav .nav-item.logout {
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    color: #ff6b6b;
}

.sidebar-nav .nav-item.logout:hover {
    background: rgba(255,107,107,0.15);
    border-left-color: #ff6b6b;
}

/* Conteúdo Principal */
.main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.top-header {
    background: var(--white);
    padding: 16px 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-header .page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

.top-header .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-header .user-info .user-name {
    font-weight: 500;
    color: var(--text-dark);
}

.top-header .user-info .user-role {
    font-size: 13px;
    color: var(--text-light);
}

.top-header .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

/* Content Area */
.content-area {
    padding: 30px;
    flex: 1;
}

/* Cards Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.stat-card .stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-dark);
}

.stat-card .stat-label {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 4px;
}

/* Tabelas */
.table-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 20px;
    width: 100%;
}

.table-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eef2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.table-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.table-search {
    display: flex;
    gap: 12px;
}

.table-search input {
    padding: 8px 16px;
    border: 2px solid #e0e7f0;
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
    transition: var(--transition);
}

.table-search input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.table-scroll {
    overflow-x: auto;
    max-height: 500px;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

table thead th {
    background: #f0f5ff;
    color: var(--text-dark);
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dce4f0;
    white-space: nowrap;
}

table tbody td {
    padding: 12px 18px;
    border-bottom: 1px solid #eef2f7;
    color: var(--text-dark);
}

table tbody tr:hover {
    background: #f8faff;
}

/* Status Badges */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-pendente {
    background: #fff3e0;
    color: #e65100;
}

.badge-aprovado {
    background: #e3f2fd;
    color: #0d47a1;
}

.badge-finalizado {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-cancelado {
    background: #fce4ec;
    color: #c62828;
}

/* Footer */
.footer {
    background: var(--white);
    padding: 16px 30px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
    border-top: 1px solid #eef2f7;
    margin-top: auto;
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 16px;
}

/* Botões */
.btn-sm {
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: var(--transition);
    background: var(--primary-blue);
    color: var(--white);
}

.btn-sm:hover {
    opacity: 0.8;
}

.btn-approve {
    background: #4caf50;
    color: white;
}

.btn-reject {
    background: #f44336;
    color: white;
}

/* Mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
}

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        width: 280px;
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .top-header {
        padding: 12px 16px;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-search {
        flex-direction: column;
    }
    
    .table-search input {
        width: 100%;
        min-width: unset;
    }
    
    .mobile-menu-toggle {
        display: block !important;
    }
    
    .top-header .user-info .user-details {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .login-box .logo h1 {
        font-size: 24px;
    }
    
    .user-avatar-large {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
}

/* Animações */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #c1d0e0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0b4cc;
}
/* Solicitação de Produto */
.solicitacao-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 30px;
}

.solicitacao-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eef2f7;
}

.solicitacao-header h2 {
    color: var(--primary-dark);
    font-size: 24px;
}

.solicitacao-header p {
    color: var(--text-light);
    margin-top: 5px;
}

.solicitacao-form fieldset {
    border: 2px solid #eef2f7;
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 25px;
}

.solicitacao-form legend {
    font-weight: 600;
    color: var(--primary-dark);
    padding: 0 10px;
    font-size: 16px;
}

.solicitacao-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.solicitacao-form .form-grid.lojas-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.solicitacao-form .form-group {
    display: flex;
    flex-direction: column;
}

.solicitacao-form .form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.solicitacao-form .form-group .required {
    color: #e74c3c;
}

.solicitacao-form .form-control {
    padding: 8px 12px;
    border: 2px solid #e0e7f0;
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
    background: #f8faff;
}

.solicitacao-form .form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
    background: var(--white);
}

.solicitacao-form .form-control:read-only {
    background: #f0f4f8;
    color: var(--text-light);
}

.solicitacao-form h4 {
    color: var(--primary-dark);
    margin: 15px 0 10px;
    font-size: 15px;
}

/* Upload de Imagens */
.images-upload {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 15px 0;
}

.img-upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.img-preview {
    width: 200px;
    height: 200px;
    border: 2px dashed #dce4f0;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8faff;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.img-preview:hover {
    border-color: var(--primary-blue);
    background: #e3f2fd;
}

.img-preview span {
    font-size: 48px;
    opacity: 0.5;
}

.img-preview p {
    color: var(--text-light);
    font-size: 13px;
    margin-top: 8px;
}

.img-preview img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-upload-box input[type="file"] {
    display: none;
}

.btn-upload {
    padding: 8px 20px;
    background: var(--secondary-blue);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.btn-upload:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-center {
    text-align: center;
    padding: 10px 0;
}

.btn-center .btn-login {
    width: auto;
    padding: 12px 40px;
    font-size: 16px;
}

/* Responsividade */
@media (max-width: 768px) {
    .solicitacao-container {
        padding: 15px;
    }
    
    .solicitacao-form .form-grid {
        grid-template-columns: 1fr;
    }
    
    .solicitacao-form .form-grid.lojas-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .images-upload {
        grid-template-columns: 1fr;
    }
    
    .img-preview {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .solicitacao-form .form-grid.lojas-grid {
        grid-template-columns: 1fr;
    }
}

/* Logo styles */
.logo-img {
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
}

.sidebar-logo {
    max-width: 160px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
    filter: brightness(0) invert(1); /* Deixa a logo branca para sidebar escura */
}

/* Ajuste para telas menores */
@media (max-width: 480px) {
    .logo-img {
        max-width: 140px;
    }
    
    .sidebar-logo {
        max-width: 120px;
    }
}

/* Página de Pendências */
.pendencias-container {
    padding: 0;
}

.pendencias-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.pendencias-header h2 {
    color: var(--text-dark);
    font-size: 24px;
}

.pendencias-header p {
    color: var(--text-light);
    margin-top: 5px;
}

.stats-pendencias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-pendencias .stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stats-pendencias .stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-dark);
}

.stats-pendencias .stat-label {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 4px;
}

/* Erros na tabela */
.erros-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.erro-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.erro-tag.critica {
    background: #fce4ec;
    color: #c62828;
}

.erro-tag.alta {
    background: #fff3e0;
    color: #e65100;
}

.erro-tag.media {
    background: #fff8e1;
    color: #f57f17;
}

.erro-tag.baixa {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Botões de ação */
.btn-detalhes {
    background: var(--primary-blue);
    color: white;
    margin-right: 5px;
}

.btn-detalhes:hover {
    background: var(--primary-dark);
}

.btn-reenviar {
    background: #4caf50;
    color: white;
}

.btn-reenviar:hover {
    background: #388e3c;
}

/* Detalhes do erro em lista */
.erro-detalhe {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 6px;
    background: #f8faff;
    border-left: 4px solid #ccc;
}

.erro-detalhe.critica {
    border-left-color: #c62828;
    background: #fce4ec;
}

.erro-detalhe.alta {
    border-left-color: #e65100;
    background: #fff3e0;
}

.erro-detalhe.media {
    border-left-color: #f57f17;
    background: #fff8e1;
}

.erro-detalhe .erro-icone {
    font-size: 18px;
}

.erro-detalhe .erro-descricao {
    flex: 1;
    font-size: 14px;
}

.erro-detalhe .erro-severidade {
    font-size: 11px;
    padding: 2px 10px;
}

/* Responsividade */
@media (max-width: 768px) {
    .pendencias-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-right {
        width: 100%;
    }
    
    .header-right .btn-login {
        width: 100%;
    }
    
    .stats-pendencias {
        grid-template-columns: 1fr 1fr;
    }
    
    .erros-container {
        flex-direction: column;
    }
    
    .erro-tag {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .stats-pendencias {
        grid-template-columns: 1fr;
    }
}
/* public/css/style.css - Adicionar */

.historico-container {
    padding: 0;
}

.historico-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.historico-header h2 {
    color: var(--text-dark);
    font-size: 24px;
}

.historico-header p {
    color: var(--text-light);
    margin-top: 5px;
}
/* public/css/style.css - Adicionar */

.produtos-container {
    padding: 0;
}

.produtos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.produtos-header h2 {
    color: var(--text-dark);
    font-size: 24px;
}

.produtos-header p {
    color: var(--text-light);
    margin-top: 5px;
}

/* Estilos para a tabela de produtos */
#produtosTableBody tr:hover {
    background: #f8faff;
}

#produtosTableBody td {
    padding: 12px 18px;
    vertical-align: middle;
}

/* Responsividade */
@media (max-width: 768px) {
    .produtos-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-right {
        width: 100%;
    }
    
    .header-right .btn-login {
        width: 100%;
    }
}

/* public/css/style.css - Adicionar */

/* Agendamento */
.agendar-container {
    padding: 0;
}

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

.agendar-header h2 {
    color: var(--text-dark);
    font-size: 24px;
}

.agendar-header p {
    color: var(--text-light);
    margin-top: 5px;
}

.agendar-form fieldset {
    border: 2px solid #eef2f7;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 25px;
}

.agendar-form legend {
    font-weight: 600;
    color: var(--primary-dark);
    padding: 0 10px;
    font-size: 18px;
}

.step-container {
    animation: fadeInStep 0.4s ease;
}

.step-indicator {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 15px;
    font-weight: 500;
}

/* Vagas Grid */
.vagas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.vaga-item {
    padding: 15px;
    border: 2px solid #e0e7f0;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    background: #f8faff;
}

.vaga-item:hover {
    border-color: var(--primary-blue);
    background: #e3f2fd;
    transform: translateY(-2px);
}

.vaga-item.selected {
    border-color: var(--primary-blue);
    background: #e3f2fd;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.2);
}

.vaga-data {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.vaga-info {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-light);
}

/* Botões de navegação */
.btn-next, .btn-back {
    width: auto !important;
    padding: 10px 30px !important;
}

.btn-back {
    background: #6c757d !important;
}

.btn-back:hover {
    background: #5a6268 !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .vagas-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .agendar-form fieldset {
        padding: 20px 15px;
    }
    
    .btn-next, .btn-back {
        padding: 8px 20px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .vagas-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .vaga-item {
        padding: 10px;
    }
    
    .vaga-data {
        font-size: 15px;
    }
}

/* Modal */
.modal-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eef2f7;
}

.modal-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0 8px;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eef2f7;
    text-align: right;
}

/* Notas Grid */
.notas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.nota-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    background: #f8faff;
    transition: var(--transition);
}

.nota-card:hover {
    border-color: var(--primary-blue);
    background: #e3f2fd;
}

.nota-card.erro {
    border-left: 4px solid #e74c3c;
}

.nota-card.sucesso {
    border-left: 4px solid #2ecc71;
}

.nota-card.pendente {
    border-left: 4px solid #f39c12;
}

.nota-info {
    flex: 1;
}

.nota-numero {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 15px;
}

.nota-chave {
    font-size: 12px;
    color: var(--text-light);
    font-family: monospace;
    margin: 4px 0;
}

.nota-detalhes {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-light);
}

.nota-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-top: 5px;
}

.nota-status.erro {
    background: #fce4ec;
    color: #c62828;
}

.nota-status.sucesso {
    background: #e8f5e9;
    color: #2e7d32;
}

.nota-status.pendente {
    background: #fff3e0;
    color: #e65100;
}

.nota-acoes {
    display: flex;
    gap: 8px;
}

.btn-visualizar {
    background: var(--primary-blue);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    border: none;
    cursor: pointer;
}

.btn-visualizar:hover {
    background: var(--primary-dark);
}

.btn-notas {
    background: #6c757d;
    color: white;
    margin-right: 4px;
}

.btn-notas:hover {
    background: #5a6268;
}

.btn-upload-nota {
    background: #28a745;
    color: white;
}

.btn-upload-nota:hover {
    background: #218838;
}

/* Formulário de upload no modal */
#formUploadNota .form-group {
    margin-bottom: 15px;
}

#formUploadNota .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e7f0;
    border-radius: 6px;
    font-size: 14px;
    transition: var(--transition);
}

#formUploadNota .form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
}

#formUploadNota input[type="file"] {
    padding: 10px;
    border: 2px dashed #dce4f0;
    border-radius: 6px;
    width: 100%;
    cursor: pointer;
}

#formUploadNota input[type="file"]:hover {
    border-color: var(--primary-blue);
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .nota-card {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .nota-acoes {
        justify-content: flex-end;
    }
}

.modal-visualizador-wrapper .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-visualizador-wrapper .modal-content {
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

/* Notas Grid - Melhorias */
.notas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.nota-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    background: #f8faff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nota-card:hover {
    border-color: var(--primary-blue);
    background: #e3f2fd;
    transform: translateX(4px);
}

.nota-card.erro {
    border-left: 4px solid #e74c3c;
}

.nota-card.sucesso {
    border-left: 4px solid #2ecc71;
}

.nota-card.pendente {
    border-left: 4px solid #f39c12;
}

.nota-info {
    flex: 1;
    min-width: 0;
}

.nota-numero {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 15px;
}

.nota-chave {
    font-size: 11px;
    color: var(--text-light);
    font-family: monospace;
    margin: 2px 0;
    word-break: break-all;
}

.nota-detalhes {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-light);
    flex-wrap: wrap;
}

.nota-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 4px;
}

.nota-status.erro {
    background: #fce4ec;
    color: #c62828;
}

.nota-status.sucesso {
    background: #e8f5e9;
    color: #2e7d32;
}

.nota-status.pendente {
    background: #fff3e0;
    color: #e65100;
}

.nota-acoes {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 12px;
}

.btn-visualizar {
    background: var(--primary-blue);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    border: none;
    cursor: pointer;
}

.btn-visualizar:hover {
    background: var(--primary-dark);
}

.btn-notas {
    background: #6c757d;
    color: white;
    margin-right: 4px;
}

.btn-notas:hover {
    background: #5a6268;
}

.btn-upload-nota {
    background: #28a745;
    color: white;
}

.btn-upload-nota:hover {
    background: #218838;
}

/* Responsividade */
@media (max-width: 768px) {
    .modal-content {
        max-width: 98% !important;
        max-height: 98vh !important;
        width: 98% !important;
        height: 98vh !important;
    }
    
    .nota-card {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }
    
    .nota-acoes {
        justify-content: flex-end;
        margin-left: 0;
    }
    
    .nota-detalhes {
        flex-direction: column;
        gap: 4px;
    }
    
    .modal-visualizador-wrapper .modal-content {
        max-width: 98% !important;
        max-height: 98vh !important;
        width: 98% !important;
        height: 98vh !important;
    }
}

@media (max-width: 480px) {
    .nota-acoes {
        flex-wrap: wrap;
        justify-content: stretch;
    }
    
    .nota-acoes .btn-sm,
    .nota-acoes a {
        flex: 1;
        text-align: center;
        padding: 6px 8px;
        font-size: 11px;
    }
}

.erros-container {
    padding: 0;
    width: 100%;
}

.erros-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.erros-header .header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.erros-header .header-left h2 {
    color: var(--text-dark);
    font-size: 24px;
    margin: 0;
}

.erros-header .header-left p {
    color: var(--text-light);
    margin: 0;
    font-size: 14px;
}

.erros-header .header-right {
    display: flex;
    gap: 10px;
}

.erros-header .header-right .btn-login {
    width: auto;
    padding: 10px 20px;
    font-size: 14px;
}

.tipo-erro-badge {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}


#errosTableBody tr:hover {
    background: #f8faff;
}

#errosTableBody td {
    padding: 10px 14px;
    vertical-align: middle;
    font-size: 13px;
}

#errosTableBody .erro-detalhe {
    font-size: 12px;
    color: var(--text-light);
    max-width: 300px;
    word-break: break-word;
}

#errosTableBody .erro-detalhe div {
    margin-bottom: 2px;
}

#errosTableBody .erro-detalhe strong {
    color: var(--text-dark);
}

/* Badge de tipo de erro */
.tipo-erro-badge {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.tipo-erro-badge.referencia { background: #e74c3c; }
.tipo-erro-badge.ean { background: #f39c12; }
.tipo-erro-badge.quantidade { background: #3498db; }
.tipo-erro-badge.custo { background: #e67e22; }
.tipo-erro-badge.ncm { background: #9b59b6; }
.tipo-erro-badge.outro { background: #6b7a8f; }

/* Responsividade */
@media (max-width: 768px) {
    .erros-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .erros-header .header-right {
        width: 100%;
    }
    
    .erros-header .header-right .btn-login {
        width: 100%;
        justify-content: center;
    }
    
    #errosTableBody td {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    #errosTableBody .erro-detalhe {
        max-width: 150px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .erros-header .header-left h2 {
        font-size: 20px;
    }
    
    .erros-header .header-left p {
        font-size: 12px;
    }
    
    .table-scroll {
        max-height: 400px;
    }
}

/* Gráficos do Dashboard */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.chart-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    transition: var(--transition);
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.chart-card:hover {
    box-shadow: var(--shadow-hover);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eef2f7;
}

.chart-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.chart-container {
    flex: 1;
    position: relative;
    min-height: 200px;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Responsividade dos gráficos */
@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .chart-card {
        min-height: 250px;
        padding: 16px;
    }
    
    .chart-container {
        min-height: 180px;
    }
}

@media (max-width: 480px) {
    .chart-card {
        min-height: 220px;
        padding: 12px;
    }
    
    .chart-container {
        min-height: 160px;
    }
    
    .chart-header h3 {
        font-size: 13px;
    }
}

.token-input-wrapper {
    position: relative;
}

.token-input-wrapper input {
    width: 100%;
    padding: 12px 16px;
    font-size: 24px;
    letter-spacing: 8px;
    text-align: center;
    border: 2px solid #e0e7f0;
    border-radius: 8px;
    transition: var(--transition);
    background: #f8faff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.token-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
    background: var(--white);
}

.token-counter {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
}

.btn-reenviar {
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    font-size: 13px;
    padding: 4px 12px;
    transition: var(--transition);
    text-decoration: underline;
}

.btn-reenviar:hover {
    color: var(--primary-dark);
}

.btn-reenviar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}


/* Upload de arquivo */
.file-upload-wrapper {
    margin: 10px 0;
}

.file-upload-wrapper input[type="file"] {
    display: none;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 30px 20px;
    border: 2px dashed #dce4f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8faff;
    flex-direction: column;
}

.file-upload-label:hover {
    border-color: var(--primary-blue);
    background: #e3f2fd;
}

.file-upload-label .file-icon {
    font-size: 32px;
}

.file-upload-label .file-text {
    font-size: 14px;
    color: var(--text-light);
}

.file-info {
    margin-top: 10px;
    padding: 10px 14px;
    background: #e8f5e9;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.file-info #fileName {
    font-weight: 500;
    color: var(--text-dark);
}

.file-info #fileSize {
    color: var(--text-light);
}

/* Responsividade */
@media (max-width: 480px) {
    .file-upload-label {
        padding: 20px 15px;
    }
    
    .file-upload-label .file-icon {
        font-size: 24px;
    }
    
    .file-upload-label .file-text {
        font-size: 12px;
    }
}

/* Validação de Nota */
#validacaoResultado {
    font-size: 13px;
}

.validacao-status {
    padding: 16px 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 16px;
}

.validacao-status.validacao-ok {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid #2ecc71;
}

.validacao-status.validacao-erro {
    background: linear-gradient(135deg, #fce4ec 0%, #ffcdd2 100%);
    border: 2px solid #e74c3c;
}

.validacao-status .validacao-icon {
    font-size: 40px;
    line-height: 1;
    margin-bottom: 8px;
}

.validacao-status .validacao-titulo {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.validacao-status.validacao-ok .validacao-titulo {
    color: #1b5e20;
}

.validacao-status.validacao-erro .validacao-titulo {
    color: #b71c1c;
}

.validacao-status .validacao-sub {
    font-size: 13px;
    color: var(--text-light);
}

.validacao-itens-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

.validacao-item {
    background: #f8faff;
    border: 1px solid #eef2f7;
    border-left-width: 4px;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

.validacao-item.ok {
    border-left-color: #2ecc71;
    background: #f1f8e9;
}

.validacao-item.erro {
    border-left-color: #e74c3c;
    background: #fef5f5;
}

.validacao-item .item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.validacao-item .item-status {
    font-size: 16px;
}

.validacao-item .item-cod {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 13px;
}

.validacao-item .item-prod {
    font-size: 13px;
    color: var(--text-dark);
    flex: 1;
}

.validacao-item .item-info {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11px;
    color: var(--text-light);
}

.validacao-item .item-info span {
    background: white;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #eef2f7;
}

.validacao-item .item-erros {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.item-erro {
    background: white;
    border-radius: 6px;
    padding: 8px 12px;
    border-left: 3px solid #e74c3c;
    font-size: 12px;
}

.item-erro .erro-regra {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    margin-right: 8px;
    letter-spacing: 0.3px;
}

.item-erro .erro-msg {
    color: var(--text-dark);
    font-weight: 500;
}

.item-erro .erro-detalhe {
    display: flex;
    gap: 16px;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-light);
}

.item-erro .erro-esperado strong {
    color: #2e7d32;
}

.item-erro .erro-recebido strong {
    color: #c62828;
}

/* Responsividade */
@media (max-width: 480px) {
    .validacao-item .item-info {
        flex-direction: column;
        gap: 4px;
    }
    
    .item-erro .erro-detalhe {
        flex-direction: column;
        gap: 2px;
    }
}


/* public/css/style.css - Adicionar */

/* Banner de modo de validação */
.modo-validacao {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.modo-validacao .modo-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.modo-validacao.modo-pedidos {
    background: #e8f0fe;
    color: #0d47a1;
    border: 1px solid #b3d4fc;
}

.modo-validacao.modo-produtos {
    background: #fff8e1;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.modo-validacao strong {
    font-weight: 700;
}

/* Responsividade */
@media (max-width: 480px) {
    .modo-validacao {
        font-size: 12px;
        padding: 10px 12px;
    }
    
    .modo-validacao .modo-icon {
        font-size: 18px;
    }
}

/* =========================================
   SKELETON LOADERS & ANIMAÇÕES
   ========================================= */

/* Animação de brilho (Shimmer) */
@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton-line, .skeleton-box {
    background: #e2e8f0;
    background-image: linear-gradient(90deg, #e2e8f0 0px, #f8fafc 40px, #e2e8f0 80px);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite linear forwards;
    border-radius: 6px;
}

/* Skeleton da Tabela */
.skeleton-table-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    width: 100%;
}

.skeleton-table {
    width: 100%;
    border-collapse: collapse;
}

.skeleton-table th, .skeleton-table td {
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f7;
}

/* Skeleton do Dashboard */
.skeleton-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.skeleton-card {
    background: var(--white);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

/* Spinner animado (Para modais e ações pontuais) */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(26, 115, 232, 0.2);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    text-align: center;
    color: var(--text-light);
    font-weight: 500;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* =========================================
   FULLSCREEN LOADER (Tela de Carregamento)
   ========================================= */
.fullscreen-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #f0f4f8; /* Cor de fundo do sistema */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Fica acima de tudo */
    transition: opacity 0.4s ease, visibility 0.4s ease;
    opacity: 1;
    visibility: visible;
}

/* Classe que esconde o loader com fade out */
.fullscreen-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    animation: pulse 2s infinite ease-in-out;
}

.loader-content h3 {
    color: var(--primary-dark, #0d47a1);
    margin-top: 20px;
    font-size: 20px;
    font-weight: 600;
}

.loader-content p {
    color: #6b7a8f;
    margin-top: 8px;
    font-size: 14px;
}

/* Spinner Animado */
.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border: 4px solid rgba(26, 115, 232, 0.15);
    border-left-color: var(--primary-blue, #1a73e8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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