/**
 * SioreX - Componentes Industriais
 * Tema Metal Desgastado com efeitos de texto gravado
 */

/* ============================================================
   TELA DE LOGIN - Estilo Metálico Industrial
   ============================================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;

    /* Chapa metálica envelhecida com oxidação */
    background:
        /* Textura de ruído/grão metálico */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E"),
        /* Manchas de oxidação cobre/ferrugem - canto superior esquerdo */
        radial-gradient(ellipse 60% 50% at 10% 15%,
            rgba(168, 101, 64, 0.25) 0%,
            rgba(140, 62, 28, 0.15) 30%,
            transparent 70%
        ),
        /* Manchas de oxidação - canto inferior direito */
        radial-gradient(ellipse 50% 60% at 85% 80%,
            rgba(140, 62, 28, 0.2) 0%,
            rgba(112, 60, 36, 0.12) 40%,
            transparent 70%
        ),
        /* Reflexo metálico prateado - diagonal */
        radial-gradient(ellipse 80% 40% at 70% 30%,
            rgba(200, 200, 200, 0.08) 0%,
            rgba(160, 160, 160, 0.04) 40%,
            transparent 70%
        ),
        /* Mancha escura de desgaste - centro inferior */
        radial-gradient(ellipse 70% 40% at 40% 90%,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.1) 50%,
            transparent 80%
        ),
        /* Brilho sutil no topo */
        linear-gradient(180deg,
            rgba(80, 80, 80, 0.4) 0%,
            transparent 20%
        ),
        /* Escurecimento nas bordas (vinheta) */
        radial-gradient(ellipse 100% 100% at 50% 50%,
            transparent 40%,
            rgba(0, 0, 0, 0.4) 100%
        ),
        /* Gradiente base - metal cinza escuro */
        linear-gradient(160deg,
            #3a3a3a 0%,
            #2a2a2a 20%,
            #1e1e1e 40%,
            #252525 60%,
            #1a1a1a 80%,
            #151515 100%
        );

    /* Sombra interna para profundidade */
    box-shadow:
        inset 0 0 100px rgba(0, 0, 0, 0.5),
        inset 0 0 200px rgba(0, 0, 0, 0.3);
}

/* Textura escovada e arranhões sutis */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        /* Arranhões sutis diagonais */
        repeating-linear-gradient(
            35deg,
            transparent,
            transparent 100px,
            rgba(0, 0, 0, 0.08) 100px,
            rgba(0, 0, 0, 0.12) 100.5px,
            transparent 101px
        ),
        repeating-linear-gradient(
            -20deg,
            transparent,
            transparent 150px,
            rgba(255, 255, 255, 0.02) 150px,
            rgba(255, 255, 255, 0.03) 150.5px,
            transparent 151px
        ),
        /* Textura escovada horizontal */
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.008) 2px,
            rgba(255, 255, 255, 0.008) 4px
        );
    pointer-events: none;
    z-index: 0;
}

/* Manchas de oxidação */
.login-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        /* Mancha cobre superior direita */
        radial-gradient(ellipse 40% 35% at 90% 10%,
            rgba(192, 106, 60, 0.15) 0%,
            rgba(168, 82, 40, 0.08) 50%,
            transparent 80%
        ),
        /* Mancha cobre inferior esquerda */
        radial-gradient(ellipse 35% 30% at 8% 85%,
            rgba(168, 101, 64, 0.12) 0%,
            rgba(140, 62, 28, 0.06) 50%,
            transparent 80%
        ),
        /* Mancha oxidação esverdeada (pátina) sutil */
        radial-gradient(ellipse 25% 20% at 5% 40%,
            rgba(70, 90, 70, 0.08) 0%,
            rgba(50, 70, 50, 0.04) 50%,
            transparent 80%
        ),
        /* Reflexo metálico central */
        radial-gradient(ellipse 60% 30% at 50% 50%,
            rgba(150, 150, 150, 0.03) 0%,
            transparent 60%
        );
    pointer-events: none;
    z-index: 0;
}

/* Texto SIOREX gravado no metal - marca d'água superior esquerda */
.login-container .login-card::before {
    content: 'SIOREX';
    position: fixed;
    top: 5%;
    left: 1%;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 180px;
    font-weight: 800;
    letter-spacing: 18px;
    transform: rotate(-10deg);

    /* Mesma cor do fundo - invisível exceto pelas sombras */
    color: #252525;

    /* Efeito de gravação profunda - só sombras criam a ilusão */
    text-shadow:
        /* Luz na borda superior (borda iluminada do sulco) */
        0 -1px 0 rgba(80, 80, 80, 0.6),
        0 -2px 1px rgba(100, 100, 100, 0.4),
        /* Sombra profunda embaixo (fundo do sulco) */
        0 2px 1px rgba(0, 0, 0, 0.8),
        0 3px 2px rgba(0, 0, 0, 0.6),
        0 4px 4px rgba(0, 0, 0, 0.4),
        /* Profundidade lateral */
        1px 1px 1px rgba(0, 0, 0, 0.5),
        -1px -1px 0 rgba(60, 60, 60, 0.3);

    pointer-events: none;
    z-index: 0;
}

