/* Custom CSS for Meta Campaigns Dashboard */

:root {
    --primary-color: #1877f2;
    --secondary-color: #42a5f5;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --sidebar-bg: #1e2139;
    --sidebar-text: #a6a9b8;
    --sidebar-active: #2c2f48;
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --card-shadow-hover: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    color: #2c3e50;
}

/* Auth Page Styles */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: #6c757d;
    margin-bottom: 0;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .input-group-text {
    background-color: #f8f9fa;
    border-right: none;
    color: #6c757d;
}

.auth-form .form-control {
    border-left: none;
    padding-left: 0.5rem;
}

.auth-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(24, 119, 242, 0.25);
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.auth-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-link:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.auth-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    background-size: 100px 100px;
}

/* Dashboard Layout */
.dashboard-layout {
    background-color: #f5f6fa;
}

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.sidebar-brand i {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    color: var(--primary-color);
}

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

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 0;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--sidebar-active);
    color: white;
}

.sidebar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

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

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    color: white;
    font-size: 1.25rem;
}

.user-details {
    flex: 1;
}

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

.user-role {
    font-size: 0.8rem;
    color: var(--sidebar-text);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Topbar */
.topbar {
    background: white;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--card-shadow);
}

.topbar-left {
    display: flex;
    align-items: center;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

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

.date-range-picker {
    display: flex;
    align-items: center;
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 2rem;
}

/* Cards */
.summary-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    height: 100%;
}

.summary-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-2px);
}

.summary-card-body {
    padding: 1.5rem;
    display: flex;
    align-items: center;
}

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.summary-content {
    flex: 1;
}

.summary-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1;
}

.summary-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Chart Cards */
.chart-card, .table-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    height: 100%;
}

.chart-card-header, .table-card-header {
    padding: 1.5rem 1.5rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chart-title, .table-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

.chart-card-body, .table-card-body {
    padding: 1.5rem;
}

/* Table Styles */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
    padding: 1rem 0.75rem;
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #f1f3f4;
}

.campaign-info {
    min-width: 200px;
}

.campaign-name {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.9rem;
}

.campaign-account {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Badges */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
}

.badge-active {
    background-color: var(--success-color);
    color: white;
}

.badge-paused {
    background-color: var(--warning-color);
    color: var(--dark-color);
}

.badge-inactive {
    background-color: var(--danger-color);
    color: white;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar {
        padding: 1rem;
    }
    
    .page-content {
        padding: 1rem;
    }
    
    .date-range-picker {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-range-picker .form-control {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .summary-card-body {
        flex-direction: column;
        text-align: center;
    }
    
    .summary-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .chart-card-header, .table-card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .chart-actions {
        margin-top: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.summary-card, .chart-card, .table-card {
    animation: fadeIn 0.6s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

