/* ================================================================
   DRIPBOX LINK CHECKER - PREMIUM SAAS UI REFRESH
   Matches: Generate License & Upgrade Pages
   ================================================================ */

/* Reutilizando as variáveis das páginas bonitas */
:root {
    --dbx-orange: #f55e00;      /* Laranja forte do Print 2 */
    --dbx-orange-hover: #d95300;
    --dbx-dark: #1d2327;        /* Texto Escuro */
    --dbx-gray: #646970;        /* Texto Secundário */
    --dbx-border: #dcdcde;      /* Bordas suaves */
    --dbx-bg-light: #f9fafb;
    --dbx-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --dbx-shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.dripbox-admin-wrapper {
    max-width: 1100px;
    margin: 30px auto 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    color: var(--dbx-dark);
}

/* Header */
.dripbox-admin-header { margin-bottom: 30px; }
.dripbox-admin-header h1 { font-size: 32px; font-weight: 800; color: #111; margin-bottom: 8px; }
.dripbox-admin-header p { font-size: 16px; color: var(--dbx-gray); margin: 0; }

/* --- ATUALIZAÇÃO DO HEADER (Box com Sombra e Ícone) --- */
.dbx-header-box {
    background: #fff;
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: var(--dbx-shadow);
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px; /* Margem extra no topo dos cards */
    border: 1px solid #fff; /* Borda sutil */
    position: relative;
    overflow: hidden;
}

/* Efeito de brilho laranja sutil no fundo do header */
.dbx-header-box::before {
    content: ''; position: absolute; top: 0; left: 0; width: 6px; height: 100%;
    background: var(--dbx-orange);
}

.header-icon-wrap {
    width: 60px; height: 60px;
    background: #fff7ed; /* Laranja bem clarinho */
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.header-icon-wrap .dashicons {
    font-size: 32px; width: 32px; height: 32px;
    color: var(--dbx-orange);
}

.header-content h1 {
    font-size: 28px; font-weight: 800; color: #111; margin: 0 0 5px 0;
    line-height: 1.2;
}

.header-content p {
    font-size: 15px; color: #6b7280; margin: 0;
}

/* --- NOVO BOTÃO CLEAR (Branco/Outline) --- */
.btn-white {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 10px 20px;
    font-size: 14px; font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    display: flex; align-items: center; gap: 8px;
}

.btn-white:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.btn-white .dashicons { font-size: 16px; width: 16px; height: 16px; color: #6b7280; }
.btn-white:hover .dashicons { color: #ef4444; } /* Ícone fica vermelho no hover */

/* CLASSE UTILITÁRIA PARA O JAVASCRIPT (Esconder linhas) */
.dbx-hidden { display: none !important; }


/* Grid de Stats (Igual aos Cards do Print 1) */
.dripbox-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dripbox-admin-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--dbx-shadow);
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    gap: 16px;
}
.dripbox-admin-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--dbx-shadow-hover);
}

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-red { background: #fef2f2; color: #dc2626; }
.icon-orange { background: #fff7ed; color: #ea580c; }
.icon-green { background: #f0fdf4; color: #16a34a; }

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 24px; font-weight: 800; color: #111; line-height: 1; }
.stat-label { font-size: 13px; font-weight: 600; color: var(--dbx-gray); text-transform: uppercase; margin-top: 4px; }

/* Control Panel (A barra de botões) */
.dbx-control-panel {
    display: flex; justify-content: space-between; align-items: center;
    background: #fff; padding: 15px 20px;
    border-radius: 12px; border: 1px solid #e5e7eb;
    margin-bottom: 30px;
    box-shadow: var(--dbx-shadow);
}
.control-left { display: flex; align-items: center; gap: 15px; }

/* Botão Laranja Premium (Igual Print 2) */
.btn-orange {
    background: var(--dbx-orange);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 15px; font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    display: flex; align-items: center; gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(245, 94, 0, 0.2);
}
.btn-orange:hover {
    background: var(--dbx-orange-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(245, 94, 0, 0.3);
}

.btn-text-only {
    background: transparent; border: none;
    color: var(--dbx-gray); font-weight: 600; font-size: 14px;
    cursor: pointer;
}
.btn-text-only:hover { color: #dc2626; text-decoration: underline; }

.last-scan-info { font-size: 13px; color: #9ca3af; font-style: italic; }

/* Empty State Moderno */
.dbx-empty-state-modern {
    background: #fff; border-radius: 12px; border: 2px dashed #e5e7eb;
    text-align: center; padding: 60px 20px;
}
.empty-icon { font-size: 48px; margin-bottom: 15px; opacity: 0.5; }

/* ===== RESULTS LIST (A grande mudança: sai tabela, entra lista) ===== */

/* Abas estilo SaaS */
.dbx-modern-tabs {
    display: flex; gap: 20px; border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px; padding-bottom: 10px;
}
.dbx-tab {
    background: none; border: none; padding: 0 0 10px 0;
    font-size: 14px; font-weight: 600; color: var(--dbx-gray);
    cursor: pointer; position: relative;
    display: flex; align-items: center; gap: 6px;
}
.dbx-tab.active { color: var(--dbx-dark); }
.dbx-tab.active::after {
    content: ''; position: absolute; bottom: -11px; left: 0; width: 100%; height: 2px;
    background: var(--dbx-orange);
}
.badge {
    background: #f3f4f6; color: #4b5563; font-size: 11px; padding: 2px 8px; border-radius: 10px;
}
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-orange { background: #ffedd5; color: #9a3412; }
.badge-green { background: #dcfce7; color: #166534; }

/* Lista Header */
.dbx-link-list-header {
    display: grid; grid-template-columns: 50px 2fr 1.5fr 100px;
    padding: 0 20px 10px; font-size: 12px; font-weight: 700;
    text-transform: uppercase; color: #9ca3af; letter-spacing: 0.5px;
}

/* Linha da Lista (Card Row) */
.dbx-link-row {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 50px 2fr 1.5fr 100px;
    align-items: center;
    transition: all 0.2s;
}
.dbx-link-row:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    transform: translateX(2px);
}
.dbx-link-row.dbx-hidden { display: none; }

/* Colunas Internas */
.status-dot {
    width: 12px; height: 12px; border-radius: 50%;
}
.dot-green { background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }
.dot-red { width: 24px; height: 24px; background: #fee2e2; color: #dc2626; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.dot-orange { width: 24px; height: 24px; background: #ffedd5; color: #ea580c; display: flex; align-items: center; justify-content: center; font-size: 14px; }

.url-line { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.main-link { font-weight: 600; color: var(--dbx-dark); text-decoration: none; font-size: 15px; }
.main-link:hover { color: var(--dbx-orange); }
.http-badge { background: #f3f4f6; font-family: monospace; font-size: 11px; padding: 2px 6px; border-radius: 4px; color: #6b7280; }

.post-line { font-size: 13px; color: #9ca3af; }
.post-line a { color: #6b7280; text-decoration: none; }
.post-line a:hover { text-decoration: underline; }
.edit-icon { font-size: 12px; color: #d1d5db; margin-left: 5px; opacity: 0.6; }

/* Pills (Detalhes) */
.status-pill {
    display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 20px;
}
.pill-ok { background: #f0fdf4; color: #166534; }
.pill-broken { background: #fef2f2; color: #991b1b; }
.pill-risky { background: #fff7ed; color: #9a3412; }

/* Botão Recheck */
.btn-small-outline {
    background: #fff; border: 1px solid #d1d5db;
    color: var(--dbx-dark); padding: 6px 12px; border-radius: 6px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.btn-small-outline:hover {
    border-color: var(--dbx-orange); color: var(--dbx-orange);
}

/* Progress Bar Moderna */
.modern-progress-wrap {
    background: #fff; padding: 20px; border-radius: 12px; border: 1px solid #e5e7eb; margin-bottom: 30px;
}
.dbx-progress-header { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: 10px; font-size: 14px; }
.dbx-progress-bar { height: 8px; background: #f3f4f6; border-radius: 4px; overflow: hidden; }
.dbx-progress-fill { height: 100%; background: var(--dbx-orange); width: 0%; transition: width 0.3s; }


/* --- TOGGLE SWITCHES (AUTOMATION) --- */
/* --- AUTOMATION SETTINGS CARD (O que faltou) --- */
.dbx-settings-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); /* Sombra suave igual aos outros */
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    /* Um degradê sutil para destacar que é PRO */
    background: linear-gradient(to right, #fff, #fff7ed); 
}

.settings-intro {
    flex: 1;
    min-width: 250px;
}

/* Título com ícone alinhado */
.settings-intro h3 { 
    margin: 0 0 8px 0; 
    font-size: 18px; 
    color: #111; 
    font-weight: 700; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.settings-intro p { 
    margin: 0; 
    font-size: 14px; 
    color: #6b7280; 
    max-width: 500px;
}

.pro-badge-small {
    background: #f55e00; 
    color: #fff; 
    font-size: 10px; 
    padding: 3px 8px; 
    border-radius: 4px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    font-weight: 700;
}

.toggles-wrap {
    display: flex; 
    gap: 40px; /* Espaço entre os dois botões */
    align-items: center;
}

.toggle-item {
    display: flex; 
    flex-direction: column; /* Texto em cima, botão embaixo */
    align-items: center; 
    gap: 8px;
}

.toggle-label { 
    font-size: 13px; 
    font-weight: 600; 
    color: #374151; 
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- O SWITCH (BOTÃO DESLIZANTE) --- */
.dbx-switch {
    position: relative; 
    display: inline-block; 
    width: 50px; 
    height: 28px;
}
.dbx-switch input { opacity: 0; width: 0; height: 0; }

.dbx-slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1; /* Cinza quando desligado */
    transition: .3s; 
    border-radius: 34px;
}

.dbx-slider:before {
    position: absolute; content: "";
    height: 22px; width: 22px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .3s; 
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Quando ligado (Checked) */
.dbx-switch input:checked + .dbx-slider { 
    background-color: #f55e00; /* Laranja da marca */
}
.dbx-switch input:checked + .dbx-slider:before { 
    transform: translateX(22px); 
}

/* Estado de Carregando (Loading) */
.dbx-switch.loading { opacity: 0.6; pointer-events: none; }



/* --- BOTÃO FIX IT  --- */
.dbx-link-row .col-actions {
    display: flex !important;
    align-items: center;
    justify-content: flex-end; /* Alinha à direita */
    gap: 10px; /* Espaço entre os botões */
    white-space: nowrap;
}

/* --- BOTÃO FIX IT (VERMELHO & SHADOW) --- */
.dbx-fix-btn {
    background-color: #dc2626 !important; /* Vermelho Alerta */
    color: #fff !important;
    border: none !important;
    font-weight: 700 !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.3); /* Sombra Vermelha */
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-size: 11px !important;
    letter-spacing: 0.5px;
    height: auto !important;
    line-height: normal !important;
}

.dbx-fix-btn:hover {
    background-color: #b91c1c !important; /* Vermelho mais escuro no hover */
    color: #fff !important;
    transform: translateY(-2px); /* Sobe um pouquinho */
    box-shadow: 0 6px 8px -1px rgba(220, 38, 38, 0.5);
}

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

/* --- SHORTCODE BADGE (Estilo GitHub) --- */
.dbx-shortcode-badge {
    background: #f0f0f1;
    border: 1px solid #dcdcde;
    color: #50575e;
    font-family: monospace;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    cursor: pointer;
    position: relative;
    top: -1px;
    transition: all 0.2s;
}

.dbx-shortcode-badge:hover {
    background: #fff;
    border-color: #8c8f94;
    color: #1d2327;
}
