 :root {
     --primary: #0F172A;
     --primary-light: #1E293B;
     --accent: #10B981;
     --bg: #F8FAFC;
     --card-bg: #FFFFFF;
     --text-main: #1E293B;
     --text-muted: #64748B;
     --border: #E2E8F0;
     --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
     --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
 }

 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     font-family: 'Inter', sans-serif;
 }

 body {
     background-color: var(--bg);
     color: var(--text-main);
     min-height: 100vh;
 }

 .credencial-container {
     max-width: 1100px;
     margin: 40px auto;
     padding: 20px;
 }

 .main-grid {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 40px;
     align-items: start;
 }

 @media (max-width: 992px) {
     .main-grid {
         grid-template-columns: 1fr;
     }

     .credencial-container {
         margin: 20px auto;
     }
 }

 /* --- Seção de Entrada (Keypad) --- */
 .input-section {
     background: var(--card-bg);
     padding: 40px;
     border-radius: 24px;
     box-shadow: var(--shadow);
     border: 1px solid var(--border);
 }

 .section-header {
     margin-bottom: 30px;
     text-align: center;
 }

 .section-header h2 {
     font-size: 24px;
     font-weight: 700;
     color: var(--primary);
     margin-bottom: 8px;
 }

 .section-header p {
     color: var(--text-muted);
     font-size: 14px;
 }

 .display-container {
     background: #F1F5F9;
     border-radius: 16px;
     padding: 20px;
     margin-bottom: 30px;
     text-align: center;
     border: 2px solid transparent;
     transition: all 0.2s;
 }

 .container-fluid{
    padding: 0 !important ;
 }

 .display-container:focus-within {
     border-color: var(--primary);
     background: #fff;
 }

 #resultado {
     font-size: 32px;
     font-weight: 700;
     letter-spacing: 2px;
     color: var(--primary);
     min-height: 40px;
 }

 .keypad {
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     gap: 15px;
 }

 .btn-key {
     height: 70px;
     border: none;
     background: #F8FAFC;
     border-radius: 12px;
     font-size: 24px;
     font-weight: 600;
     color: var(--primary);
     cursor: pointer;
     transition: all 0.15s ease;
     display: flex;
     align-items: center;
     justify-content: center;
     border: 1px solid var(--border);
 }

 .btn-key:hover {
     background: #F1F5F9;
     transform: translateY(-2px);
     border-color: #CBD5E1;
 }

 .btn-key:active {
     transform: translateY(0);
     background: #E2E8F0;
 }

 .btn-key.clear {
     color: #EF4444;
 }

 .btn-key.back {
     color: var(--text-muted);
 }

 .btn-enter {
     grid-column: span 3;
     height: 60px;
     background: var(--primary);
     color: white;
     border: none;
     border-radius: 12px;
     font-size: 18px;
     font-weight: 600;
     text-transform: uppercase;
     letter-spacing: 1px;
     cursor: pointer;
     margin-top: 10px;
     transition: all 0.2s;
 }

 .btn-enter:hover {
     background: var(--primary-light);
     box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
 }

 /* --- Seção da Credencial (Badge) --- */
 .badge-preview {
     display: flex;
     flex-direction: column;
     align-items: center;
     gap: 30px;
 }

 .badge-card {
     width: 350px;
     background: white;
     border-radius: 20px;
     box-shadow: var(--shadow-lg);
     overflow: hidden;
     position: relative;

 }

 .card-body {
     flex: 1 1 auto !important;
     color: var(--bs-card-color);
 }

 .badge-header {
     background: var(--primary);
     height: 120px;
     display: flex;
     align-items: center;
     justify-content: center;
     padding: 20px;
     color: white;
 }

 .badge-header i {
     font-size: 48px;
     opacity: 0.2;
     position: absolute;
     right: 20px;
     top: 20px;
 }

 .photo-container {
     width: 140px;
     height: 140px;
     background: #fff;
     border-radius: 50%;
     margin: -70px auto 20px;
     padding: 6px;
     box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
     position: relative;
     z-index: 2;
 }

 .photo-container img {
     width: 100%;
     height: 100%;
     border-radius: 50%;
     object-fit: cover;
 }

 .badge-info {
     padding: 0 30px 40px;
     text-align: center;
 }

 .badge-info h1 {
     font-size: 22px;
     font-weight: 700;
     color: var(--primary);
     margin-bottom: 5px;
     text-transform: uppercase;
 }

 .badge-info .role {
     font-size: 14px;
     font-weight: 500;
     color: var(--text-muted);
     margin-bottom: 20px;
 }

 .badge-status {
     display: inline-block;
     background: rgba(16, 185, 129, 0.1);
     color: var(--accent);
     padding: 6px 16px;
     border-radius: 100px;
     font-size: 12px;
     font-weight: 700;
     text-transform: uppercase;
     letter-spacing: 1px;
     margin-bottom: 15px;
 }

 .badge-qr {
     margin-top: 20px;
     opacity: 0.8;
 }

 .badge-footer {
     border-top: 1px solid var(--border);
     padding: 15px;
     background: #F8FAFC;
     font-size: 12px;
     color: var(--text-muted);
 }

 .action-buttons {
     display: flex;
     gap: 15px;
     width: 100%;
     max-width: 400px;
 }

 .btn-action {
     flex: 1;
     padding: 15px;
     border-radius: 12px;
     border: none;
     font-weight: 600;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 10px;
     transition: all 0.2s;
 }

 .btn-print {
     background: var(--accent);
     color: white;
 }

 .btn-print:hover {
     background: #059669;
     box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
 }

 .btn-cancel {
     background: #fff;
     color: var(--text-muted);
     border: 1px solid var(--border);
 }

 .btn-cancel:hover {
     background: #F1F5F9;
 }

 /* Empty state styling */
 .empty-badge {
     width: 350px;
     height: 520px;
     border: 2px dashed var(--border);
     border-radius: 24px;
     display: flex;
     flex-direction: column;
     align-items: center;
     justify-content: center;
     color: var(--text-muted);
     background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 250, 252, 0.5) 100%);
     text-align: center;
     padding: 40px;
     backdrop-filter: blur(8px);
     transition: all 0.3s ease;
 }

 .empty-badge:hover {
     border-color: var(--accent);
     background: rgba(255, 255, 255, 1);
     transform: translateY(-5px);
     box-shadow: var(--shadow-lg);
 }

 .empty-badge i.fa-qrcode {
     font-size: 80px;
     margin-bottom: 25px;
     color: var(--primary);
     opacity: 0.15;
     background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
     -webkit-background-clip: text;
     background-clip: text;
     transition: all 0.5s ease;
 }

 .empty-badge:hover i.fa-qrcode {
     opacity: 0.8;
     transform: scale(1.1) rotate(5deg);
 }

 .empty-badge h3 {
     font-size: 20px;
     font-weight: 700;
     color: var(--primary);
     margin-bottom: 12px;
 }

 .empty-badge p {
     font-size: 14px;
     line-height: 1.6;
     margin-bottom: 30px;
 }

 .btn-scan-badge {
     background: #FFFFFF;
     border: 1px solid var(--border);
     border-radius: 14px;
     padding: 14px 24px;
     color: var(--primary);
     font-weight: 600;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 12px;
     cursor: pointer;
     transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     width: 100%;
     margin-top: 10px;
     box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
 }

 .btn-scan-badge:hover {
     background: var(--primary);
     color: white;
     border-color: var(--primary);
     transform: translateY(-3px);
     box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.2);
 }

 .btn-scan-badge i {
     font-size: 18px;
     color: var(--accent);
     transition: color 0.3s;
 }

 .btn-scan-badge:hover i {
     color: var(--accent);
 }

 /* Botão de Scan Principal (Estado Vazio) */
 .btn-scan-main {
     background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
     color: white !important;
     width: 85%;
     padding: 18px;
     border-radius: 16px;
     font-size: 16px;
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 12px;
     border: none;
     cursor: pointer;
     transition: all 0.3s;
     box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
 }

 .btn-scan-main:hover {
     transform: scale(1.05);
     box-shadow: 0 12px 25px rgba(15, 23, 42, 0.25);
     filter: brightness(1.1);
 }