/* assets/css/style.css - Estilo iOS moderno */

:root {
    --primary: #007AFF;
    --primary-dark: #0055CC;
    --primary-light: #E5F0FF;
    --secondary: #34C759;
    --danger: #FF3B30;
    --warning: #FF9500;
    --bg: #F2F5FA;
    --card-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 12px 60px rgba(0, 122, 255, 0.15);
    --radius: 20px;
    --radius-sm: 12px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: #1C1C1E;
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #1C1C1E;
}

.logo img { height: 36px; width: auto; }
.logo span { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.logo span::first-letter { color: var(--primary); }

.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: #1C1C1E;
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}

.main-nav a:hover { color: var(--primary); }

.admin-link {
    background: var(--warning);
    color: white !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px !important;
}

.menu-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }

/* ============================================
   BUSCADOR
   ============================================ */
.search-section { padding: 40px 0 20px; text-align: center; }
.search-section h1 { font-size: 32px; font-weight: 700; margin-bottom: 8px; }
.search-section p { color: #8E8E93; font-size: 17px; margin-bottom: 24px; }

.search-form { max-width: 600px; margin: 0 auto; }

.search-box {
    display: flex;
    gap: 10px;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    padding: 4px;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.search-box select {
    padding: 12px 10px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: #1C1C1E;
    cursor: pointer;
    outline: none;
    min-width: 90px;
}

.search-box input {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: transparent;
    font-size: 17px;
    font-weight: 500;
    color: #1C1C1E;
    outline: none;
}

.search-box input::placeholder { color: #8E8E93; font-weight: 400; }

.search-box button {
    padding: 10px 28px;
    background: linear-gradient(135deg, var(--primary), #5856D6);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(0, 122, 255, 0.35);
}

.quick-suggestions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.quick-suggestions span { font-size: 13px; color: #8E8E93; margin-right: 4px; }

.quick-suggestions a {
    padding: 4px 14px;
    background: rgba(0, 122, 255, 0.08);
    border: 1px solid rgba(0, 122, 255, 0.12);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.quick-suggestions a:hover { background: var(--primary); color: white; }

/* ============================================
   LISTADOS
   ============================================ */
.lists-section { padding: 20px 0 40px; }

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.list-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.list-card:hover { box-shadow: var(--shadow-hover); }

.list-card h3 {
    font-size: 17px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg);
}

.list-card ul { list-style: none; }
.list-card ul li { padding: 8px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.04); }
.list-card ul li:last-child { border-bottom: none; }

.list-card ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1C1C1E;
    transition: var(--transition);
    flex-wrap: wrap;
}

.list-card ul li a:hover { color: var(--primary); }

.list-card .number { font-weight: 700; min-width: 80px; }
.list-card .name { flex: 1; color: #3A3A3C; }
.list-card .count { font-size: 12px; color: #8E8E93; }

.list-card.full { grid-column: 1 / -1; }

.list-card.horizontal ul {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.list-card.horizontal ul li { border-bottom: none; padding: 4px 0; }
.list-card.horizontal ul li a { gap: 4px; }
.list-card.horizontal .number { min-width: auto; font-size: 14px; }
.list-card.horizontal .time { font-size: 11px; color: #8E8E93; }

/* ============================================
   NÚMERO - PÁGINA DE DETALLE
   ============================================ */
.breadcrumbs { padding: 16px 0 8px; font-size: 14px; color: #8E8E93; }
.breadcrumbs a { color: var(--primary); text-decoration: none; }

.number-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    margin-bottom: 20px;
}

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

.number-header h1 { font-size: 28px; font-weight: 700; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }

.badge {
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge.country { background: #F2F5FA; color: #1C1C1E; }
.badge.operator { color: white; }
.badge.risk-safe { background: #E8F9ED; color: #1A8C3F; }
.badge.risk-warning { background: #FFF5E6; color: #B25E00; }
.badge.risk-danger { background: #FFEBEA; color: #CC2B22; }
.badge.risk-unknown { background: #F2F5FA; color: #8E8E93; }
.badge.verified { background: var(--primary-light); color: var(--primary); }

.number-owner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 20px;
    padding: 12px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
}

.number-owner .label {
    font-size: 12px;
    color: #8E8E93;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: block;
}

.number-owner .value { font-size: 16px; font-weight: 600; }

.type-business { color: var(--primary); }
.type-personal { color: var(--secondary); }
.type-spam { color: var(--danger); }
.type-unknown { color: #8E8E93; }

.description {
    padding: 12px 16px;
    background: #F8F9FC;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
    margin-bottom: 16px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.stat {
    text-align: center;
    padding: 12px;
    background: #F8F9FC;
    border-radius: var(--radius-sm);
}

.stat .number { font-size: 22px; font-weight: 700; display: block; }
.stat .label { font-size: 11px; color: #8E8E93; text-transform: uppercase; letter-spacing: 0.3px; }

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

.btn {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.btn.comment { background: var(--primary-light); color: var(--primary); }
.btn.comment:hover { background: var(--primary); color: white; }

.btn.report { background: #FFEBEA; color: var(--danger); }
.btn.report:hover { background: var(--danger); color: white; }

.btn.copy { background: #E8F9ED; color: var(--secondary); }
.btn.copy:hover { background: var(--secondary); color: white; }

.btn.suggest { background: #FFF5E6; color: var(--warning); }
.btn.suggest:hover { background: var(--warning); color: white; }

.btn.whatsapp { background: #25D366; color: white; }
.btn.whatsapp:hover { background: #1DA851; color: white; }

.btn.primary {
    background: linear-gradient(135deg, var(--primary), #5856D6);
    color: white;
}

.btn.primary:hover { box-shadow: 0 6px 24px rgba(0, 122, 255, 0.3); }

/* ============================================
   REPORTES
   ============================================ */
.reports-section {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
    margin-bottom: 20px;
}

.reports-section h3 { font-size: 17px; margin-bottom: 12px; }
.reports-section ul { list-style: none; }

.reports-section ul li {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.reports-section ul li:last-child { border-bottom: none; }

.reports-section .type {
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    background: #F2F5FA;
    font-size: 13px;
}

.reports-section .detail { flex: 1; }
.reports-section .user { color: #8E8E93; font-size: 13px; }
.reports-section .date { color: #8E8E93; font-size: 12px; }

/* ============================================
   COMENTARIOS
   ============================================ */
.comments-section {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
}

.comments-section h3 { font-size: 17px; margin-bottom: 12px; }

.comments-list { list-style: none; }
.comments-list li { padding: 12px 0; border-bottom: 1px solid rgba(0, 0, 0, 0.04); }
.comments-list li:last-child { border-bottom: none; }

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

.comment-header .user { font-weight: 600; }
.comment-header .date { font-size: 12px; color: #8E8E93; }

.comment-text { font-size: 15px; color: #3A3A3C; line-height: 1.5; }
.comment-rating { margin-top: 4px; font-size: 14px; color: var(--warning); }

.empty { text-align: center; padding: 20px; color: #8E8E93; }

/* ============================================
   PAGINACIÓN
   ============================================ */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    background: #F2F5FA;
    color: #1C1C1E;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.pagination a:hover { background: var(--primary); color: white; }
.pagination a.active { background: var(--primary); color: white; }

/* ============================================
   FORMULARIO DE COMENTARIO
   ============================================ */
.comment-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--bg);
}

.comment-form h4 { margin-bottom: 12px; }
.comment-form .form-group { margin-bottom: 12px; }
.comment-form .form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 4px; }

.comment-form input,
.comment-form textarea,
.comment-form select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #E5E8EC;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
    background: #F8F9FC;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}

.comment-form textarea { min-height: 80px; resize: vertical; }

.stars {
    display: flex;
    gap: 4px;
    direction: rtl;
}

.stars input { display: none; }
.stars label { font-size: 30px; color: #D1D1D6; cursor: pointer; transition: color 0.2s; }
.stars input:checked ~ label,
.stars label:hover,
.stars label:hover ~ label { color: var(--warning); }

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-container { max-width: 1200px; margin: 0 auto; padding: 20px 0; }

.admin-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 2px solid var(--bg);
    margin-bottom: 24px;
}

.admin-header h1 { font-size: 24px; }

.admin-nav {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-nav a {
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: #8E8E93;
    font-weight: 500;
    transition: var(--transition);
}

.admin-nav a:hover,
.admin-nav a.active { background: var(--primary); color: white; }

.admin-message {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    background: #E8F9ED;
    color: #1A8C3F;
    margin-bottom: 20px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th {
    text-align: left;
    padding: 10px 8px;
    font-size: 12px;
    text-transform: uppercase;
    color: #8E8E93;
    border-bottom: 2px solid var(--bg);
}

.admin-table td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--bg);
}

.admin-table .old-name { color: #8E8E93; text-decoration: line-through; }
.admin-table .new-name { color: var(--primary); }

.admin-table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-table .btn { padding: 4px 14px; font-size: 12px; }
.admin-table .btn.approve { background: var(--secondary); color: white; }
.admin-table .btn.approve:hover { background: #2A9D4A; }
.admin-table .btn.reject { background: var(--danger); color: white; }
.admin-table .btn.reject:hover { background: #CC2B22; }

.admin-empty { text-align: center; padding: 40px; color: #8E8E93; }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: #1C1C1E;
    color: #8E8E93;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-col h4 { color: white; font-size: 16px; margin-bottom: 12px; }
.footer-col p { font-size: 14px; line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 6px; }
.footer-col ul li a { color: #8E8E93; text-decoration: none; font-size: 14px; transition: var(--transition); }
.footer-col ul li a:hover { color: white; }

.social-links { display: flex; gap: 12px; }
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    font-size: 18px;
    text-decoration: none;
    transition: var(--transition);
}
.social-links a:hover { background: var(--primary); }

.footer-bottom { text-align: center; padding-top: 20px; font-size: 13px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .main-nav { display: none; }
    .menu-toggle { display: block; }
    
    .search-section h1 { font-size: 24px; }
    
    .search-box { flex-wrap: wrap; }
    .search-box select { width: 100%; }
    .search-box input { width: 100%; }
    .search-box button { width: 100%; justify-content: center; }
    
    .grid-3 { grid-template-columns: 1fr; }
    
    .number-header { flex-direction: column; align-items: flex-start; }
    .number-header h1 { font-size: 22px; }
    .number-owner { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); }
    .actions { flex-direction: column; }
    .actions .btn { width: 100%; justify-content: center; }
    
    .admin-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .admin-table { font-size: 12px; }
    .admin-table th, .admin-table td { padding: 6px 4px; }
    .admin-table .actions { flex-direction: column; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 480px) {
    .container { padding: 0 12px; }
    .number-card { padding: 16px; }
    .list-card.horizontal ul { flex-direction: column; }
}