/* Texto SIOREX gravado - canto inferior direito */
.login-container .login-card::after {
    content: 'SIOREX';
    position: fixed;
    bottom: 2%;
    right: -8%;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 160px;
    font-weight: 800;
    letter-spacing: 15px;
    transform: rotate(15deg);

    /* Mesma cor do fundo */
    color: #222222;

    /* Efeito de gravação profunda */
    text-shadow:
        0 -1px 0 rgba(70, 70, 70, 0.5),
        0 -2px 1px rgba(90, 90, 90, 0.35),
        0 2px 1px rgba(0, 0, 0, 0.7),
        0 3px 2px rgba(0, 0, 0, 0.5),
        0 4px 3px rgba(0, 0, 0, 0.35),
        1px 1px 1px rgba(0, 0, 0, 0.4),
        -1px -1px 0 rgba(55, 55, 55, 0.25);

    pointer-events: none;
    z-index: 0;
}

/* Terceiro texto SIOREX - centro direita (usando subtitle como base) */
.login-container .login-subtitle::before {
    content: 'SIOREX';
    position: fixed;
    top: 40%;
    right: -12%;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 140px;
    font-weight: 800;
    letter-spacing: 12px;
    transform: rotate(90deg);
    color: #232323;
    text-shadow:
        0 -1px 0 rgba(75, 75, 75, 0.5),
        0 -2px 1px rgba(95, 95, 95, 0.3),
        0 2px 1px rgba(0, 0, 0, 0.7),
        0 3px 2px rgba(0, 0, 0, 0.5),
        1px 1px 1px rgba(0, 0, 0, 0.4),
        -1px -1px 0 rgba(50, 50, 50, 0.2);
    pointer-events: none;
    z-index: 0;
}

/* Quarto texto SIOREX - esquerda vertical */
.login-container .login-subtitle::after {
    content: 'SIOREX';
    position: fixed;
    top: 35%;
    left: -10%;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 120px;
    font-weight: 800;
    letter-spacing: 10px;
    transform: rotate(-90deg);
    color: #242424;
    text-shadow:
        0 -1px 0 rgba(72, 72, 72, 0.45),
        0 -2px 1px rgba(88, 88, 88, 0.28),
        0 2px 1px rgba(0, 0, 0, 0.65),
        0 3px 2px rgba(0, 0, 0, 0.45),
        1px 1px 1px rgba(0, 0, 0, 0.35),
        -1px -1px 0 rgba(48, 48, 48, 0.18);
    pointer-events: none;
    z-index: 0;
}

/* Card de login - acima dos efeitos de fundo */
.login-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-logo {
    width: 200px;
    height: auto;
    margin-bottom: 8px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
}

/* ============================================================
   LOGIN COM IMAGEM DE FUNDO (CHAPA METÁLICA)
   ============================================================ */
.login-with-plate {
    background: url('../../../web/img/metal_plate.png') center center / cover no-repeat !important;
    box-shadow: none !important;
}

/* Remove texturas e efeitos quando usa imagem de fundo */
.login-with-plate::before,
.login-with-plate::after {
    display: none !important;
}

/* Remove os textos SIOREX gravados */
.login-with-plate .login-card::before,
.login-with-plate .login-card::after,
.login-with-plate .login-subtitle::before,
.login-with-plate .login-subtitle::after {
    display: none !important;
}

/* Subtítulo sobre imagem de fundo */
.login-with-plate .login-subtitle {
    color: #d4c4b0;
    background: none;
    -webkit-text-fill-color: #d4c4b0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    font-size: 16px;
    letter-spacing: 4px;
}

/* Card do formulário sobre imagem de fundo */
.login-with-plate .login-form-card {
    background: rgba(30, 25, 20, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 115, 85, 0.4);
}

/* Labels e textos sobre imagem de fundo */
.login-with-plate .login-form .form-label {
    color: #c4b4a0;
}

.login-with-plate .login-remember {
    color: #a09080;
}

.login-with-plate .login-version {
    color: #807060;
}

.login-subtitle {
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 30px;

    /* Texto metálico prateado */
    background: linear-gradient(180deg,
        #e8e8e8 0%,
        #c0c0c0 25%,
        #f5f5f5 50%,
        #a0a0a0 75%,
        #c8c8c8 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.5));
}

/* Card do formulário - Estilo metálico prateado igual ao sidebar-menu */
.login-form-card {
    position: relative;
    border-radius: 8px;
    padding: 30px 25px;

    /* Gradiente metálico prateado */
    background:
        /* Luz central (brilho suave no topo) */
        radial-gradient(ellipse 100% 40% at 50% 0%,
            rgba(255,255,255,0.3) 0%,
            transparent 60%
        ),
        /* Gradiente metálico prateado */
        linear-gradient(180deg,
            #e8e8e8 0%,
            #c0c0c0 25%,
            #f5f5f5 50%,
            #a0a0a0 75%,
            #c8c8c8 100%
        );

    /* Bordas metálicas */
    border: 2px solid;
    border-color: rgba(255,255,255,0.5) rgba(0,0,0,0.3) rgba(0,0,0,0.35) rgba(255,255,255,0.4);

    /* Sombras */
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.5),
        inset 0 -1px 0 rgba(0,0,0,0.2),
        0 10px 40px rgba(0,0,0,0.6);
}

