/* Reset e configurações base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 5px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

/* Container principal responsivo */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

#word {
    display: none;
}

#word input {
    width: 100px;
    margin-top: 2px;
    border: 2px solid #546223;
    border-radius: 8px;
    padding: 5px;
    font-size: 10px;
    transition: all 0.3s ease;
}

#word input:focus {
    outline: none;
    border-color: #546223;
    box-shadow: 0 0 0 3px rgba(116, 98, 35, 0.1);
}

/* Animações SVG modernizadas */
.animate-svg {
    stroke-dasharray: 1175;
    stroke-dashoffset: 1175;
    stroke: #696969;
    fill-opacity: 0;
    stroke-width: 2px;
    position: relative;
    margin: auto;
    animation: dash 3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

@keyframes dash {
    99% {
        stroke: #696969;
        fill-opacity: 0;
    }
    to {
        stroke-dashoffset: 0;
        fill-opacity: 1;
        stroke: #546223;
    }
}

/* Partículas eletrônicas com efeitos modernos */
.eletron, .eletron1 {
    width: 20px;
    height: 20px;
    background: #E6EBF3; /* Invisível inicialmente - cor do fundo */
    border-radius: 50%;
    display: block;
    position: relative;
    top: -400px;
    left: -350px;
    motion-path: path('m20.83336,233.00418c18.99999,156.04685 729.99996,54.29717 671.99996,-132.95906c-58,-187.25622 -690.99996,-23.0878 -671.99996,132.95906z');
    offset-path: path('m20.83336,233.00418c18.99999,156.04685 729.99996,54.29717 671.99996,-132.95906c-58,-187.25622 -690.99996,-23.0878 -671.99996,132.95906z');
    offset-distance: 0%;
    animation: eletron-ball 1.5s infinite cubic-bezier(1, 1, 1, 1);
    animation-delay: 3s;
    box-shadow: none; /* Sem sombra enquanto invisível */
}

.eletron1 {
    top: -420px;
    animation-delay: 3.75s;
}

@keyframes eletron-ball {
    0% {
        offset-distance: 0;
        background: #546223; /* Invisível no início */
        transform: scale(1);
        box-shadow: none;
    }
    1% {
        background: radial-gradient(circle, #546223, #546223); /* Aparece após o desenho completar */
        box-shadow: 0 0 10px rgba(84, 98, 35, 0.4);
    }
    50% {
        background: radial-gradient(circle, #546223, #546223);
        transform: scale(1.2);
        box-shadow: 0 0 15px rgba(84, 98, 35, 0.6);
    }
    100% {
        offset-distance: 100%;
        background: radial-gradient(circle, #546223, #546223);
        transform: scale(1);
        box-shadow: 0 0 10px rgba(84, 98, 35, 0.4);
    }
}

/* SVG mini animações */
.animate_mini-svg {
    z-index: 2;
    position: fixed;
    top: 1px;
    left: 1px;
    width: 50px;
    height: 50px;
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    stroke: #546223;
    fill-opacity: 0;
    animation: dash2 3s linear forwards infinite;
}

.animate_mini-svg-center {
    z-index: 2;
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 160px;
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    stroke: #546223;
    fill-opacity: 0;
    animation: dash2 3s linear forwards infinite;
}

@keyframes dash2 {
    to {
        stroke-dashoffset: 0;
        fill-opacity: 1;
        stroke: #546223;
    }
}

/* Utilitários */
.inline {
    display: inline;
}

/* Links modernizados */
a {
    color: #101401;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 2px 4px;
}

a:visited {
    color: #101401;
}

a:hover {
    color: #000000;
    background: linear-gradient(45deg, #bec6b9, #d4dbc8);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

a:active {
    color: #000000;
    transform: translateY(0);
}

/* Sistema de botões modernizado */
.button {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    color: #546223;
    border: 2px solid #546223;
    border-radius: 12px;
    font-weight: 500;
    font-size: 16px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button:hover {
    background: linear-gradient(145deg, #f8f8f8, #e8e8e8);
    border-color: #546223;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(116, 98, 35, 0.2);
    font-weight: 600;
}

.button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Botões com variações de cor */
.button_y {
    background: linear-gradient(145deg, #f5f3e0, #e8e4c8);
    color: #4a4a4a;
    border: 2px solid #d4c794;
    border-radius: 12px;
    font-weight: 500;
    font-size: 16px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button_y:hover {
    background: linear-gradient(145deg, #ede9d0, #d9d3b8);
    border-color: #b8a570;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(180, 165, 112, 0.2);
    font-weight: 600;
}

.button_y2, .button_x, .button_x2 {
    background: linear-gradient(145deg, #ffffff, #f8f8f8);
    color: #dc3545;
    border: 2px solid #dc3545;
    border-radius: 12px;
    font-weight: 500;
    font-size: 16px;
    padding: 4px 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.button_y2:hover, .button_x:hover, .button_x2:hover {
    background: linear-gradient(145deg, #fff3cd, #ffecb5);
    border-color: #dc3545;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
    font-weight: 600;
}

/* Alertas e links especiais */
.div_alerta {
    color: #dc3545;
    font-size: 20px;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    animation: none;
    box-shadow: none;
    position: sticky;
    top: 40;
    z-index: 2;
}

.div_alerta:not(:empty) {
    background: linear-gradient(45deg, #fff3cd, #ffecb5);
    padding: 4px 4px;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
    animation: blink 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.linkplan {
    color: #0066cc;
    font-size: 20px;
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 0;
    animation: none;
    box-shadow: none;
}

.linkplan:not(:empty) {
    background: linear-gradient(45deg, #fff3cd, #ffecb5);
    padding: 4px 4px;
    border-radius: 8px;
    border-left: 4px solid #0066cc;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.2);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Tabelas modernizadas e responsivas */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

table {
    border-collapse: collapse;
    width: 100%;
    margin: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

th {
    background: linear-gradient(145deg, #546223, #8beb3d);
    color: white;
    text-align: center;
    padding: 4px 4px;
    font-weight: 600;
    border: none;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    border: 1px solid #e0e0e0;
    font-weight: 500;
    text-align: center;
    padding: 4px;
    transition: background-color 0.2s ease;
}

tr:hover {
    background: linear-gradient(90deg, #e0e1e2, #e9ecef);
    transform: scale(1.00);
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

td.value {
    text-align: left;
    padding: 4px 4px;
}

td.value img {
    vertical-align: middle;
    margin: 5px 5px 5px 0;
    border-radius: 4px;
}

/* Tabelas especiais */
.tabela-diferente th,
.tabela-diferente td {
    min-width: 120px;
}

#feriado {
    border: 4px solid #ff6b6b;
    border-radius: 8px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        box-shadow: 0 0 5px #ff6b6b;
    }
    to {
        box-shadow: 0 0 20px #ff6b6b, 0 0 30px #ff6b6b;
    }
}

/* Tabelas sem bordas */
.sem_bordas table {
    border-collapse: collapse;
    width: 100%;
    background: transparent;
}

.sem_bordas th {
    border: none;
    text-align: center;
    background: linear-gradient(145deg, #4CAF50, #45a049);
    color: white;
}

.sem_bordas tr:hover {
    background: rgba(76, 175, 80, 0.1);
}

.sem_bordas td {
    border: none;
    font-weight: 500;
    text-align: center;
}

/* Estilos especiais para tabelas */
.rhons th {
    background: linear-gradient(145deg, #b2e2f2, #9dd9ea);
    color: #2c3e50;
}

.impar {
    border: 2px solid #3498db;
    background: linear-gradient(145deg, #b1e1f1, #9dd9ea);
    color: #2c3e50;
}

.par {
    border: 2px solid #3498db;
    color: #2c3e50;
    background: rgba(177, 225, 241, 0.3);
}

/* Acessibilidade */
.auraltext {
    position: absolute;
    font-size: 0;
    left: -9999px;
    top: -9999px;
}

/* Tooltips modernizados */
.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 2px dotted #546223;
    cursor: help;
}

.tooltip .tooltiptext,
.tooltip .tooltiptext2,
.tooltip .tooltiptext3 {
    visibility: hidden;
    background: linear-gradient(145deg, #2c3e50, #34495e);
    color: white;
    text-align: center;
    border-radius: 8px;
    padding: 4px 4px;
    position: absolute;
    z-index: 1000;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tooltip .tooltiptext {
    width: 300px;
    top: 150%;
    left: 50%;
    margin-left: -20px;
}

.tooltip .tooltiptext2 {
    width: 310px;
    top: 150%;
    left: 50%;
    margin-left: -230px;
}

.tooltip .tooltiptext3 {
    width: 300px;
    top: 100%;
    left: 50%;
    margin-left: -150px;
}

.tooltip:hover .tooltiptext,
.tooltip:hover .tooltiptext2,
.tooltip:hover .tooltiptext3 {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.contadoronline,
.contadoronline2,
.usuariologado {
    position: fixed;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 2px 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    font-weight: 500;
}

.usuariologado {
    top: 20px;
}

.contadoronline {
    top: 44px;
}

.contadoronline2 {
    top: 68px;
}

.topo, .topo_2, .menu_fixo {
    position: fixed;
    right: 30px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(125, 207, 47, 0.3);
    cursor: pointer;
    z-index: 1000;
    transform-origin: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.topo {
    bottom: 20px;
}

.menu_fixo {
    bottom: 210px;
    z-index: 3;
}

.topo_2 {
    top: 180px;
}

.topo:hover, .topo_2:hover, .menu_fixo:hover {
    box-shadow: 0 6px 16px rgba(125, 207, 47, 0.6);
    filter: brightness(1.1);
}

.topo img, .topo_2 img, .menu_fixo img {
    width: 30px;
    height: 30px;
    display: block;
}

.menu-container {
    position: fixed;
    right: 30px;
    bottom: 320px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 1001;
}

.bt_topo, .bt_ferias, .bt_turno, .bt_treinamento, .bt_dispensa, .bt_convocacao {
    width: 30px;
    height: 30px;
    margin: 5;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    transform-origin: center;
}

.bt_topo:hover, .bt_ferias:hover, .bt_turno:hover, 
.bt_treinamento:hover, .bt_dispensa:hover, .bt_convocacao:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.75);
    filter: brightness(1.1);
}

.bt_topo img, .bt_ferias img, .bt_turno img, 
.bt_treinamento img, .bt_dispensa img, .bt_convocacao img {
    width: 30px;
    height: 30px;
    display: block;
}

/* Layout de caixas */
#leftbox,
#rightbox {
    width: 48%;
    height: auto;
    min-height: 280px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

#leftbox {
    float: left;
    margin-right: 4%;
}

#rightbox {
    float: right;
}

#middlebox {
    float: left;
    width: 30%;
    height: auto;
    min-height: 280px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 0 1.5%;
    margin-bottom: 20px;
}

/* Grid modernizado */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 5px;
    border-radius: 12px;
    margin: 20px 0;
}

.grid-container > div {
    background: rgba(255, 255, 255, 0.95);
    text-align: center;
    padding: 7px 5px;
    font-size: 14px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.grid-container > div:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

/* Animação de piscar modernizada */
@keyframes blink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.0;
        transform: scale(1.00);
    }
}

.blinking {
    animation: blink 1.5s ease-in-out infinite;
    color: #dc3545;
    background: linear-gradient(45deg, #fff3cd, #ffecb5);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Responsividade */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .container {
        padding: 0 5px;
    }
    
    #leftbox,
    #middlebox,
    #rightbox {
        float: none;
        width: 100%;
        margin: 0 0 20px 0;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
        padding: 7px;
    }
    
    .grid-container > div {
        font-size: 14px;
        padding: 5px 3px;
    }
    
    table {
        font-size: 14px;
    }
    
    th,
    td {
        padding: 3px 2px;
    }
    
    .tooltip .tooltiptext,
    .tooltip .tooltiptext2,
    .tooltip .tooltiptext3 {
        width: 250px;
        font-size: 12px;
    }
    
    .button,
    .button_y,
    .button_y2,
    .button_x,
    .button_x2 {
        font-size: 14px;
        padding: 5px 10px;
    }
    
    .animate_mini-svg-center {
        width: 150px;
        height: 120px;
    }
    
    .contadoronline,
    .contadoronline2,
    .usuariologado {
        right: 10px;
        font-size: 12px;
        padding: 3px 5px;
    }
    
    .topo,
    .topo_2,
    .menu_fixo {
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    .topo img,
    .topo_2 img,
    .menu_fixo img {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .grid-container > div {
        font-size: 14px;
        padding: 7px 5px;
    }
    
    .div_alerta,
    .linkplan {
        font-size: 16px;
        padding: 5px 6px;
    }
    
    th,
    td {
        padding: 3px 2px;
        font-size: 12px;
    }
    
    .tooltip .tooltiptext,
    .tooltip .tooltiptext2,
    .tooltip .tooltiptext3 {
        width: 200px;
        font-size: 11px;
    }
}

/* Animação suave para carregamento */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Melhorias de performance */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modo escuro (opcional) */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #a0a0a0 0%, #c0c0c0 100%);
        color: #000000;
    }
    
    .container {
        background: rgba(52, 73, 94, 0.1);
    }
    
    .eletron, .eletron1 {
        background: #a8a8a8; /* Invisível inicialmente - cor do fundo */
    }

    #leftbox,
    #middlebox,
    #rightbox {
        background: rgba(44, 62, 80, 0.9);
        color: #ecf0f1;
    }
    
    table {
        background: #A0A0A0; /*rgba(44, 62, 80, 0.9);*/
        color: #000000;
    }
    
    td {
        border-color: #4a6741;
    }

    th {
        background: linear-gradient(145deg, #090909, #bababa);
        color: white;
        text-align: center;
        padding: 4px 4px;
        font-weight: 600;
        border: none;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    tr:nth-child(even) {
        background-color: #909090;
    }

    tr:hover {
        background: rgba(82, 152, 219, 0.1);
    }
    
    .grid-container > div {
        background: rgba(44, 62, 80, 0.95);
        color: #ecf0f1;
    }
}
