/* Dominios CRM - Hoja de estilos compartida */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* Página de login (fondo degradado centrado) */
body.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.navbar h1 { font-size: 24px; font-weight: 600; }
.navbar-right { display: flex; align-items: center; gap: 20px; }
.user-info { font-size: 14px; }

/* Botones */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    font-family: inherit;
}
.btn-primary { background: #667eea; color: white; }
.btn-primary:hover { background: #5568d3; }
.btn-secondary { background: #6c757d; color: white; }
.btn-secondary:hover { background: #5a6268; }
.btn-danger { background: #e74c3c; color: white; }
.btn-small { padding: 4px 10px; font-size: 12px; }
.btn-link {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
}

/* Formularios en línea (acciones tipo botón dentro de listas) */
.inline-form { display: inline; }

/* Layout */
.container { max-width: 1400px; margin: 0 auto; padding: 2rem; }
.container-narrow { max-width: 900px; }
.container-medium { max-width: 1000px; }
.container-services { max-width: 1200px; }

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.stat-card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-card .number { font-size: 32px; font-weight: 700; color: #667eea; }

/* Filtros */
.filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: end;
}
.filter-group { flex: 1; min-width: 200px; }
.filter-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
}
.filter-group input,
.filter-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* Tarjetas */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-padded { padding: 30px; }
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}
.card-header h2 { font-size: 20px; font-weight: 600; }
.card-body { padding: 30px; }
.card h2 { margin-bottom: 24px; font-size: 24px; }

/* Tablas */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 20px; text-align: left; border-bottom: 1px solid #eee; }
th {
    font-weight: 600;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8f9fa;
}
td { font-size: 14px; }
tr:hover { background: #f8f9fa; }

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger  { background: #f8d7da; color: #721c24; }
.badge-info    { background: #d1ecf1; color: #0c5460; }

.actions { display: flex; gap: 8px; }

/* Alertas */
.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}
.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeaa7; }

/* Estado vacío */
.empty-state { text-align: center; padding: 60px 20px; color: #999; }
.empty-state-icon { font-size: 64px; margin-bottom: 20px; }

/* Formularios */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
.form-group { margin-bottom: 20px; }
.form-group.full-width { grid-column: 1 / -1; }
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: #555;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}
textarea { min-height: 100px; resize: vertical; }
.checkbox-group { display: flex; align-items: center; gap: 10px; }
.checkbox-group input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; }
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.help-text { font-size: 12px; color: #999; margin-top: 4px; }

/* Breadcrumb */
.breadcrumb { margin-bottom: 20px; color: #666; font-size: 14px; }
.breadcrumb a { color: #667eea; text-decoration: none; }

/* Tarjetas de servicio / credencial */
.service-card, .credential-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}
.service-card:hover { border-color: #667eea; }
.service-header, .credential-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}
.service-category { font-size: 18px; font-weight: 600; color: #667eea; }
.service-provider { font-size: 14px; color: #666; margin-top: 4px; }
.service-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}
.info-item { font-size: 13px; }
.info-label { color: #999; margin-bottom: 4px; }
.info-value { font-weight: 500; color: #333; }
.service-actions, .credential-actions { display: flex; gap: 10px; }
.section-padded { padding: 20px; }

/* Credenciales */
.credential-label { font-size: 18px; font-weight: 600; color: #333; }
.credential-info { display: grid; gap: 12px; margin-bottom: 15px; }
.info-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.info-row .info-label { min-width: 100px; }
.info-row .info-value { flex: 1; }
.password-field { display: flex; align-items: center; gap: 10px; }
.password-hidden { font-family: monospace; color: #999; }
.password-shown { background: #f0f0f0; padding: 4px 8px; border-radius: 4px; }
.security-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #856404;
}

/* Login */
.login-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-width: 420px;
    width: 100%;
    padding: 40px;
}
.login-container h1 { color: #333; margin-bottom: 10px; font-size: 28px; }
.login-container .subtitle { color: #666; margin-bottom: 30px; font-size: 14px; }
.login-container .btn-block {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    font-weight: 600;
}
.login-container .btn-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}
.footer { margin-top: 30px; text-align: center; color: #999; font-size: 12px; }