/* Parafusos nos 4 cantos */
.login-form-card::before,
.login-form-card::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        #909090 0%, #707070 30%, #505050 60%, #404040 100%
    );
    box-shadow: inset 0 -1px 1px rgba(255,255,255,0.4);
    z-index: 10;
}

.login-form-card::before {
    top: 10px;
    left: 10px;
}

.login-form-card::after {
    top: 10px;
    right: 10px;
}

/* Parafusos inferiores via pseudo-elementos do form */
.login-form {
    position: relative;
}

.login-form::before,
.login-form::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%,
        #909090 0%, #707070 30%, #505050 60%, #404040 100%
    );
    box-shadow: inset 0 -1px 1px rgba(255,255,255,0.4);
    z-index: 10;
}

.login-form::before {
    bottom: -20px;
    left: -15px;
}

.login-form::after {
    bottom: -20px;
    right: -15px;
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 16px;
}

/* Labels - Texto estampado no metal */
.login-form .form-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 6px;
    display: block;

    /* Cor metálica escura - como texto prensado */
    color: #404040;

    /* Efeito de texto prensado */
    text-shadow:
        0 1px 0 rgba(255,255,255,0.7),
        0 -1px 1px rgba(0,0,0,0.15);
}

/* Inputs - Área rebaixada no metal */
.login-form .form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;

    /* Fundo afundado */
    background:
        linear-gradient(180deg,
            rgba(0,0,0,0.15) 0%,
            rgba(0,0,0,0.08) 50%,
            rgba(255,255,255,0.05) 100%
        );

    /* Borda metálica */
    border: 1px solid #808080;

    /* Texto escuro */
    color: #2a2a2a;

    /* Efeito de sulco */
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.2),
        inset 0 -1px 0 rgba(255,255,255,0.3);
}

.login-form .form-control::placeholder {
    color: #707070;
}

.login-form .form-control:focus {
    outline: none;
    border-color: var(--copper-400);
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.2),
        0 0 0 2px rgba(192, 106, 60, 0.3);
}

.login-form .form-control:hover:not(:focus) {
    border-color: #606060;
}

/* Checkbox - Estilo metálico */
.login-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;

    /* Texto estampado */
    color: #505050;
    text-shadow:
        0 1px 0 rgba(255,255,255,0.7),
        0 -1px 1px rgba(0,0,0,0.15);
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--copper-500);
}

/* Mensagem de erro */
.login-error {
    background: linear-gradient(180deg, #c45050 0%, #a03030 100%);
    color: #fff;
    border: 1px solid #802020;
    border-radius: 4px;
    padding: 10px 12px;
    margin-top: 16px;
    font-size: 13px;
    font-weight: 500;
    display: none;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.3);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 2px 6px rgba(0,0,0,0.3);
}

.login-error.show {
    display: block;
}

/* Botão ENTRAR - Estilo metálico cobre */
.login-btn {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;

    /* Gradiente metálico cobre */
    background:
        linear-gradient(180deg,
            #C08050 0%,
            #A86840 15%,
            #8C5030 40%,
            #703C24 60%,
            #8C5030 85%,
            #A86840 100%
        );

    /* Borda */
    border: 1px solid #4A2810;

    /* Texto claro */
    color: #F8F0E8;

    /* Texto gravado */
    text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.5);

    /* Sombra */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.4);
}

.login-btn:hover {
    background:
        linear-gradient(180deg,
            #D09060 0%,
            #B87850 15%,
            #9C6040 40%,
            #804C34 60%,
            #9C6040 85%,
            #B87850 100%
        );
    color: #FFFFFF;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2),
        0 6px 16px rgba(0, 0, 0, 0.5);
}

.login-btn:active {
    background:
        linear-gradient(180deg,
            #703C24 0%,
            #8C5030 25%,
            #A86840 50%,
            #8C5030 75%,
            #703C24 100%
        );
    box-shadow:
        inset 0 2px 6px rgba(0, 0, 0, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(1px);
}

/* Versão */
.login-version {
    font-size: 11px;
    margin-top: 24px;
    letter-spacing: 1px;

    /* Texto metálico sutil */
    color: #606060;
    text-shadow: 0 1px 0 rgba(255,255,255,0.1);
}

/* ============================================================
   TREE VIEW (Hierarquias)
   ============================================================ */
.tree-view {
    background:
        var(--texture-grain),
        linear-gradient(180deg,
            #2A2724 0%,
            #1E1C1A 100%
        );
    border: 1px solid #1E1C1A;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #2A2724;
    transition: background-color 0.15s ease;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.4);
}

.tree-item:hover {
    background: var(--hover-bg);
}

.tree-item.selected {
    background: var(--hover-bg-strong);
}

.tree-item-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.tree-item-toggle i {
    transition: transform 0.2s ease;
}

.tree-item.expanded .tree-item-toggle i {
    transform: rotate(90deg);
}

.tree-item-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
    flex-shrink: 0;
}

.tree-item-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tree-item-code {
    font-weight: 600;
    color: var(--bronze-200);
}

