/* ═══════════════════════════════════════════
   FuzilCenter — CSS Profissional
   Baseado no design NyxCenter
   ═══════════════════════════════════════════ */

/* ═══ RESET & BASE ═══ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: #0d0d0d;
    color: #fff;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    color: #00ff7f;
}

a {
    color: #00ff7f;
    text-decoration: none;
}

a:hover {
    color: #00cc5f;
}

hr {
    border: none;
    border-top: 1px solid #333;
    margin: 12px 0;
}

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: #00ff7f; border-radius: 6px; }
::-webkit-scrollbar-track { background: #111; }

/* ═══ CARDS ═══ */
.card {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.card-body {
    padding: 20px;
    color: #fff;
}

.card-title {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

/* ═══ BUTTONS ═══ */
.btn {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-success {
    background: #00ff7f;
    color: #000;
}

.btn-success:hover {
    background: #00cc5f;
    box-shadow: 0 4px 12px rgba(0, 255, 127, 0.3);
}

.btn-danger {
    background: #ff4d4d;
    color: #fff;
}

.btn-danger:hover {
    background: #cc3333;
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3);
}

.btn-primary {
    background: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.float-right {
    float: right;
}

.text-center {
    text-align: center;
}

.text-success { color: #00ff7f; }
.text-danger  { color: #ff4d4d; }

/* ═══ BADGES ═══ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.badge-success { background: #00ff7f; color: #000; }
.badge-danger  { background: #ff4d4d; }
.badge-info    { background: #17a2b8; }
.badge-primary { background: #007bff; }
.badge-expire  { background: #ff5733; }

/* ═══════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════ */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #1a1a1a;
}

.login-container {
    background: #2d2d2d;
    padding: 2.5rem 3rem;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    text-align: center;
    width: 90%;
    max-width: 420px;
}

.login-container h1 {
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 1.8rem;
    position: relative;
}

.login-container h1::after {
    content: '';
    width: 60px;
    height: 3px;
    background: #00ff7f;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: underline-pulse 1.5s infinite;
}

@keyframes underline-pulse {
    0%, 100% { width: 60px; }
    50% { width: 80px; }
}

.login-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #444;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: #3d3d3d;
    color: #999;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tab-btn.active {
    background: #00ff7f;
    color: #000;
}

.tab-btn:hover:not(.active) {
    background: #4d4d4d;
    color: #fff;
}

.login-form .input-group {
    margin-bottom: 1rem;
}

.login-form input {
    width: 100%;
    padding: 12px 18px;
    background: #3d3d3d;
    border: 2px solid #4d4d4d;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #00ff7f;
    box-shadow: 0 0 10px rgba(0, 255, 127, 0.2);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #00ff7f;
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.btn-login:hover {
    background: #00cc5f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 127, 0.3);
}

/* ═══ ALERTS ═══ */
.custom-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    backdrop-filter: blur(5px);
}

.custom-alert.show {
    opacity: 1;
    transform: translateX(0);
}

.alert-success {
    background: rgba(0, 255, 127, 0.15);
    border: 1px solid rgba(0, 255, 127, 0.4);
    color: #00ff7f;
}

.alert-error {
    background: rgba(255, 68, 68, 0.15);
    border: 1px solid rgba(255, 68, 68, 0.4);
    color: #ff4444;
}

/* ═══ TOAST ═══ */
.toast-msg {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    background: rgba(0, 255, 127, 0.15);
    border: 1px solid rgba(0, 255, 127, 0.4);
    color: #00ff7f;
    border-radius: 8px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.toast-msg.show {
    opacity: 1;
    transform: translateX(0);
}

/* ═══ TIME WARNING ═══ */
.aviso-tempo {
    position: fixed;
    top: 0;
    width: 100%;
    background: #fff3cd;
    padding: 6px;
    text-align: center;
    font-size: 12px;
    color: #856404;
    border-bottom: 1px solid #ffeeba;
    z-index: 9999;
}

/* ═══════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════ */
.dashboard-container {
    min-height: 100vh;
}

.main-content {
    display: flex;
    min-height: 100vh;
}

/* ═══ SIDEBAR ═══ */
.sidebar {
    width: 260px;
    min-width: 260px;
    background: #111;
    border-right: 1px solid #222;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #222;
}

.sidebar-header h2 {
    font-size: 1.3rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sidebar-group {
    border-bottom: 1px solid #1a1a1a;
}

.sidebar-group h5 {
    cursor: pointer;
    padding: 14px 20px;
    color: #999;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-group h5:hover {
    color: #00ff7f;
}

.sidebar-group h5 i {
    font-size: 0.9rem;
    width: 18px;
    text-align: center;
}

.sidebar-group ul {
    display: none;
    list-style: none;
    padding: 0 0 8px 0;
}

.sidebar-group.active ul {
    display: block;
}

.sidebar-group.active h5 {
    color: #00ff7f;
}

.sidebar-group ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px 10px 30px;
    color: #bbb;
    font-size: 0.9rem;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.sidebar-group ul li a:hover {
    color: #00ff7f;
    background: rgba(0, 255, 127, 0.05);
    border-left-color: #00ff7f;
}

.sidebar-group ul li a i {
    width: 18px;
    text-align: center;
    font-size: 0.85rem;
}

.sidebar-nav-bottom {
    margin-top: auto;
    padding: 20px;
    border-top: 1px solid #222;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: #ff4d4d;
    border: 1px solid #ff4d4d33;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s;
    justify-content: center;
}

.btn-logout:hover {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
}

/* ═══ CONTENT AREA ═══ */
.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    max-height: 100vh;
}

.content-section {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ═══ TIME BOXES ═══ */
.time-section {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.time-box {
    flex: 1;
    min-width: 200px;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
}

.time-box h2 {
    font-size: 0.9rem;
    color: #00ff7f;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.time-box span {
    font-size: 1.1rem;
    color: #ddd;
}

.tempo_expira,
#tempoExpira {
    font-size: 1.6rem !important;
    font-weight: 700;
    color: #ff5733 !important;
    font-family: 'Consolas', monospace;
}

/* ═══ KEY DISPLAY ═══ */
.key-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.key-container span {
    font-family: monospace;
    font-size: 1rem;
    color: #888;
    letter-spacing: 1px;
}

.toggle-key {
    padding: 6px 16px;
    background: #333;
    border: 1px solid #444;
    border-radius: 6px;
    color: #00ff7f;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.toggle-key:hover {
    background: #444;
    border-color: #00ff7f;
}

/* ═══ TOOL BOXES ═══ */
.tool-box {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 24px;
}

.tool-box h2 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.tool-input-row input {
    flex: 1;
    padding: 10px 14px;
    background: #222;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.tool-input-row input:focus {
    outline: none;
    border-color: #00ff7f;
}

.btn-tool {
    padding: 10px 18px;
    background: #00ff7f;
    color: #000;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-tool:hover {
    background: #00cc5f;
    transform: translateY(-1px);
}

.btn-danger-sm {
    background: #ff4d4d;
    color: #fff;
}

.btn-danger-sm:hover {
    background: #cc3333;
}

.tool-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.tool-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
    margin-top: 10px;
}

.tool-textarea:focus {
    outline: none;
    border-color: #00ff7f;
}

.tool-result {
    margin-top: 14px;
}

/* ═══ BIN INFO ═══ */
.bin-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #111;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 16px;
}

.bin-info-grid div {
    color: #ccc;
    font-size: 0.9rem;
}

.bin-info-grid strong {
    color: #00ff7f;
}

/* ═══ SEPARATOR ═══ */
.sep-options {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.sep-opt {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ccc;
    font-size: 0.9rem;
    cursor: pointer;
}

.sep-opt input[type="checkbox"] {
    accent-color: #00ff7f;
}

.sep-stats {
    margin-top: 10px;
    color: #888;
    font-size: 0.85rem;
}

/* ═══ HISTORY ═══ */
.database-info {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
}

.database-info h3 {
    text-align: center;
    margin-bottom: 16px;
    font-size: 1.1rem;
}

.hist-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.hist-filters select,
.hist-filters input {
    flex: 1;
    min-width: 140px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #333;
    background: #111;
    color: #fff;
    font-size: 0.9rem;
}

.hist-filters select:focus,
.hist-filters input:focus {
    outline: none;
    border-color: #00ff7f;
}

.historico-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hist-item {
    background: #111;
    border: 1px solid #222;
    border-left: 4px solid #333;
    border-radius: 6px;
    padding: 12px;
    transition: all 0.15s;
}

.hist-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hist-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.hist-status {
    font-weight: 700;
    font-size: 0.9rem;
}

.hist-date {
    color: #666;
    font-size: 0.8rem;
}

.hist-card {
    font-family: monospace;
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.hist-bottom {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.hist-retorno {
    color: #999;
    font-size: 0.85rem;
}

.hist-gate {
    color: #00ff7f;
    font-size: 0.85rem;
    font-weight: 600;
}

.hist-empty {
    text-align: center;
    color: #666;
    padding: 30px;
}

/* ═══════════════════════════════════════════
   CHECKER PAGE
   ═══════════════════════════════════════════ */
.checker-wrapper {
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 10px;
}

.checker-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.checker-main {
    flex: 2;
    min-width: 300px;
}

.checker-stats {
    flex: 1;
    min-width: 250px;
}

.back-btn {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 20px;
    color: #00ff7f;
    transition: color 0.2s;
}

.back-btn:hover {
    color: #00cc5f;
}

.form-checker {
    width: 100%;
    padding: 12px;
    background: #222 !important;
    border: 1px solid #333 !important;
    border-radius: 6px;
    color: #fff !important;
    font-family: monospace;
    font-size: 0.9rem;
    resize: vertical;
    text-align: center;
    margin-bottom: 14px;
}

.form-checker:focus {
    outline: none;
    border-color: #00ff7f !important;
}

.checker-selects {
    margin-bottom: 14px;
}

.checker-selects select {
    width: 100%;
    padding: 10px;
    background: #222;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
    text-align: center;
}

.checker-selects select:focus {
    outline: none;
    border-color: #00ff7f;
}

.checker-buttons {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.checker-buttons .btn {
    flex: 1;
}

.results-section {
    margin-top: 16px;
}

/* ═══ TEST ITEMS ═══ */
.test-item {
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s;
}

.test-item:hover {
    transform: translateY(-2px);
}

.test-item.approved {
    border-color: #00ff7f;
}

.test-item.reproved {
    border-color: #ff4d4d;
}

.test-item.warning {
    border-color: orange;
}

.test-body {
    padding: 12px 14px;
    color: #eee;
    font-size: 0.9rem;
    font-family: monospace;
    word-break: break-all;
}

/* ═══════════════════════════════════════════
   ADMIN PAGE
   ═══════════════════════════════════════════ */
.admin-wrapper {
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 10px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #222;
}

.admin-header h2 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-logout-top {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ff4d4d;
    font-size: 0.9rem;
    padding: 8px 16px;
    border: 1px solid #ff4d4d33;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-logout-top:hover {
    background: rgba(255, 77, 77, 0.1);
    color: #ff4d4d;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-card h4 {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-form select,
.admin-form input {
    padding: 10px 14px;
    background: #222;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.9rem;
}

.admin-form select:focus,
.admin-form input:focus {
    outline: none;
    border-color: #00ff7f;
}

.btn-gen {
    padding: 12px;
}

.generated-keys {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gen-key-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #111;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px 14px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #00ff7f;
}

.btn-copy-key {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px 8px;
    transition: color 0.2s;
}

.btn-copy-key:hover {
    color: #00ff7f;
}

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

.admin-actions .btn {
    flex: 1;
    min-width: 140px;
}

.admin-summary {
    margin-top: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.sum-item {
    flex: 1;
    min-width: 80px;
    background: #111;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
}

.sum-label {
    display: block;
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.sum-val {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}

/* ═══ KEYS TABLE ═══ */
.keys-table-wrap {
    overflow-x: auto;
}

.keys-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.keys-table th {
    background: #111;
    color: #00ff7f;
    padding: 12px 14px;
    text-align: left;
    border-bottom: 2px solid #222;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.keys-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #1a1a1a;
    color: #ccc;
}

.keys-table tr:hover {
    background: rgba(0, 255, 127, 0.03);
}

.key-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: monospace;
    font-size: 0.85rem;
}

.key-text {
    color: #00ff7f;
    font-weight: 600;
}

.status-active {
    color: #00ff7f;
    font-weight: 600;
}

.status-expired {
    color: #ff4d4d;
    font-weight: 600;
}

.btn-del {
    background: none;
    border: 1px solid #ff4d4d33;
    color: #ff4d4d;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-del:hover {
    background: rgba(255, 77, 77, 0.15);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: unset;
        flex-direction: row;
        flex-wrap: wrap;
        border-right: none;
        border-bottom: 1px solid #222;
    }

    .sidebar-header {
        width: 100%;
        padding: 12px;
        border-bottom: 1px solid #222;
    }

    .sidebar-group {
        flex: 1;
        min-width: 140px;
        border-bottom: none;
    }

    .sidebar-group h5 {
        padding: 10px 14px;
        font-size: 0.75rem;
    }

    .sidebar-group ul li a {
        padding: 8px 14px 8px 18px;
        font-size: 0.8rem;
    }

    .sidebar-nav-bottom {
        width: 100%;
        padding: 10px;
        border-top: 1px solid #222;
    }

    .content-area {
        padding: 16px;
        max-height: unset;
    }

    .time-section {
        flex-direction: column;
    }

    .checker-row {
        flex-direction: column;
    }

    .admin-grid {
        grid-template-columns: 1fr;
    }

    .bin-info-grid {
        grid-template-columns: 1fr;
    }

    .tool-input-row {
        flex-direction: column;
    }

    .admin-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}


/* ═══════════════════════════════════════════
   ADMIN PANEL — Professional Styles
   ═══════════════════════════════════════════ */

/* ═══ SECTION TITLE ═══ */
.section-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ═══ STATS GRID ═══ */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.stat-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: #00ff7f;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 255, 127, 0.1);
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    background: #262626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #00ff7f;
}

.stat-card.stat-active .stat-icon { color: #00ff7f; }
.stat-card.stat-used .stat-icon { color: #17a2b8; }
.stat-card.stat-expired .stat-icon { color: #ff4d4d; }
.stat-card.stat-tests .stat-icon { color: #ffc107; }
.stat-card.stat-lives .stat-icon { color: #00ff7f; }
.stat-card.stat-dies .stat-icon { color: #ff4d4d; }
.stat-card.stat-gates .stat-icon { color: #17a2b8; }
.stat-card.stat-bins .stat-icon { color: #ff6b35; }
.stat-card.stat-plans .stat-icon { color: #ab47bc; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ═══ SECTION BOX ═══ */
.admin-section-box {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 20px;
}

.admin-section-box h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ═══ GEN FORM ═══ */
.gen-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
}

.gen-form-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gen-form-row label {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gen-form-row select,
.gen-form-row input {
    padding: 10px 14px;
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.gen-form-row select:focus,
.gen-form-row input:focus {
    outline: none;
    border-color: #00ff7f;
    box-shadow: 0 0 0 2px rgba(0, 255, 127, 0.15);
}

.btn-gen {
    align-self: flex-start;
    margin-top: 5px;
}

.generated-keys {
    margin-top: 20px;
}

.generated-keys h5 {
    color: #00ff7f;
    margin-bottom: 10px;
}

.gen-key-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #0d0d0d;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 6px;
    border-left: 3px solid #00ff7f;
}

.gen-key-item code {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: #00ff7f;
    flex: 1;
}

/* ═══ KEYS TOOLBAR ═══ */
.keys-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.keys-search {
    display: flex;
    align-items: center;
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 0 12px;
    flex: 1;
    min-width: 200px;
}

.keys-search i {
    color: #666;
    margin-right: 8px;
}

.keys-search input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 9px 0;
    width: 100%;
    font-size: 0.9rem;
}

.keys-search input:focus { outline: none; }

.keys-toolbar select {
    padding: 9px 12px;
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
}

/* ═══ KEYS TABLE ═══ */
.keys-table-wrap {
    overflow-x: auto;
}

.keys-table {
    width: 100%;
    border-collapse: collapse;
}

.keys-table th {
    padding: 12px 15px;
    text-align: left;
    background: #111;
    color: #888;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2a2a2a;
}

.keys-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #1f1f1f;
    font-size: 0.85rem;
    vertical-align: middle;
}

.keys-table tr:hover {
    background: #151515;
}

.key-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.key-cell code {
    font-family: 'Courier New', monospace;
    color: #00ff7f;
    font-size: 0.85rem;
}

.date-cell {
    color: #999;
    font-size: 0.8rem;
    white-space: nowrap;
}

.empty-row {
    text-align: center;
    color: #555;
    padding: 30px !important;
}

/* ═══ BADGES ═══ */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge-active {
    background: rgba(0, 255, 127, 0.15);
    color: #00ff7f;
    border: 1px solid rgba(0, 255, 127, 0.3);
}

.badge-used {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
    border: 1px solid rgba(23, 162, 184, 0.3);
}

.badge-expired {
    background: rgba(255, 77, 77, 0.15);
    color: #ff4d4d;
    border: 1px solid rgba(255, 77, 77, 0.3);
}

.badge-plan {
    background: rgba(171, 71, 188, 0.15);
    color: #ab47bc;
    border: 1px solid rgba(171, 71, 188, 0.3);
}

/* ═══ ICON BUTTONS ═══ */
.btn-icon {
    background: transparent;
    border: 1px solid #333;
    color: #888;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    color: #00ff7f;
    border-color: #00ff7f;
    background: rgba(0, 255, 127, 0.1);
}

.btn-icon-danger:hover {
    color: #ff4d4d;
    border-color: #ff4d4d;
    background: rgba(255, 77, 77, 0.1);
}

/* ═══ GATES GRID ═══ */
.gates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 15px;
}

.gate-card {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 18px;
    transition: all 0.2s;
}

.gate-card.gate-on {
    border-left: 3px solid #00ff7f;
}

.gate-card.gate-off {
    border-left: 3px solid #ff4d4d;
    opacity: 0.7;
}

.gate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.gate-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
}

.gate-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.gate-detail {
    font-size: 0.8rem;
    color: #999;
}

.gate-detail code {
    color: #00ff7f;
    font-family: 'Courier New', monospace;
}

.gate-label {
    color: #666;
}

/* ═══ TOGGLE SWITCH ═══ */
.switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #333;
    border-radius: 24px;
    transition: 0.3s;
}

.slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

input:checked + .slider {
    background: #00ff7f;
}

input:checked + .slider::before {
    transform: translateX(20px);
}

/* ═══ BINS ═══ */
.bins-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: space-between;
}

.bins-add {
    display: flex;
    gap: 8px;
}

.bins-add input {
    padding: 8px 12px;
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    width: 150px;
    font-size: 0.9rem;
}

.bins-add input:focus {
    outline: none;
    border-color: #00ff7f;
}

.bins-count {
    color: #888;
    font-size: 0.85rem;
}

.bins-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bin-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #262626;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 6px 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #ff6b35;
}

.bin-remove {
    background: transparent;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.bin-remove:hover {
    color: #ff4d4d;
}

/* ═══ HISTORY ═══ */
.history-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.history-toolbar select,
.history-toolbar input {
    padding: 9px 12px;
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
}

.history-toolbar input {
    flex: 1;
    min-width: 150px;
}

.history-toolbar select:focus,
.history-toolbar input:focus {
    outline: none;
    border-color: #00ff7f;
}

.history-stats-mini {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #2a2a2a;
}

.hstat {
    font-size: 0.85rem;
    color: #999;
}

.hstat strong { color: #fff; }
.hstat.live strong { color: #00ff7f; }
.hstat.die strong { color: #ff4d4d; }
.hstat.err strong { color: #ffc107; }

.global-history-list {
    max-height: 500px;
    overflow-y: auto;
}

.hist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #1a1a1a;
    font-size: 0.8rem;
    transition: background 0.15s;
}

.hist-item:hover {
    background: #151515;
}

.hist-item.hist-live {
    border-left: 3px solid #00ff7f;
}

.hist-item.hist-die {
    border-left: 3px solid #ff4d4d;
}

.hist-item.hist-error {
    border-left: 3px solid #ffc107;
}

.hist-status {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.72rem;
    width: 45px;
    text-align: center;
    padding: 2px 6px;
    border-radius: 3px;
}

.hist-live .hist-status { color: #00ff7f; background: rgba(0,255,127,0.1); }
.hist-die .hist-status { color: #ff4d4d; background: rgba(255,77,77,0.1); }
.hist-error .hist-status { color: #ffc107; background: rgba(255,193,7,0.1); }

.hist-card {
    font-family: 'Courier New', monospace;
    color: #ccc;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hist-gate {
    color: #17a2b8;
    font-size: 0.72rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hist-retorno {
    color: #888;
    font-size: 0.72rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hist-date {
    color: #666;
    font-size: 0.72rem;
    white-space: nowrap;
}

.hist-key {
    color: #ab47bc;
    font-size: 0.68rem;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ═══ RECENT ACTIVITY ═══ */
.recent-list {
    max-height: 350px;
    overflow-y: auto;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-bottom: 1px solid #1a1a1a;
    font-size: 0.8rem;
}

.recent-item.live {
    border-left: 3px solid #00ff7f;
}

.recent-status {
    font-weight: 700;
    color: #00ff7f;
    font-size: 0.72rem;
    width: 40px;
}

.recent-card {
    font-family: 'Courier New', monospace;
    color: #ccc;
    flex: 1;
}

.recent-gate {
    color: #17a2b8;
    font-size: 0.72rem;
}

.recent-date {
    color: #666;
    font-size: 0.72rem;
}

/* ═══ SETTINGS ═══ */
.settings-form {
    max-width: 450px;
}

.settings-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.settings-row label {
    font-size: 0.8rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-row input {
    padding: 10px 14px;
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 6px;
    color: #fff;
    font-size: 0.95rem;
}

.settings-row input:focus {
    outline: none;
    border-color: #00ff7f;
    box-shadow: 0 0 0 2px rgba(0, 255, 127, 0.15);
}

.settings-row input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.settings-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.system-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.sys-info-item {
    background: #111;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #222;
}

.sys-label {
    display: block;
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.sys-value {
    color: #00ff7f;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

/* ═══ TOAST CONTAINER ═══ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-msg {
    padding: 12px 20px;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.toast-msg.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success { background: #1a3a2a; border: 1px solid #00ff7f; }
.toast-error { background: #3a1a1a; border: 1px solid #ff4d4d; }
.toast-info { background: #1a2a3a; border: 1px solid #17a2b8; }

.dim {
    color: #555;
    font-style: italic;
}

/* ═══ ADMIN RESPONSIVE ═══ */
@media (max-width: 768px) {
    .admin-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gates-grid {
        grid-template-columns: 1fr;
    }
    .keys-toolbar {
        flex-direction: column;
    }
    .keys-search {
        min-width: 100%;
    }
    .history-toolbar {
        flex-direction: column;
    }
    .history-stats-mini {
        flex-wrap: wrap;
        gap: 10px;
    }
    .hist-item {
        flex-wrap: wrap;
    }
    .system-info-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stat-card {
        padding: 12px;
    }
    .stat-value {
        font-size: 1.2rem;
    }
}

/* ════════════ RENEWAL / PAYMENT ════════════ */
.renew-container {
    padding: 10px 0;
}
.renew-title {
    font-size: 1.3rem;
    color: #fff;
    margin-bottom: 6px;
}
.renew-title i {
    color: #00ff7f;
    margin-right: 8px;
}
.renew-subtitle {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.renew-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.renew-plan-card {
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 6px;
    padding: 18px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.renew-plan-card:hover {
    border-color: #00ff7f;
    background: #1e1e35;
    transform: translateY(-2px);
}
.renew-plan-icon {
    font-size: 1.6rem;
    color: #00ff7f;
}
.renew-plan-label {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
}
.renew-plan-price {
    font-size: 1.2rem;
    color: #00ff7f;
    font-weight: 700;
}
.renew-plan-card .btn-tool {
    margin-top: 4px;
    font-size: 0.8rem;
    padding: 5px 14px;
}
.renew-loading, .renew-empty {
    color: #888;
    text-align: center;
    padding: 30px;
    grid-column: 1 / -1;
}

/* ═══ PIX MODAL ═══ */
.pix-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.pix-modal {
    background: #12121e;
    border: 1px solid #2a2a3e;
    border-radius: 10px;
    width: 100%;
    max-width: 420px;
    padding: 28px 24px;
    position: relative;
    animation: modalSlide 0.25s ease;
}
@keyframes modalSlide {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.pix-modal-close {
    position: absolute;
    top: 14px; right: 14px;
    background: none; border: none;
    color: #666; font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px 8px;
}
.pix-modal-close:hover { color: #ff4d4d; }
.pix-modal-header {
    text-align: center;
    margin-bottom: 22px;
}
.pix-modal-icon {
    font-size: 2.2rem;
    color: #00ff7f;
    margin-bottom: 8px;
}
.pix-modal-header h3 {
    color: #fff;
    font-size: 1.2rem;
    margin: 0 0 10px;
}
.pix-modal-plan-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.pix-plan-name {
    color: #ccc;
    font-size: 0.95rem;
}
.pix-plan-price {
    background: #00ff7f18;
    color: #00ff7f;
    padding: 4px 14px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid #00ff7f33;
}

/* Loading */
.pix-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 40px 0;
    color: #888;
}
.pix-spinner {
    width: 40px; height: 40px;
    border: 3px solid #2a2a3e;
    border-top-color: #00ff7f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* QR Code */
.pix-qr-container {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.pix-qr-box {
    background: #0d0d1a;
    border: 2px solid #2a2a3e;
    border-radius: 8px;
    padding: 16px;
    display: inline-block;
}
.pix-qr-box img {
    display: block;
}
.pix-instruction {
    text-align: center;
    color: #777;
    font-size: 0.85rem;
    margin-bottom: 14px;
}

/* Copy area */
.pix-copy-area {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.pix-copy-area input {
    flex: 1;
    background: #0a0a14;
    border: 1px solid #2a2a3e;
    color: #fff;
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 0.78rem;
    font-family: 'Courier New', monospace;
    min-width: 0;
}
.pix-copy-btn {
    background: #00ff7f22;
    border: 1px solid #00ff7f44;
    color: #00ff7f;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: all 0.2s;
}
.pix-copy-btn:hover {
    background: #00ff7f33;
    border-color: #00ff7f;
}

/* Status bar */
.pix-status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #0a0a14;
    border: 1px solid #2a2a3e;
    border-radius: 5px;
}
.pix-status-dot {
    width: 10px; height: 10px;
    background: #ffa500;
    border-radius: 50%;
    animation: pulseDot 1.4s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.7); }
}
#modalStatusText {
    color: #ffa500;
    font-size: 0.9rem;
}

/* Success */
.pix-modal-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 0;
    text-align: center;
}
.pix-success-icon {
    font-size: 3.5rem;
    color: #00ff7f;
    animation: successPop 0.4s ease;
}
@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.pix-modal-success h3 {
    color: #00ff7f;
    margin: 0;
    font-size: 1.3rem;
}
.pix-modal-success p {
    color: #aaa;
    margin: 0;
}
.pix-new-expires {
    color: #00ff7f !important;
    font-weight: 600;
    font-size: 0.95rem;
}
.pix-reload-btn {
    margin-top: 6px;
}

/* Expired */
.pix-modal-expired {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px 0;
    text-align: center;
}
.pix-expired-icon {
    font-size: 3rem;
    color: #ff4d4d;
}
.pix-modal-expired h3 {
    color: #ff4d4d;
    margin: 0;
}
.pix-modal-expired p {
    color: #888;
    margin: 0;
}

@media (max-width: 768px) {
    .renew-plans-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .renew-plan-card {
        padding: 14px 10px;
    }
    .pix-modal {
        padding: 22px 16px;
        max-width: 100%;
    }
    .pix-copy-area {
        flex-direction: column;
    }
    .pix-qr-box {
        padding: 12px;
    }
}
