/* SEO Agent - Estilos Principales */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #0f172a;
    --sidebar-color: #94a3b8;
    --sidebar-active-bg: #1e293b;
    --sidebar-active-color: #38bdf8;
    --brand-primary: #2563eb;
    --brand-primary-hover: #1d4ed8;
    --bg-main: #f8fafc;
    --card-border: #e2e8f0;
}

body {
    background-color: var(--bg-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.app-sidebar .brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar .brand i {
    color: #38bdf8;
    margin-right: 0.6rem;
    font-size: 1.5rem;
}

.app-sidebar .nav-section-title {
    padding: 1rem 1.5rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.app-sidebar .nav-link {
    color: var(--sidebar-color);
    padding: 0.65rem 1.5rem;
    display: flex;
    align-items: center;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.app-sidebar .nav-link i {
    font-size: 1.15rem;
    width: 24px;
    margin-right: 0.75rem;
    text-align: center;
}

.app-sidebar .nav-link:hover {
    color: #f1f5f9;
    background-color: rgba(255, 255, 255, 0.04);
}

.app-sidebar .nav-link.active {
    color: #ffffff;
    background-color: var(--sidebar-active-bg);
    border-left-color: #38bdf8;
}

.app-sidebar .nav-link .badge {
    margin-left: auto;
    font-size: 0.7rem;
}

/* Main Content Wrapper */
.app-main {
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Header Navbar */
.app-header {
    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid var(--card-border);
    padding: 0 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.client-switcher-btn {
    border-radius: 9999px;
    padding: 0.45rem 1rem;
    font-weight: 500;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    transition: all 0.2s;
}

.client-switcher-btn:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

/* Content Area */
.app-content {
    flex: 1;
    padding: 1.75rem;
}

/* Cards */
.card {
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 1.25rem;
    font-weight: 600;
    border-top-left-radius: 0.75rem !important;
    border-top-right-radius: 0.75rem !important;
}

/* KPI Stat Cards */
.stat-card {
    border-radius: 0.75rem;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid var(--card-border);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Badges */
.badge {
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Tables */
.table th {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 600;
    border-top: none;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

/* Form Styles */
.form-label {
    font-weight: 500;
    font-size: 0.88rem;
    color: #334155;
    margin-bottom: 0.35rem;
}

.form-control, .form-select {
    border-color: #cbd5e1;
    border-radius: 0.5rem;
    font-size: 0.92rem;
    padding: 0.55rem 0.85rem;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .app-sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    .app-sidebar.show {
        margin-left: 0;
    }
    .app-main {
        margin-left: 0;
    }
}
