/* Global Styles */
:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-color: #0f172a;
    --text-secondary: #64748b;
    --danger: #ef4444;
    --success: #22c55e;
    --border-color: #e2e8f0;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
}

/* =========================================
   Login Page Styles
   ========================================= */
/* =========================================
   Login Page Styles
   ========================================= */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #e0f2fe;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(14, 165, 233, 0.2) 0%, transparent 50%);
    font-family: 'Inter', sans-serif;
}

.login-layout-container {
    width: 100%;
    max-width: 1000px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-main-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    display: flex;
    overflow: hidden;
    min-height: 550px;
}

.login-illustration-side {
    flex: 1.2;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-illustration-side img {
    max-width: 80%;
    height: auto;
    z-index: 10;
}

.login-illustration-side::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: #e0f2fe;
    border-radius: 50%;
}

.login-illustration-side::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 150px;
    height: 150px;
    background: #dcfce7;
    border-radius: 50%;
}

.login-form-side {
    flex: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header h2 {
    font-size: 1.8rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #64748b;
    margin-bottom: 2rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: all 0.2s;
}

.input-group input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #64748b;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: #0ea5e9;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-login:hover {
    background: #0284c7;
}

.signup-prompt a {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 600;
}

@media (max-width: 768px) {
    .login-main-card {
        flex-direction: column;
    }

    .login-illustration-side {
        display: none;
    }

    .login-form-side {
        padding: 2rem;
    }
}

/* =========================================
   Dashboard Layout Styles (ArchitectUI)
   ========================================= */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background-color: #f1f4f6;
    /* Light gray/blue bg */
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #fff;
    color: #495057;
    flex-shrink: 0;
    box-shadow: 7px 0 60px rgba(0, 0, 0, 0.05);
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #3f6ad8;
    /* Accent blue */
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-nav {
    padding: 1.5rem;
    flex: 1;
}

.nav-section {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #aeb4b9;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: 0.5px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #5d6771;
    text-decoration: none;
    border-radius: 0.35rem;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: #e0f3ff;
    color: #3f6ad8;
}

.sidebar-nav a .icon {
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Topbar */
.topbar {
    height: 60px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    box-shadow: 0 1px 15px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 9;
}

.search-bar input {
    background: #f1f4f6;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    width: 250px;
    outline: none;
    color: #495057;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-profile img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-info .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info .role {
    font-size: 0.75rem;
    color: #888;
}

.btn-logout {
    font-size: 1.2rem;
    text-decoration: none;
    color: #6c757d;
    transition: color 0.2s;
}

.btn-logout:hover {
    color: #ef4444;
}

/* Content Area */
.content-wrapper {
    padding: 2rem;
    background-color: #f1f4f6;
    flex: 1;
}

.page-title-area {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
}

.title-left h2 {
    font-size: 1.5rem;
    color: #343a40;
    margin-bottom: 0.25rem;
}

.title-left p {
    color: #888;
    font-size: 0.9rem;
}

.btn-success {
    background: #3ac47d;
    color: white;
    box-shadow: 0 4px 6px rgba(58, 196, 125, 0.2);
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s;
}

.btn-success:hover {
    transform: translateY(-2px);
    background: #32a86b;
}

/* Filter Bar */
.filter-bar {
    margin-bottom: 1.5rem;
}

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

.summary-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s, box-shadow 0.2s;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.summary-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.summary-content {
    display: flex;
    flex-direction: column;
}

.summary-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.summary-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Summary Cards Variants */
.summary-card.blue {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    position: relative;
    overflow: hidden;
    border: none;
}

.summary-card.blue::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
    opacity: 0.4;
    pointer-events: none;
}

.summary-card.green {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    position: relative;
    overflow: hidden;
    border: none;
}

.summary-card.green::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
    opacity: 0.4;
    pointer-events: none;
}

.summary-card.purple {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    position: relative;
    overflow: hidden;
    border: none;
}

.summary-card.purple::before {
    content: '';
    position: absolute;
    bottom: -50%;
    left: 20%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 60%);
    opacity: 0.4;
    pointer-events: none;
}


/* Card Selection Checkbox */
.card-checkbox {
    margin-right: 1rem;
    display: flex;
    align-items: center;
}

.site-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: #3b82f6;
    border-radius: 4px;
}

/* Stats Grid & Cards (Horizontal Layout) */
.stats-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: row;
    /* Horizontal layout */
    align-items: center;
    padding: 1.5rem;
    transition: box-shadow 0.2s, transform 0.2s;
    transition: all 0.2s;
}

.stat-card:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    border-color: #dee2e6;
}

.card-header {
    flex: 2;
    padding: 0;
    display: flex;
    align-items: center;
    border: none;
}

.site-icon {
    width: 48px;
    height: 48px;
    background: #e0f3ff;
    color: #3f6ad8;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    font-size: 1.4rem;
}

.site-meta h3 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    color: #343a40;
    font-weight: 600;
}

.site-meta a {
    font-size: 0.85rem;
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}

.site-meta a:hover {
    color: #3f6ad8;
}

.card-body {
    flex: 3;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    /* Spacing between metrics */
    border-left: 1px solid #f1f4f6;
    border-right: 1px solid #f1f4f6;
    margin: 0 2rem;
    height: 60px;
    /* Separator height */
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Align numbers to left */
    min-width: 120px;
}

.metric .value {
    font-size: 1.7rem;
    font-weight: 700;
    color: #3f6ad8;
    line-height: 1;
}

.metric .label {
    font-size: 0.7rem;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 0.4rem;
    font-weight: 600;
}

.metric .trend {
    font-size: 0.8rem;
    margin-top: 0.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.metric .trend.positive {
    color: #3ac47d;
}

.metric .trend.negative {
    color: #d92550;
}

.card-footer {
    flex: 1;
    padding: 0;
    background: transparent;
    border: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
}



.card-actions-icons {
    display: flex;
    gap: 0.5rem;
    padding-left: 1rem;
    border-left: 1px solid #e9ecef;
}

.btn-icon-action {
    color: #cbd5e1;
    padding: 0.4rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-icon-action:hover {
    color: #343a40;
    background: #f8f9fa;
}

.btn-icon-action[title="Elimina"]:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* Response (Mobile Stack) */
@media (max-width: 992px) {
    .stat-card {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .card-body {
        border: none;
        border-top: 1px solid #f8f9fa;
        border-bottom: 1px solid #f8f9fa;
        margin: 0;
        padding: 1.5rem 0;
        height: auto;
        justify-content: space-around;
        gap: 1rem;
    }

    .card-footer {
        justify-content: center;
        flex-direction: column-reverse;
        gap: 1rem;
    }

    .card-actions-icons {
        border-left: none;
        padding-left: 0;
        border-bottom: 1px solid #e9ecef;
        padding-bottom: 1rem;
        width: 100%;
        justify-content: center;
    }
}