/*
Theme Name: AuditorIA - Child Theme
Theme URI: https://app.juandcastro.com
Description: Child theme for AuditorIA platform - Meta Ads Analytics Dashboard
Author: Vicky
Author URI: https://openclaw.ai
Template: twentytwentyfive
Version: 1.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: auditoria
*/

/* AuditorIA Custom Styles */

/* Login Page */
.auditoria-login {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.auditoria-login h1 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.auditoria-login .logo {
  text-align: center;
  margin-bottom: 1rem;
}

.auditoria-login .logo img {
  max-width: 120px;
}

.auditoria-login form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auditoria-login input[type="text"],
.auditoria-login input[type="email"],
.auditoria-login input[type="password"] {
  padding: 0.75rem 1rem;
  border: 1px solid #2a2a4e;
  border-radius: 8px;
  background: #0f0f1a;
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.auditoria-login input:focus {
  outline: none;
  border-color: #7c3aed;
}

.auditoria-login button {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.auditoria-login button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.auditoria-login .error {
  color: #ef4444;
  font-size: 0.875rem;
  padding: 0.5rem;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 6px;
}

.auditoria-login .success {
  color: #10b981;
  font-size: 0.875rem;
  padding: 0.5rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 6px;
}

.auditoria-login .switch-form {
  text-align: center;
  margin-top: 1rem;
  color: #9ca3af;
}

.auditoria-login .switch-form a {
  color: #7c3aed;
  text-decoration: none;
}

/* Dashboard */
.auditoria-dashboard {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 100%);
  padding: 1rem;
}

.auditoria-dashboard .header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #16213e;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.auditoria-dashboard .header h1 {
  color: #fff;
  font-size: 1.5rem;
}

.auditoria-dashboard .user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auditoria-dashboard .user-info span {
  color: #9ca3af;
}

.auditoria-dashboard .logout-btn {
  padding: 0.5rem 1rem;
  background: #2a2a4e;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

/* Facebook Connect Card */
.fb-connect-card {
  max-width: 500px;
  margin: 2rem auto;
  padding: 2rem;
  background: #16213e;
  border-radius: 12px;
  text-align: center;
}

.fb-connect-card h2 {
  color: #fff;
  margin-bottom: 1rem;
}

.fb-connect-card p {
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

.fb-connect-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: #1877f2;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.fb-connect-btn:hover {
  background: #166fe5;
}

.fb-connect-btn svg {
  width: 24px;
  height: 24px;
}

/* Metrics Cards */
.metrics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.metric-card {
  padding: 1.5rem;
  background: #16213e;
  border-radius: 12px;
}

.metric-card .label {
  color: #9ca3af;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.metric-card .value {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 700;
}

.metric-card .subtitle {
  color: #7c3aed;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Campaigns Table */
.campaigns-table {
  background: #16213e;
  border-radius: 12px;
  overflow: hidden;
}

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

.campaigns-table th,
.campaigns-table td {
  padding: 1rem;
  text-align: left;
}

.campaigns-table th {
  background: #1a1a2e;
  color: #9ca3af;
  font-weight: 600;
}

.campaigns-table td {
  color: #fff;
  border-bottom: 1px solid #2a2a4e;
}

.campaigns-table tr:hover td {
  background: rgba(124, 58, 237, 0.05);
}

/* Time Filter */
.time-filter {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.time-filter button {
  padding: 0.5rem 1rem;
  background: #2a2a4e;
  color: #9ca3af;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.time-filter button.active {
  background: #7c3aed;
  color: #fff;
}

.time-filter button:hover:not(.active) {
  background: #3a3a5e;
}

/* Loading State */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  color: #9ca3af;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #2a2a4e;
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .auditoria-dashboard .header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .metrics-summary {
    grid-template-columns: 1fr 1fr;
  }
  
  .campaigns-table {
    overflow-x: auto;
  }
  
  .campaigns-table table {
    min-width: 600px;
  }
}

@media (max-width: 480px) {
  .auditoria-login {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .metrics-summary {
    grid-template-columns: 1fr;
  }
}