:root { 
    --primary: #008b8b; 
    --sidebar-bg: #d9d9d9; 
    --active-item: #c0c0c0;
    --text-sidebar: #333333;
    --icon-color: #555555;
    --bg: #f4f7f6; 
    --white: #ffffff; 
    --danger: #d32f2f; 
    --success: #2e7d32; 
    --warning: #f39c12;
    --purple: #8e44ad;
    --border: #ddd;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
}

body { 
    font-family: 'Segoe UI', sans-serif; 
    background: var(--bg); 
    margin: 0; 
    display: flex; 
    height: 100vh; 
    overflow: hidden; 
}

/* --- ESTILOS DA TELA DE LOGIN --- */
#login-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #008b8b; 
    display: flex; justify-content: center; align-items: center;
    z-index: 5000;
}

.login-card {
    background: white; 
    width: 320px; 
    padding: 35px 30px;
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
}

.login-logo { width: 100px; margin-bottom: 15px; }

/* Nova estrutura para os campos com ícones */
.login-input-wrapper {
    position: relative;
    margin-bottom: 18px;
    width: 100%;
}

.login-input-wrapper input {
    width: 100%;
    padding: 14px 40px; /* Espaço nas laterais para não encostar nos ícones */
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    box-sizing: border-box;
    transition: 0.3s;
    text-align: center; /* Centraliza a digitação como você pediu! */
    background: #fcfcfc;
    color: #333;
}

.login-input-wrapper input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
    background: #fff;
}

/* Ícone da esquerda (Usuário e Cadeado) */
.login-input-wrapper .icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #999;
}

/* Botão do Olho na direita */
.login-input-wrapper .btn-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: 0.2s;
    border-radius: 50%;
}

.login-input-wrapper .btn-eye:hover {
    color: var(--primary);
    background: #f0f0f0;
}

.login-input-wrapper .btn-eye svg {
    width: 18px;
    height: 18px;
}