.tree-item-name {
    color: var(--text-light);
}

.tree-item-badge {
    margin-left: auto;
}

.tree-children {
    display: none;
    padding-left: 24px;
    background: rgba(0,0,0,0.1);
}

.tree-children.show {
    display: block;
}

/* Níveis hierárquicos - cores bronze industrial */
.tree-item[data-level="1"] { background: linear-gradient(90deg, #382A1E 0%, #2A1E14 100%); }
.tree-item[data-level="1"] .tree-item-code,
.tree-item[data-level="1"] .tree-item-name { color: var(--bronze-100); }

.tree-item[data-level="2"] { background: linear-gradient(90deg, #483828 0%, #382A1E 100%); }
.tree-item[data-level="2"] .tree-item-code,
.tree-item[data-level="2"] .tree-item-name { color: var(--bronze-100); }

.tree-item[data-level="3"] { background: linear-gradient(90deg, #5A4530 0%, #483828 100%); }
.tree-item[data-level="3"] .tree-item-code,
.tree-item[data-level="3"] .tree-item-name { color: var(--bronze-50); }

.tree-item[data-level="4"] { background: linear-gradient(90deg, #705638 0%, #5A4530 100%); }
.tree-item[data-level="4"] .tree-item-code,
.tree-item[data-level="4"] .tree-item-name { color: #FFFFFF; }

.tree-item[data-level="5"] { background: linear-gradient(90deg, #8C6E4A 0%, #705638 100%); }
.tree-item[data-level="5"] .tree-item-code,
.tree-item[data-level="5"] .tree-item-name { color: #1E1C1A; }

.tree-item[data-level="6"] { background: linear-gradient(90deg, #A8865C 0%, #8C6E4A 100%); }
.tree-item[data-level="6"] .tree-item-code,
.tree-item[data-level="6"] .tree-item-name { color: #1E1C1A; }

/* ============================================================
   TABS INDUSTRIAIS
   ============================================================ */
.tabs-metallic {
    display: flex;
    border-bottom: 2px solid #1E1C1A;
    margin-bottom: 16px;
    background:
        var(--texture-grain),
        linear-gradient(180deg,
            #3A3632 0%,
            #2A2724 100%
        );
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.tab-item {
    padding: 12px 20px;
    cursor: pointer;
    color: var(--text-muted);
    font-weight: 600;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.4);
}

.tab-item:hover {
    color: var(--hover-text);
    background: var(--hover-bg-light);
}

.tab-item.active {
    color: var(--bronze-200);
    border-bottom-color: var(--bronze-400);
    text-shadow:
        0 -1px 1px rgba(0,0,0,0.6),
        0 1px 0 rgba(255,255,255,0.08);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================================
   CONTEXT MENU INDUSTRIAL
   ============================================================ */
.context-menu {
    position: fixed;
    z-index: 10000;
    min-width: 180px;
    background:
        var(--texture-noise-heavy),
        linear-gradient(180deg,
            #3A3632 0%,
            #2A2724 100%
        );
    border: 1px solid #4A4640;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0,0,0,0.7);
    padding: 4px 0;
    display: none;
}

.context-menu.show {
    display: block;
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    color: var(--text);
    font-size: var(--font-size-base);
    transition: all 0.15s ease;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.4);
}

.context-menu-item:hover {
    background: var(--hover-bg);
    color: var(--hover-text);
}

.context-menu-item i {
    width: 20px;
    text-align: center;
}

.context-menu-separator {
    height: 1px;
    background-color: #4A4640;
    margin: 4px 8px;
}

/* ============================================================
   PROGRESS BAR INDUSTRIAL
   ============================================================ */
.progress-metallic {
    height: 24px;
    background:
        var(--texture-grain),
        linear-gradient(180deg,
            #1E1C1A 0%,
            #2A2724 50%,
            #1E1C1A 100%
        );
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid #141210;
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.5);
}

.progress-bar-metallic {
    height: 100%;
    background:
        var(--texture-noise-heavy),
        linear-gradient(180deg,
            var(--bronze-300) 0%,
            var(--bronze-500) 50%,
            var(--bronze-700) 100%
        );
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bronze-50);
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.5);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2);
}

/* ============================================================
   SWITCH TOGGLE INDUSTRIAL
   ============================================================ */
.switch-metallic {
    position: relative;
    width: 48px;
    height: 26px;
    display: inline-block;
}

.switch-metallic input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        var(--texture-grain),
        linear-gradient(180deg,
            #2A2724 0%,
            #1E1C1A 100%
        );
    transition: 0.3s;
    border-radius: 26px;
    border: 1px solid #4A4640;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background:
        var(--texture-noise-heavy),
        linear-gradient(180deg,
            #7A7670 0%,
            #5E5A54 50%,
            #4A4640 100%
        );
    transition: 0.3s;
    border-radius: 50%;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.2),
        0 2px 4px rgba(0,0,0,0.4);
}

.switch-metallic input:checked + .switch-slider {
    background:
        var(--texture-grain),
        linear-gradient(180deg,
            var(--patina-600) 0%,
            var(--patina-800) 100%
        );
    border-color: var(--patina-700);
}

.switch-metallic input:checked + .switch-slider:before {
    transform: translateX(22px);
    background:
        var(--texture-noise-heavy),
        linear-gradient(180deg,
            var(--patina-200) 0%,
            var(--patina-400) 50%,
            var(--patina-600) 100%
        );
}

/* ============================================================
   CHECKBOX INDUSTRIAL
   ============================================================ */
.checkbox-metallic {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.checkbox-metallic input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-mark {
    width: 20px;
    height: 20px;
    border: 1px solid #4A4640;
    border-radius: var(--radius-xs);
    background:
        var(--texture-grain),
        linear-gradient(180deg,
            #1E1C1A 0%,
            #2A2724 100%
        );
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.checkbox-metallic input:checked ~ .checkbox-mark {
    background:
        var(--texture-noise-heavy),
        linear-gradient(180deg,
            var(--bronze-400) 0%,
            var(--bronze-600) 100%
        );
    border-color: var(--bronze-700);
}

.checkbox-metallic input:checked ~ .checkbox-mark::after {
    content: '✓';
    color: var(--bronze-50);
    font-size: 14px;
    font-weight: bold;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.4);
}

/* ============================================================
   RADIO INDUSTRIAL
   ============================================================ */
.radio-metallic {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.radio-metallic input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-mark {
    width: 20px;
    height: 20px;
    border: 1px solid #4A4640;
    border-radius: 50%;
    background:
        var(--texture-grain),
        linear-gradient(180deg,
            #1E1C1A 0%,
            #2A2724 100%
        );
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.4);
}

.radio-metallic input:checked ~ .radio-mark {
    border-color: var(--bronze-500);
}

.radio-metallic input:checked ~ .radio-mark::after {
    content: '';
    width: 10px;
    height: 10px;
    background:
        var(--texture-noise-heavy),
        linear-gradient(180deg,
            var(--bronze-300) 0%,
            var(--bronze-500) 100%
        );
    border-radius: 50%;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

/* ============================================================
   LOADING OVERLAY
   ============================================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(14, 12, 10, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-box {
    background:
        var(--texture-noise-heavy),
        var(--texture-scratches),
        linear-gradient(180deg,
            #3A3632 0%,
            #2A2724 100%
        );
    padding: 30px 40px;
    border-radius: var(--radius-lg);
    text-align: center;
    border: 1px solid #4A4640;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7);
}

.loading-box .spinner-metallic {
    margin: 0 auto 16px;
}

.loading-box p {
    margin: 0;
    color: var(--bronze-200);
    font-size: var(--font-size-base);
    text-shadow: 0 -1px 1px rgba(0,0,0,0.5);
}

/* ============================================================
   TOAST NOTIFICATIONS - Placas Metálicas
   ============================================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    /* Placa metálica brilhante com parafusos */
    background:
        url('../img/screw-phillips.svg') 8px 50% no-repeat,
        url('../img/screw-phillips.svg') calc(100% - 8px) 50% no-repeat,
        linear-gradient(
            160deg,
            #E8E8E8 0%,
            #D0D0D0 15%,
            #F0F0F0 30%,
            #C8C8C8 50%,
            #E0E0E0 70%,
            #B8B8B8 85%,
            #D8D8D8 100%
        );
    background-size: 12px 12px, 12px 12px, auto;
    border-radius: 8px;
    padding: 14px 28px 14px 28px;
    min-width: 320px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    /* Efeito 3D */
    border: 1px solid #A0A0A0;
    border-top-color: #E0E0E0;
    border-left-color: #D8D8D8;
    border-bottom-color: #777;
    border-right-color: #888;
    box-shadow:
        4px 4px 12px rgba(0, 0, 0, 0.4),
        8px 8px 20px rgba(0, 0, 0, 0.25),
        inset 0 2px 3px rgba(255, 255, 255, 0.6),
        inset 0 -2px 4px rgba(0, 0, 0, 0.08);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Indicador colorido na lateral */
.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    border-radius: 0 2px 2px 0;
}

.toast.toast-success::before {
    background: linear-gradient(180deg, #4A8B4A 0%, #2E6B2E 100%);
    box-shadow: 0 0 8px rgba(74, 139, 74, 0.5);
}

.toast.toast-error::before {
    background: linear-gradient(180deg, #C04040 0%, #8B2020 100%);
    box-shadow: 0 0 8px rgba(192, 64, 64, 0.5);
}

.toast.toast-warning::before {
    background: linear-gradient(180deg, #C08040 0%, #8B5A20 100%);
    box-shadow: 0 0 8px rgba(192, 128, 64, 0.5);
}

.toast.toast-info::before {
    background: linear-gradient(180deg, #4070A0 0%, #2A4A70 100%);
    box-shadow: 0 0 8px rgba(64, 112, 160, 0.5);
}

.toast-icon {
    font-size: 22px;
    filter: drop-shadow(0 1px 0 rgba(255,255,255,0.5));
}

.toast-success .toast-icon { color: #2E6B2E; }
.toast-error .toast-icon { color: #8B2020; }
.toast-warning .toast-icon { color: #8B5A20; }
.toast-info .toast-icon { color: #2A4A70; }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 2px;
    color: #333;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
    font-size: 0.95rem;
}

.toast-message {
    font-size: 0.85rem;
    color: #555;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

.toast-close {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    transition: all 0.15s;
    border-radius: 4px;
}

.toast-close:hover {
    color: #333;
    background: rgba(0,0,0,0.1);
}

/* ============================================================
   TABELA METÁLICA INDUSTRIAL
   Destaca-se sobre fundos claros (prateado brilhante)
   ============================================================ */

/* Container responsivo com scroll */
.table-responsive {
    border-radius: var(--radius-md);
    /* Sombra forte para destacar do fundo claro */
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3);
    /* Scroll vertical com altura máxima */
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    overflow-x: auto;
    /* Esconde scrollbar mas mantém funcionalidade de scroll */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Esconde scrollbar no Chrome/Safari/Opera */
.table-responsive::-webkit-scrollbar {
    display: none;
}

/* Container da tabela */
.table-metallic {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-md);
    /* Borda fina com efeito 3D */
    border: 1px solid #888;
    border-top-color: #AAA;
    border-left-color: #999;
    border-bottom-color: #555;
    border-right-color: #666;
    /* Efeito 3D com sombra profunda */
    box-shadow:
        4px 4px 10px rgba(0, 0, 0, 0.4),
        8px 8px 20px rgba(0, 0, 0, 0.25),
        12px 12px 30px rgba(0, 0, 0, 0.15);
}

/* Cabeçalho da tabela - Metal escuro polido */
.table-metallic thead th {
    background:
        var(--texture-noise-heavy),
        var(--texture-brushed),
        linear-gradient(180deg,
            #5E5A54 0%,
            #4A4640 5%,
            #3A3632 20%,
            #2A2724 50%,
            #1E1C1A 80%,
            #141210 100%
        );
    /* Texto metálico prateado brilhante */
    color: #e0e0e0;
    font-weight: 700;
    text-transform: uppercase;
    font-size: var(--font-size-sm);
    letter-spacing: 0.5px;
    border-bottom: 2px solid #0E0C0A;
    border-right: 1px solid #1E1C1A;
    padding: 14px 12px;
    /* Texto gravado estilo metal */
    text-shadow:
        0 -1px 1px rgba(0,0,0,0.8),
        0 1px 0 rgba(255,255,255,0.15);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 -1px 0 rgba(0,0,0,0.4);
    /* Header fixo ao rolar */
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-metallic thead th:last-child {
    border-right: none;
}

/* Células do corpo - Cinza bem claro, quase branco */
.table-metallic tbody td {
    background: #F5F5F5;
    color: #333;
    padding: 12px;
    border-bottom: 1px solid #E0E0E0;
    border-right: 1px solid #E0E0E0;
}

.table-metallic tbody td:last-child {
    border-right: none;
}

/* Hover nas linhas - tom acobreado sólido */
.table-metallic tbody tr:hover td {
    background: #E8DCD4;
    box-shadow: inset 0 1px 0 0 #C49A7A, inset 0 -1px 0 0 #C49A7A;
}

.table-metallic tbody tr:hover td:first-child {
    box-shadow: inset 1px 0 0 0 #C49A7A, inset 0 1px 0 0 #C49A7A, inset 0 -1px 0 0 #C49A7A;
}

.table-metallic tbody tr:hover td:last-child {
    box-shadow: inset -1px 0 0 0 #C49A7A, inset 0 1px 0 0 #C49A7A, inset 0 -1px 0 0 #C49A7A;
}

/* Linha selecionada - contorno fino com fundo */
.table-metallic tbody tr.selected td {
    background: #D8D8D8;
    box-shadow:
        inset 0 1px 0 0 var(--copper-600),
        inset 0 -1px 0 0 var(--copper-600);
}

.table-metallic tbody tr.selected td:first-child {
    box-shadow:
        inset 1px 0 0 0 var(--copper-600),
        inset 0 1px 0 0 var(--copper-600),
        inset 0 -1px 0 0 var(--copper-600);
}

.table-metallic tbody tr.selected td:last-child {
    box-shadow:
        inset -1px 0 0 0 var(--copper-600),
        inset 0 1px 0 0 var(--copper-600),
        inset 0 -1px 0 0 var(--copper-600);
}

/* Botões de ação dentro da tabela */
.table-metallic .btn-link {
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.table-metallic .btn-link.text-primary,
.table-metallic .btn-link i.bi-pencil {
    color: #305880 !important;
}

.table-metallic .btn-link.text-primary:hover,
.table-metallic .btn-link:hover i.bi-pencil {
    color: #1A3A50 !important;
    background: rgba(48, 88, 128, 0.15);
}

.table-metallic .btn-link.text-danger,
.table-metallic .btn-link i.bi-trash {
    color: #8C3030 !important;
}

.table-metallic .btn-link.text-danger:hover,
.table-metallic .btn-link:hover i.bi-trash {
    color: #5A1818 !important;
    background: rgba(140, 48, 48, 0.15);
}

/* Cursor pointer para linhas clicáveis */
.table-metallic tbody tr[onclick],
.table-metallic tbody tr[ondblclick] {
    cursor: pointer;
}

/* Última linha sem borda inferior e com cantos arredondados */
.table-metallic tbody tr:last-child td {
    border-bottom: none;
}

.table-metallic tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-md);
}

.table-metallic tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-md);
}

/* ============================================================
   TABLE HEADER GENÉRICO (legado)
   ============================================================ */
.table-metallic-header th {
    background:
        var(--texture-noise-heavy),
        var(--texture-brushed),
        linear-gradient(180deg,
            #5E5A54 0%,
            #4A4640 5%,
            #3A3632 20%,
            #2A2724 50%,
            #1E1C1A 80%,
            #141210 100%
        ) !important;
    color: #c8c8c8 !important;
    font-weight: 700;
    text-transform: uppercase;
    font-size: var(--font-size-sm);
    letter-spacing: 0.5px;
    border-bottom: 2px solid #0E0C0A !important;
    border-right: 1px solid #1E1C1A;
    padding: 12px 8px !important;
    text-shadow:
        0 -1px 1px rgba(0,0,0,0.8),
        0 1px 0 rgba(255,255,255,0.12);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        inset 0 -1px 0 rgba(0,0,0,0.4);
}

.table-metallic-header th:last-child {
    border-right: none;
}

/* Tabela padrão com estilo industrial */
.table {
    color: var(--text);
}

.table td {
    background:
        var(--texture-grain),
        linear-gradient(180deg,
            #2A2724 0%,
            #252320 100%
        );
    border-color: #1E1C1A;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.3);
}

.table tr:nth-child(even) td {
    background:
        var(--texture-grain),
        linear-gradient(180deg,
            #323028 0%,
            #2A2724 100%
        );
}

.table tr:hover td {
    background: var(--hover-bg) !important;
}

/* ============================================================
   HELP ICON
   ============================================================ */
.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background:
        var(--texture-noise-heavy),
        linear-gradient(180deg,
            #4A6080 0%,
            #3A4A5A 100%
        );
    color: var(--text);
    font-size: 10px;
    font-weight: bold;
    cursor: help;
    margin-left: 6px;
    border: 1px solid #3A4A5A;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.4);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination-metallic {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid #4A4640;
    background:
        var(--texture-noise-heavy),
        linear-gradient(180deg,
            #4A4640 0%,
            #3A3632 50%,
            #2A2724 100%
        );
    color: var(--text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--font-size-sm);
    transition: all 0.2s ease;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.4);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 2px 4px rgba(0,0,0,0.3);
}

.pagination-btn:hover:not(:disabled) {
    background:
        var(--texture-noise-heavy),
        linear-gradient(180deg,
            #5E5A54 0%,
            #4A4640 50%,
            #3A3632 100%
        );
    color: var(--hover-text);
    border-color: var(--copper-600);
}

.pagination-btn.active {
    background:
        var(--texture-noise-heavy),
        linear-gradient(180deg,
            var(--bronze-400) 0%,
            var(--bronze-600) 50%,
            var(--bronze-800) 100%
        );
    color: var(--bronze-50);
    border-color: var(--bronze-700);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================================
   INPUT COM BOTÃO LIMPAR (X)
   ============================================================ */
.input-clearable {
    position: relative;
    display: flex;
    align-items: center;
}

.input-clearable input,
.input-clearable select {
    flex: 1;
    padding-right: 32px !important;
}

.input-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: none;
    border-radius: 50%;
    background: rgba(120, 120, 120, 0.25);
    color: #707070;
    font-size: 14px;
    font-weight: 400;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    padding: 0;
    padding-bottom: 1px;
    z-index: 5;
}

.input-clear-btn:hover {
    background: rgba(140, 80, 40, 0.4);
    color: #505050;
}

/* Mostra o botão quando o input tem conteúdo */
.input-clearable.has-value .input-clear-btn {
    display: flex;
}

/* Ajuste para inputs dentro de modais */
.modal-metallic .input-clearable input {
    padding-right: 32px !important;
}

/* Ajuste para inputs com fundo claro (login) */
.login-form .input-clearable .input-clear-btn {
    background: rgba(100, 100, 100, 0.3);
    color: #606060;
}

.login-form .input-clearable .input-clear-btn:hover {
    background: rgba(140, 80, 40, 0.5);
    color: #404040;
}

/* ============================================================
   BLOCOS DE AJUDA - Placas Metálicas 3D
   ============================================================ */
.help-block {
    /* Placa metálica brilhante */
    background: linear-gradient(
        160deg,
        #E8E8E8 0%,
        #D0D0D0 15%,
        #F0F0F0 30%,
        #C8C8C8 50%,
        #E0E0E0 70%,
        #B8B8B8 85%,
        #D8D8D8 100%
    );
    border-radius: 8px;
    position: relative;
    height: 100%;
    /* Efeito 3D com sombras */
    border: 1px solid #A0A0A0;
    border-top-color: #F0F0F0;
    border-left-color: #E8E8E8;
    border-bottom-color: #888;
    border-right-color: #999;
    box-shadow:
        /* Sombra externa profunda */
        4px 4px 12px rgba(0, 0, 0, 0.5),
        8px 8px 20px rgba(0, 0, 0, 0.3),
        /* Brilho na borda superior */
        inset 0 2px 3px rgba(255, 255, 255, 0.8),
        inset 2px 0 3px rgba(255, 255, 255, 0.4),
        /* Sombra interna inferior */
        inset 0 -2px 4px rgba(0, 0, 0, 0.1);
}

/* Parafusos nos 4 cantos - usando SVG */
.help-block-screw {
    position: absolute;
    width: 16px;
    height: 16px;
    background: url('../img/screw-phillips.svg') center/contain no-repeat;
    z-index: 5;
}

.help-block-screw.top-left {
    top: 8px;
    left: 8px;
}

.help-block-screw.top-right {
    top: 8px;
    right: 8px;
}

.help-block-screw.bottom-left {
    bottom: 8px;
    left: 8px;
}

.help-block-screw.bottom-right {
    bottom: 8px;
    right: 8px;
}

/* Cabeçalho do bloco */
.help-block-header {
    background: linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.15) 100%);
    padding: 12px 16px 12px 32px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #333;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.help-block-header i {
    font-size: 1.1rem;
    color: #7A4422;
}

/* Corpo do bloco */
.help-block-body {
    padding: 16px 16px 28px 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #444;
}

.help-block-body p {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.help-block-body ul {
    padding-left: 18px;
    margin: 0;
}

.help-block-body li {
    margin-bottom: 4px;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Texto em cobre */
.help-block-body .copper-text {
    color: #7A4422;
    font-weight: normal;
}

/* Item de atalho */
.help-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.help-item:last-child {
    border-bottom: none;
}

.help-item kbd {
    background: linear-gradient(180deg, #F8F8F8 0%, #E0E0E0 50%, #D0D0D0 100%);
    border: 1px solid #999;
    border-top-color: #CCC;
    border-bottom-color: #777;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.8rem;
    font-family: monospace;
    color: #333;
    box-shadow:
        0 2px 0 #888,
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    min-width: 28px;
    text-align: center;
}

.help-item span {
    font-size: 0.85rem;
    color: #444;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* ============================================================
   PAINÉIS DE FORMULÁRIO - Placas Metálicas 3D para Modais
   ============================================================ */
.form-panel {
    /* Placa metálica brilhante */
    background:
        /* Parafusos nos 4 cantos */
        url('../img/screw-phillips.svg') 8px 8px no-repeat,
        url('../img/screw-phillips.svg') calc(100% - 8px) 8px no-repeat,
        url('../img/screw-phillips.svg') 8px calc(100% - 8px) no-repeat,
        url('../img/screw-phillips.svg') calc(100% - 8px) calc(100% - 8px) no-repeat,
        /* Gradiente metálico */
        linear-gradient(
            160deg,
            #E8E8E8 0%,
            #D0D0D0 15%,
            #F0F0F0 30%,
            #C8C8C8 50%,
            #E0E0E0 70%,
            #B8B8B8 85%,
            #D8D8D8 100%
        );
    background-size: 12px 12px, 12px 12px, 12px 12px, 12px 12px, auto;
    border-radius: 8px;
    position: relative;
    margin-bottom: 16px;
    /* Efeito 3D com sombras */
    border: 1px solid #A0A0A0;
    border-top-color: #E0E0E0;
    border-left-color: #D8D8D8;
    border-bottom-color: #888;
    border-right-color: #999;
    box-shadow:
        /* Sombra externa */
        3px 3px 8px rgba(0, 0, 0, 0.3),
        6px 6px 16px rgba(0, 0, 0, 0.2),
        /* Brilho na borda superior */
        inset 0 2px 3px rgba(255, 255, 255, 0.6),
        inset 2px 0 3px rgba(255, 255, 255, 0.3),
        /* Sombra interna inferior */
        inset 0 -2px 4px rgba(0, 0, 0, 0.08);
}

/* Cabeçalho do painel */
.form-panel-header {
    background: linear-gradient(180deg, rgba(0,0,0,0.06) 0%, rgba(0,0,0,0.12) 100%);
    padding: 10px 16px 10px 28px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 7px 7px 0 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #444;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.form-panel-header i {
    font-size: 1rem;
    color: #7A4422;
}

/* Corpo do painel */
.form-panel-body {
    padding: 16px 16px 20px 16px;
}

/* Remove margem do último painel */
.form-panel:last-child {
    margin-bottom: 0;
}

/* Ajustes para inputs dentro do painel */
.form-panel .form-label {
    color: #444;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.7);
    margin-bottom: 4px;
}

.form-panel .form-control,
.form-panel .form-select {
    background: linear-gradient(180deg,
        rgba(0,0,0,0.08) 0%,
        rgba(0,0,0,0.04) 50%,
        rgba(255,255,255,0.1) 100%
    );
    border: 1px solid #999;
    border-top-color: #888;
    border-bottom-color: #AAA;
    color: #222;
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.12),
        inset 0 -1px 0 rgba(255,255,255,0.5);
}

.form-panel .form-control:focus,
.form-panel .form-select:focus {
    border-color: var(--copper-500);
    color: var(--copper-700);
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.12),
        0 0 0 2px rgba(192, 106, 60, 0.2);
}

.form-panel .form-control::placeholder {
    color: #777;
}
