:root {
    --primary: #1a237e;
    --primary-light: #534bae;
    --secondary: #2e7d32;
    --accent: #ffd700;
    --bg-body: #f4f7f6;
    --bg-card: #ffffff;
    --text-main: #37474f;
    --danger: #e53935;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; transition: all 0.2s ease; }
body { font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background: var(--bg-body); color: var(--text-main); margin: 0; padding: 20px; }

.container { 
    max-width: 1050px; 
    margin: auto; background: var(--bg-card); padding: 30px; border-radius: 20px; box-shadow: var(--shadow); 
}

/* Header e Login */
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
header h1 { color: var(--primary); margin: 0; font-size: 26px; letter-spacing: -1px; text-transform: uppercase; }
header p { margin: 5px 0 0; color: #78909c; font-weight: 600; font-size: 14px; }

.login-area { background: #f8f9fa; padding: 10px 15px; border-radius: 12px; border: 1px solid #eee; }
.login-area input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 8px; outline: none; font-size: 13px; }

/* Admin */
#admin-panel { display: none; background: #fff8e1; padding: 25px; border-radius: 15px; margin-bottom: 30px; border: 2px solid #ffe082; }
#admin-panel h3 { margin-top: 0; color: #f57c00; font-size: 18px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
input { padding: 12px; border: 1px solid #e0e0e0; border-radius: 8px; font-size: 14px; width: 100%; }
input:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1); outline: none; }

.admin-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* Botões */
.btn { padding: 12px 20px; border: none; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.btn-login { background: var(--primary); color: white; padding: 8px 15px; }
.btn-add { background: var(--secondary); color: white; flex: 2; }
.btn-export { background: #455a64; color: white; }
.btn-import { background: #6d4c41; color: white; } 
.btn-cancel { background: #cfd8dc; color: #546e7a; width: 100%; margin-top: 10px; }

#fileInput { display: none; } 

/* Filtros */
.controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 25px; align-items: center; background: #f1f3f4; padding: 8px; border-radius: 14px; }
.label-order { font-size: 11px; font-weight: 800; color: #999; margin: 0 10px; }
.btn-filter { background: transparent; border: none; padding: 10px 18px; border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: bold; color: #5f6368; }
.btn-filter.active { background: white; color: var(--primary); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

/* Tabela */
.table-container { overflow-x: auto; border-radius: 15px; border: 1px solid #eee; }
table { width: 100%; border-collapse: collapse; background: white; }

th { 
    background: #fcfcfc; color: #90a4ae; font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 1px; 
    padding: 15px 20px; 
    border-bottom: 2px solid #f1f1f1; 
}

td { 
    padding: 16px 20px; 
    text-align: center; border-bottom: 1px solid #f8f9fa; font-size: 14px; 
}
tr:hover { background-color: #fbfbfb; }

.pos-badge { background: #eee; padding: 4px 8px; border-radius: 6px; font-weight: bold; font-size: 12px; }
.name-cell { text-align: left; font-weight: 600; color: var(--primary); min-width: 120px; }

/* Destaque Pontos */
.points-cell { 
    font-weight: 800; color: #2e7d32; font-size: 17px; 
    padding-left: 30px; padding-right: 30px; 
}

/* Ações Admin */
.col-admin { text-align: center; white-space: nowrap; min-width: 100px; }
.btn-edit { background: #fff3e0; color: #ef6c00; border: 1px solid #ffe0b2; padding: 6px 10px; border-radius: 6px; font-size: 14px; cursor: pointer; margin-right: 5px; }
.btn-delete { background-color: #ffebee; color: #c62828; border: 1px solid #ffcdd2; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: bold; }
.btn-delete:hover { background-color: #d32f2f; color: white; }

@media (max-width: 600px) {
    .top-bar { flex-direction: column; align-items: flex-start; gap: 15px; }
    .login-area { width: 100%; }
    .login-area input { width: calc(100% - 100px); }
    .container { padding: 15px; }
    th, td { padding: 10px 8px; font-size: 13px; }
    .points-cell { padding: 10px 15px; }
}