.btn-login {
    width: 100%; padding: 12px; background: var(--primary); color: white;
    border: none; border-radius: 6px; font-size: 15px; font-weight: bold;
    cursor: pointer; margin-top: 10px; transition: 0.2s; letter-spacing: 1px;
}
.btn-login:hover { background: #006666; transform: translateY(-1px); }

.login-footer { margin-top: 25px; font-size: 12px; color: #888; }
.login-footer a { color: var(--primary); text-decoration: none; font-weight: bold; cursor: pointer; }
.login-footer a:hover { text-decoration: underline; }

/* --- APP LAYOUT --- */
#app-container { 
    display: none; /* Mantido oculto até o login */
    width: 100%; 
    height: 100%; 
}
.sidebar.active {
    left: 0; /* Mostra quando clicado */
}

/* Sidebar */
.sidebar { 
    width: var(--sidebar-width); 
    background: var(--sidebar-bg); 
    color: var(--text-sidebar); 
    display: flex; 
    flex-direction: column; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid #ccc;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed-width); }

.sidebar-header { 
    padding: 0px; text-align: center; border-bottom: 1px solid #ccc; 
    background: var(--sidebar-bg); height: 120px; 
    display: flex; align-items: center; justify-content: center; 
    transition: 0.3s; overflow: hidden; 
}
.sidebar.collapsed .sidebar-header { height: 70px; padding: 10px; }

.sidebar-footer { 
    padding: 0px; border-top: 1px solid #ccc; 
    background: var(--sidebar-bg); 
    display: flex; align-items: center; justify-content: center; 
    height: 50px; transition: 0.3s; 
}
.sidebar.collapsed .sidebar-footer { height: 70px; padding: 10px; }

.logo-img { width: 106px; height: 104px; object-fit: contain; transition: 0.3s; }
.logo-footer { width: 100px; height: auto; object-fit: contain; transition: 0.3s; }
.sidebar.collapsed .logo-img, .sidebar.collapsed .logo-footer { width: 40px; height: 40px; }

.sidebar-menu { flex-grow: 1; padding: 15px 0; overflow-y: hidden; overflow-x: hidden; }

.menu-item { 
    padding: 12px 25px; display: flex; align-items: center; gap: 15px; 
    color: var(--text-sidebar); text-decoration: none; font-size: 14px; 
    transition: 0.2s; cursor: pointer; font-weight: 500; border: none; 
    background: none; width: 100%; text-align: left; 
}
.menu-item:hover { background: var(--active-item); color: #000; }
.menu-item.active { background: var(--primary); color: white; border-right: 4px solid #fff; }
.menu-item i { font-size: 20px; min-width: 25px; text-align: center; font-style: normal; filter: grayscale(100%); color: var(--icon-color); opacity: 0.7; }
.menu-item.active i { filter: grayscale(100%) brightness(200%); opacity: 1; color: white; }
.sidebar.collapsed .menu-item span { display: none; }
.sidebar.collapsed .menu-item { padding: 12px 22px; }
.menu-item.colored-icon i { filter: none !important; opacity: 1 !important; }

/* Main Content & Navbar */
.toggle-btn { background: none; border: none; cursor: pointer; font-size: 20px; color: var(--text-sidebar); padding: 10px; display: flex; align-items: center; justify-content: center; transition: 0.3s; }
.main-content { flex-grow: 1; display: flex; flex-direction: column; overflow-y: hidden; transition: all 0.3s; }
.navbar { background: var(--white); padding: 0 30px; height: 60px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); z-index: 10; }

.user-profile { display: flex; align-items: center; gap: 12px; position: relative; }
.user-names { text-align: right; line-height: 1.2; }
.user-names b { display: block; font-size: 16px; color: #333; }
.user-names small { font-size: 13px; color: #888; }
.avatar { width: 35px; height: 35px; background: #eee; border-radius: 50%; border: 1px solid #ddd; cursor: pointer; background-image: url('../img/avatar-placeholder.png'); background-size: cover; }

/* Dropdown Usuário */
.dropdown-user { display: none; position: absolute; right: 0; top: 45px; background: white; min-width: 160px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); border-radius: 6px; z-index: 1000; border: 1px solid #eee; }
.dropdown-user.show { display: block; }
.dropdown-user button { width: 100%; padding: 12px 15px; border: none; background: none; text-align: left; font-size: 12px; font-weight: bold; color: #333; cursor: pointer; transition: 0.2s; }
.dropdown-user button:hover { background: #f5f5f5; color: var(--primary); }
.dropdown-user .btn-exit-drop { color: var(--danger); border-top: 1px solid #eee; }

/* SECTIONS */
.content-section { display: none; padding: 30px; height: 100%; box-sizing: border-box; }
.content-section.active { display: block !important; } /* Adicionado !important */
.page-title { margin-bottom: 20px; color: #2c3e50; }

/* STATS GRID */
.stats-grid {
    display: grid;
    /* Muda de 5 colunas fixas para colunas que se ajustam sozinhos */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 15px;
    margin-bottom: 30px;
}
.stats-grid .spacer {
    display: none; 
}
.card-stat { background: var(--white); padding: 15px; border-radius: 8px 8px 4px 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-bottom: 4px solid transparent; display: flex; flex-direction: column; position: relative; overflow: hidden; border: 2px solid #ffffff;}
.group-tag { position: absolute; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 4px; color: #777; text-transform: uppercase; }
.card-stat b { display: block; font-size: 12px; text-transform: uppercase; margin-top: 5px; margin-bottom: 5px; }
.card-stat span { font-size: 40px; font-weight: bold; }
.card-entradas { border-bottom-color: var(--success); color: var(--success); }
.card-retiradas { border-bottom-color: var(--warning); color: var(--warning); }
.card-no-local { border-bottom-color: #09486d; color: #095ba4; }
.card-esquecidas { border-bottom-color: var(--purple); color: var(--purple); }

.btn-alert-esquecidas { background: var(--purple); color: white; border: none; width: 24px; height: 24px; border-radius: 50%; font-weight: bold; cursor: pointer; margin-left: 10px; display: inline-flex; align-items: center; justify-content: center; }
.spacer { display: flex; align-items: center; justify-content: center; color: #ccc; font-weight: bold; }

.card-stat::after {
    content: "";
    position: absolute;
    right: -40px;      /* Move a bike para a direita para mostrar apenas a metade da frente */
    bottom: -10px;     /* Ajusta a altura da bike no card */
    width: 150px;      /* Tamanho da imagem */
    height: 100px;
    background-image: url('../img/Bicycle.png'); /* Caminho da sua logo */
    background-size: contain;
    background-repeat: no-repeat;
    
    /* Transforma a imagem em cinza e aplica transparência */
    filter: grayscale(100%) brightness(0) opacity(0.1); 
    pointer-events: none; /* Garante que a imagem não atrapalhe cliques no card */
    z-index: 1;
}

/* Garante que o número e o texto fiquem acima da imagem */
.card-stat b, .card-stat span, .card-stat .group-tag {
    position: relative;
    z-index: 2;
}
/* TABLES & SEARCH */
.search-row { margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; }
.search-box { width: 300px; padding: 10px 15px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; outline: none; background: white; }

/* Fixa o cabeçalho (Sticky Header) em todas as tabelas do sistema */
.main-content table thead th,
.modal-body-container table thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa !important; /* Cor de fundo sólida para não ficar transparente */
    z-index: 100;                          /* Garante que fique acima de qualquer pílula ou ícone */
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1); /* Cria uma linha de divisão ao rolar */
}

/* Container que limita a altura e cria a rolagem vertical */
.table-container { 
    background: white; 
    border-radius: 8px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    overflow-x: auto; 
    
    /* ADICIONE ESTAS LINHAS */
    max-height: 450px;    /* Define a altura máxima da tabela antes de rolar */
    overflow-y: auto;     /* Ativa a rolagem vertical própria */
    position: relative;
}

/* Garante que a tabela ocupe o espaço e define o comportamento do cabeçalho */
table { 
    width: 100%; 
    border-collapse: collapse; 
    min-width: 1000px; 
}

/* FIXA O CABEÇALHO NO TOPO DURANTE A ROLAGEM */
#tabelaBikes thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa; /* Cor de fundo para não ficar transparente ao rolar */
    z-index: 10;          /* Mantém acima dos dados */
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1); /* Linha sutil separadora */
}

.modal-body-container {
    width: 95%;          /* Garante margem nas laterais em telas pequenas */
    max-width: 1200px;   /* Não deixa crescer demais em telas gigantes */
    margin: 10px auto;
}

th { background: #f8f9fa; padding: 15px; text-align: left; font-size: 14px; color: #7f8c8d; border-bottom: 2px solid #eee; position: sticky; top: 0; }
td { padding: 8px 15px; border-bottom: 1px solid #eee; font-size: 15px; color: #444; vertical-align: middle; }
/* ========================================================== */
/* ESTILO DAS PÍLULAS DE STATUS NAS TABELAS                   */
/* ========================================================== */
.status-pill { 
    padding: 4px 10px; 
    border-radius: 12px; 
    font-size: 12px; 
    font-weight: bold; 
    display: inline-block;
}

/* VERDE: Entradas Registradas (e Liberadas) */
.status-pill.in { 
    background: #e8f5e9 !important; 
    color: #1b5e20 !important; 
}

/* VERMELHO: Saídas Registradas (e Não Liberadas) */
.status-pill.out { 
    background: #ffebee !important; 
    color: #d32f2f !important; 
}
.status-pill.inactive { 
    background: #ffebee !important; 
    color: #d32f2f !important; 
}

/* BUTTONS */
.btn-action { padding: 6px 10px; border-radius: 4px; border: 1px solid #ddd; cursor: pointer; font-size: 11px; font-weight: bold; margin-right: 5px; }
.btn-manage { background: var(--primary); color: white; border-color: var(--primary); }
.btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;         /* Define uma largura fixa para ser quadrado */
    height: 27px;        /* Define uma altura fixa */
    padding: 0;          /* Remove paddings que podem desalinhá-lo */
    border: 1px solid #ddd;
    border-radius: 6px;  /* Deixa as pontas levemente arredondadas */
    background: #f8f9fa;
    cursor: pointer;
    transition: 0.2s;
}

.btn-register:hover {
    background: #e2e6ea;
    border-color: var(--primary); /* Usa o verde da sua marca no destaque */
}

/* Garante que o ícone herde o alinhamento correto */
.btn-register .material-symbols-outlined {
    font-size: 18px;
}

.btn-new-user { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 13px; }
.btn-login-hist { background: var(--white); color: var(--primary); border: 2px solid var(--primary); padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 13px; margin-right: 10px; }
.btn-cancel { background: #e74c3c; color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 13px; }
.btn-cancel:hover { background: #c0392b; }

.perm-label { font-size: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #666; font-weight: bold; }
.perm-grid { display: flex; gap: 10px; }
.btn-status { border: none; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 11px; font-weight: bold; min-width: 80px; }
.btn-status.active { background: #e8f5e9; color: var(--success); }
.btn-status.inactive { background: #ffebee; color: var(--danger); }

/* SUPORTE */
.support-container { display: flex; flex-direction: column; gap: 15px; }
.support-card { background: white; padding: 20px; border-radius: 8px; border: 1px solid #eee; display: flex; align-items: center; gap: 20px; text-decoration: none; color: inherit; transition: 0.2s; border-left: 5px solid var(--primary); }
.support-card:hover { transform: translateX(5px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.support-icon { font-size: 24px; }
.support-info b { display: block; color: var(--primary); margin-bottom: 2px; }
.support-info span { font-size: 14px; color: #666; }

/* MODAIS */
.modal-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.7); 
    display: none;
    justify-content: center; 
    align-items: flex-start; /* Altera de center para flex-start */
    z-index: 2000; 
    overflow-y: auto; /* Mantém a rolagem no fundo caso a modal seja longa */
    padding: 20px 0;
/* Estas duas linhas garantem a centralização do que estiver dentro */
    justify-content: center; 
    align-items: center; 
}

/* Ajuste específico para o corpo da modal de visualização */
#modalVisualizarDetalhes .modal-body-container {
    margin: 0 auto; /* Remove a margem superior que empurra para baixo */
    max-height: 90vh; /* Garante que não ultrapasse a altura da tela */
    overflow-y: auto; /* Permite rolar o conteúdo interno se for maior que a tela */
}
.modal-body-container {
    background: var(--white); 
    width: 95%; 
    max-width: 1200px; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    position: relative; 
    margin: 20px auto; /* Adiciona margem automática para centralizar horizontalmente */
    padding: 15px;
    box-sizing: border-box; /* Garante que o padding não aumente o tamanho da caixa */
}
.mini-modal { width: 450px; padding: 25px; align-self: center; border-radius: 8px; }
.mini-modal h3 { margin-top: 0; color: var(--primary); text-align: center; }

/* BUSCA */
#resultadosBusca { 
    margin-top: 10px; 
    max-height: 200px; 
    overflow-y: auto; 
    border: 1px solid #eee; 
    border-radius: 5px; 
    display: block; 
    background: white; 
}
#resultadosBusca:empty { display: none; border: none; }
.resultado-item { padding: 10px 15px; text-align: left; border-bottom: 1px solid #f5f5f5; cursor: pointer; transition: 0.2s; }
/* Caso a sua Busca Rápida use uma lista (divs) em vez de tabela: */
.resultado-item:hover {
    background-color: #f0f4f8 !important;
    border-left: 5px solid var(--primary) !important;
    cursor: pointer;
}

/* FORMS E INPUTS */
.toolbar { background: #f8f9fa; padding: 8px 20px; display: flex; justify-content: flex-end; gap: 20px; border-bottom: 1px solid #ddd; border-radius: 8px 8px 0 0; margin: -15px -15px 15px -15px; }
.nav-btn { background: none; border: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; font-size: 11px; font-weight: bold; color: #666; transition: 0.2s; }
.nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.header-status { padding: 0 10px 15px 10px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; margin-bottom: 15px; }
.reg-info { font-weight: bold; color: var(--primary); background: #e0f2f1; padding: 6px 15px; border-radius: 4px; }
.form-grid { display: grid; grid-template-columns: 420px 1fr; gap: 15px; padding: 0; }
fieldset { border: 1px solid #eee; border-radius: 8px; padding: 15px; background: #fff; position: relative; }
legend { font-weight: bold; color: var(--primary); font-size: 13px; padding: 0 10px; text-transform: uppercase; }
.input-box { display: flex; flex-direction: column; margin-bottom: 12px; flex: 1; }
.row-flex { display: flex; gap: 15px; margin-bottom: 5px; }
label { font-size: 11px; font-weight: 700; color: #777; margin-bottom: 5px; text-transform: uppercase; }
input, select, textarea { padding: 10px; border: 1px solid var(--border); border-radius: 5px; font-size: 14px; width: 100%; box-sizing: border-box; }
input.invalid { border: 2px solid var(--danger) !important; background-color: #fff8f8 !important; }

/* FOTOS */
.photo-container { position: relative; width: 100%; border-radius: 6px; overflow: hidden; background: #fafafa; border: 2px dashed var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.photo-3x4 { height: 240px; }
.photo-bike-rect { height: 220px; border-color: var(--primary); margin-top: 10px; }
video, img.preview { width: 100%; height: 100%; object-fit: cover; display: none; position: absolute; }
.placeholder-text { text-align: center; color: #888; font-weight: bold; z-index: 1; }
.btn-capture { position: absolute; bottom: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%; background: #e0f2f1; color: white; border: none; cursor: pointer; z-index: 10; font-size: 18px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }

#zoom-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); display: none; justify-content: center; align-items: center; z-index: 3000; cursor: zoom-out; }
#zoom-overlay img { max-width: 90%; max-height: 90%; border: 4px solid white; border-radius: 5px; }

/* BIKE CARD */
.bike-card { background: #f9fbfb; border: 1px solid #e0e6e6; padding: 20px; border-radius: 8px; margin-bottom: 2px; position: relative; }
.btn-remove-bike { position: absolute; top: 10px; right: 10px; background: #fee; border: 1px solid #fcc; color: var(--danger); padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 11px; }

/* --- BOTÕES ALTERADOS (MAIS PEQUENOS) --- */
.btn-add { 
    width: auto; 
    padding: 8px 15px; 
    background: #fff; 
    border: 2px dashed var(--primary); 
    color: var(--primary); 
    font-weight: bold; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 11px; 
}

.btn-submit { 
    width: 100%; 
    padding: 12px; /* Reduzido para diminuir altura */
    background: var(--primary); 
    color: white; 
    border: none; 
    border-radius: 6px; 
    font-size: 14px; /* Fonte ajustada */
    font-weight: bold; 
    cursor: pointer; 
    transition: 0.3s; 
}
.btn-submit:disabled { background: #eb0b0b; cursor: not-allowed; opacity: 0.7; }

.btn-release { width: 100%; padding: 10px; background: #ff3838; color: white; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn-release:hover { background: #ff3838; }
.btn-release:disabled { background: #ccc; cursor: not-allowed; color: #fff; }

.empresa-logo-box { width: 180px; height: 180px; border: 2px dashed #ccc; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: #fafafa; cursor: pointer; overflow: hidden; position: relative; }
.empresa-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.empresa-logo-box span { font-size: 11px; color: #888; text-align: center; }

/* VISUALIZAÇÃO E OUTROS */
.view-row { margin-bottom: 10px; font-size: 14px; color: #444; border-bottom: 1px solid #f5f5f5; padding-bottom: 5px; }
.view-row strong { color: var(--primary); font-weight: bold; margin-right: 8px; font-size: 12px; text-transform: uppercase; }
/* No seu style.css, localize e altere: */
.view-photo-container {
    width: 130px;        /* Aumentado de 100px para 130px */
    height: 170px;       /* Aumentado de 130px para 170px */
    background: #eee;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Sombra leve para destaque */
}

/* Aplica o efeito de hover também nos itens da busca rápida */
#resultadosBusca div:hover {
    background-color: #f0f4f8 !important;
    transition: 0.2s;
}

#modalAlertaRegistroAberto .btn-confirm {
    background-color: var(--primary); /* O verde da sua marca */
    color: white;
    font-weight: bold;
    cursor: pointer;
}

.view-photo-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* Garante que a foto preencha o espaço sem esticar */
}
.view-bike-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px; /* Espaçamento entre as bikes */
    background: #fff;
}
/* Adicione ou ajuste estas regras para as fotos das bikes */
.view-bike-card .view-photo-container {
    width: 180px;        /* Fotos de bike geralmente ficam melhores em formato paisagem */
    height: 120px;
    border-radius: 4px;
    margin-right: 15px;
}

/* Container de lista de bikes na visualização */
#view_lista_bikes {
    max-height: 350px;    /* Define uma altura máxima (ajuste se necessário) */
    overflow-y: auto;     /* Ativa a rolagem vertical quando o conteúdo excede a altura */
    padding-right: 10px;  /* Espaço para a barra de rolagem não cobrir o conteúdo */
}

/* Personalização da barra de rolagem para ficar moderna (opcional) */
#view_lista_bikes::-webkit-scrollbar {
    width: 6px;
}

#view_lista_bikes::-webkit-scrollbar-thumb {
    background-color: var(--primary); /* Usa o verde da sua logo */
    border-radius: 10px;
}

#view_lista_bikes::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.status-decision-box { 
    border: 2px dashed #ccc;
    background: #f9f9f9; 
    color: #bbb; 
    font-size: 32px; 
    /*font-weight: 800; */
    display: flex; 
    align-items: center; 
    justify-content: center; 
   /* text-transform: uppercase; */
    height: 100%; 
    border-radius: 15px;
    /*letter-spacing: 1px; */
   /* text-shadow: 1px 1px 0 #fff; */
    
    /* ADICIONE A FONTE AQUI */
    font-family: 'DM Serif Display', Impact, sans-serif; 
}
.radio-label { display: flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.radio-group { display: flex; gap: 25px; align-items: center; }

/* OUTROS MODAIS E ALERTAS */
#formAlterarSenha button { font-family: Arial, sans-serif !important; font-size: 12px !important; padding: 10px 15px !important; }

.modal-alert-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); display: none; justify-content: center; align-items: center; z-index: 3000; }
.modal-alert-box { background: white; padding: 25px; border-radius: 8px; width: 350px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.modal-alert-title { font-size: 18px; color: var(--primary); margin-top: 0; margin-bottom: 15px; }
.btn-alert-ok { background: var(--primary); color: white; border: none; padding: 10px 30px; border-radius: 6px; cursor: pointer; margin-top: 20px; font-weight: bold; font-size: 13px; font-family: Arial, sans-serif; }

.btn-confirm-yes { background: var(--success); color: white; border: none; padding: 10px 30px; border-radius: 6px; cursor: pointer; margin-right: 10px; font-weight: bold; font-size: 13px; font-family: Arial, sans-serif; }
.btn-confirm-no { background: var(--danger); color: white; border: none; padding: 10px 30px; border-radius: 6px; cursor: pointer; font-weight: bold; font-size: 13px; font-family: Arial, sans-serif; }

.alert-warning-box { background: white; padding: 30px; border-radius: 10px; width: 400px; text-align: center; box-shadow: 0 4px 20px rgba(0,0,0,0.3); border-top: 8px solid var(--warning); }
.alert-warning-text { color: #d35400; font-weight: bold; font-size: 18px; margin-top: 15px; text-transform: uppercase; line-height: 1.4; }

canvas { display: none; }

/* No seu arquivo CSS */
#f_tipo {
    color: #000000 !important; /* Cor verde do seu tema */
    background-color: #ffffff !important; /* Fundo branco para contraste */
    /*font-weight: bold;
}

/* Garante que as opções dentro da lista também fiquem visíveis */
#f_tipo option {
    color: #333333 !important;
    background-color: #ffffff !important;
}

#f_tipo {
    color: #008b8b !important;
}

}

/* Container para o preview da imagem */
#preview-modelo-container {
    position: fixed;
    display: none;
    z-index: 10000;
    pointer-events: none;
    border: 2px solid var(--primary);
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

#preview-modelo-container img {
    max-width: 150px;
    display: block;
    border-radius: 6px;
}

/* No seu arquivo CSS ou tag <style> */
.status-pill {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px; /* Reduzimos um pouco a fonte para caber o texto longo */
    font-weight: bold;
    white-space: nowrap; /* Impede que o texto quebre em duas linhas */
    display: inline-block;
}

/* Estilos para a legenda */
.legend-container {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.legend-title {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: var(--primary);
    text-transform: uppercase;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 10px;
}

.legend-item {
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-item span {
    font-weight: 800;
    color: var(--primary);
    background: #e0f2f1;
    padding: 2px 6px;
    border-radius: 4px;
    min-width: 35px;
    text-align: center;
    font-size: 12px;
}

/* Garante que a seção de relatório ocupe quase toda a tela disponível */
#tab-relatorio {
    width: 100%;
    height: calc(100vh - 20px); /* Subtrai a altura da navbar e paddings */
    padding: 20px;
    box-sizing: border-box;
    display: none;
}

#tab-relatorio.active {
    display: flex !important; /* Usar flex ajuda a alinhar o conteúdo interno */
    flex-direction: column;
}

/* Ajusta o iframe para preencher 100% do espaço do #tab-relatorio */
#dashboardFrame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background: #ffffff;
}

/* Modal de lista (Esquecidas/Pesquisa) */
#modalEsquecidas, #modalPesquisa {
    z-index: 2000;
}


/* ========================================================================= */
/* MODAL DE ALERTA: REGISTRO EM ABERTO (ESTILO LARANJA) */
/* ========================================================================= */
.modal-alerta-box {
    background: #fff;
    width: 100%;
    max-width: 420px;
    margin: auto; /* <--- ESSA É A LINHA MÁGICA QUE CENTRALIZA A CAIXA! */
    border-radius: 8px;
    text-align: center;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-top: 8px solid #f39c12;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.modal-alerta-box .alerta-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 5px;
}

.modal-alerta-box h2 {
    color: #e67e22; /* Laranja escuro para o título */
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    text-transform: uppercase;
    line-height: 1.4;
}

.modal-alerta-box p {
    color: #7f8c8d; /* Cinza para o texto descritivo */
    font-size: 15px;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

.modal-alerta-box button {
    background: #f39c12;
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-size: 15px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
}

.modal-alerta-box button:hover {
    background: #d68910; /* Laranja mais escuro ao passar o mouse */
}

@media (max-width: 768px) {
    /* 1. Esconde a Sidebar ou transforma em menu compacto */
    .sidebar {
        position: fixed;
        left: -100%; /* Esconde para fora da tela */
        z-index: 9999;
    }
    
    .sidebar.active {
        left: 0; /* Mostra quando clicado */
    }

    /* 2. Faz o conteúdo principal ocupar a tela toda */
    .main-content {
        margin-left: 0;
        width: 100%;
    }

    /* 3. Transforma formulários de 2 colunas em 1 coluna */
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    /* 4. Ajusta os cards de estatística para empilharem */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    /* 5. Melhora a visualização da tabela (rolagem horizontal) */
    .table-container {
        max-height: 60vh;
    }
}

/* Localize ou adicione este bloco para a modalRegistroSistema */
/* Reduz o preenchimento interno da modal e dos campos */
#modalRegistroSistema .modal-body-container {
    padding: 12px 20px; /* Reduzido de 25px para 12px no topo/fundo */
    max-width: 950px;    /* Reduz um pouco a largura máxima para o form encolher */
}

/* Reduz o espaço entre os blocos de dados e fotos */
#modalRegistroSistema fieldset {
    padding: 10px;       /* Bordas internas dos grupos menores */
    margin-bottom: 8px;  /* Menos espaço entre os blocos */
}

/* Ajusta as fotos para serem mais baixas em telas de notebook */
#modalRegistroSistema .photo-container, 
#modalRegistroSistema img.preview {
    height: 180px;       /* Reduzido de 220px para 180px */
}

/* Diminui o espaço entre as colunas da grid principal */
#modalRegistroSistema div[style*="grid-template-columns"] {
    gap: 12px !important; /* Aproxima os blocos laterais */
}

/* Localize ou adicione este bloco específico para a modal de esquecidas */
#modalEsquecidas .table-container {
    overflow-x: hidden; /* Remove a possibilidade de rolagem horizontal */
    width: 100%;
}

#modalEsquecidas table {
    min-width: 100% !important; /* Força a tabela a não ser maior que o container */
    width: 100%;
    table-layout: auto; /* Permite que o navegador ajuste as colunas pelo conteúdo */
}

/* Ajuste das células para evitar quebras de linha estranhas ou textos muito longos */
#modalEsquecidas td, #modalEsquecidas th {
    white-space: normal; /* Permite que o texto quebre linha se necessário */
    word-wrap: break-word;
    font-size: 13px; /* Reduz ligeiramente a fonte para ganhar espaço em telas menores */
    padding: 8px;   /* Reduz o preenchimento para economizar espaço horizontal */
}
@media (max-width: 1024px) {
    #modalEsquecidas .modal-body-container {
        width: 98%; /* Ocupa quase toda a largura em telas pequenas */
        max-width: none;
    }
    
    /* Esconde colunas menos importantes se o espaço for crítico */
    #modalEsquecidas th:nth-child(2), 
    #modalEsquecidas td:nth-child(2) {
        display: table-cell; /* Garante que os detalhes apareçam, mas com largura controlada */
    }
}

/* Ajuste específico para a modal de histórico de login */
#modalLoginHist .table-container {
    overflow-x: hidden; /* Remove a barra horizontal */
    width: 100%;
}

#modalLoginHist table {
    width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed; /* Força as colunas a respeitarem a largura total */
}

#modalLoginHist th, #modalLoginHist td {
    padding: 10px 5px;
    font-size: 13px;
    word-wrap: break-word; /* Quebra o texto se o nome do usuário for muito longo */
    white-space: normal;   /* Permite quebra de linha em telas pequenas */
    text-align: center;
}

/* Ajuste das larguras das colunas para equilíbrio visual */
#modalLoginHist th:nth-child(1), #modalLoginHist td:nth-child(1) { width: 30%; } /* Usuário */
#modalLoginHist th:nth-child(2), #modalLoginHist td:nth-child(2) { width: 35%; } /* Entrada */
#modalLoginHist th:nth-child(3), #modalLoginHist td:nth-child(3) { width: 35%; } /* Saída */

/* No seu style.css, verifique se a mini-modal tem largura flexível */
.mini-modal {
    width: 95%;          /* Ocupa a largura da tela em dispositivos pequenos */
    max-width: 450px;    /* Mas não ultrapassa 450px em monitores grandes */
    box-sizing: border-box;
}

/* Efeito de Hover Universal: Painel Principal E Modais (Busca Rápida) */
.main-content table tbody tr,
.modal-body-container table tbody tr {
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    position: relative;
}

/* Aplica o efeito visual em ambos os contextos */
.main-content table tbody tr:hover,
.main-content table tbody tr:nth-child(odd):hover,
.main-content table tbody tr:nth-child(even):hover,
.modal-body-container table tbody tr:hover,
.modal-body-container table tbody tr:nth-child(odd):hover,
.modal-body-container table tbody tr:nth-child(even):hover {
    background-color: #f0f4f8 !important;
    box-shadow: inset 5px 0 0 var(--primary) !important;
}

.modal-body-container table {
    width: 100%;
    border-collapse: collapse;
    margin-right: 10px; /* Espaço para a scrollbar */
}

/* Garante a cor do texto no hover para ambos */
.main-content table tbody tr:hover td,
.modal-body-container table tbody tr:hover td {
    color: #000 !important;
}





