:root {
    --primary-color: #4f46e5;
    /* Indigo */
    --primary-hover: #4338ca;
    --bg-base: #f1f5f9;
    /* Light slate */
    --bg-surface: #ffffff;
    /* White */
    --bg-card: #ffffff;
    /* White */
    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-green: #10b981;
    --border-color: #e2e8f0;
    /* Slate 200 */
}

body {
    /* background-color: var(--bg-base); */
    /* color: var(--text-main); */
    font-family: 'Lato', sans-serif;
    margin: 0;
    overflow-x: hidden;
}

/* Typography styles */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-main);
}

/* Sidebar Styling */
.sidebar {
    background-color: var(--bg-surface);
    min-height: 100vh;
    border-right: 1px solid var(--border-color);
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-item {
    margin-bottom: 0.5rem;
}

.nav-link {
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-main);
    background-color: rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary-color);
}

.nav-link i {
    font-size: 1.2rem;
}

/* Main Content Area */
.main-wrapper {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
}

/* Top Navbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    object-fit: cover;
}

/* Cards */
.glass-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* Stat Cards */
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.bg-icon-primary {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
}

.bg-icon-pink {
    background: rgba(236, 72, 153, 0.2);
    color: var(--accent-pink);
}

.bg-icon-cyan {
    background: rgba(6, 182, 212, 0.2);
    color: var(--accent-cyan);
}

.bg-icon-green {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    color: white;
    transform: scale(1.02);
}

.btn-outline-custom {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-outline-custom:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

/* Forms */
.form-control,
.form-select {
    background-color: var(--bg-base);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-base);
    border-color: var(--primary-color);
    color: var(--text-main);
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

.form-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Tables */
.table-custom {
    color: var(--text-main);
    margin-bottom: 0;
}

.table-custom th {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding: 1rem;
}

.table-custom td {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    vertical-align: middle;
}

.table-custom tr:hover td {
    background-color: var(--bg-base);
}

.badge-custom {
    padding: 0.35em 0.65em;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.badge-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.badge-ended {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Image classes */
.campaign-img-thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.campaign-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    margin: -1.5rem -1.5rem 1rem -1.5rem;
    width: calc(100% + 3rem);
}

/* Link Cards */
.link-preview-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background-color: #f4f6f9;
    transition: all 0.2s ease;
    padding: 1.25rem;
}

.link-preview-card.active-card {
    border: 1.5px solid #a78bfa;
    background-color: #f8fafc;
}

.link-preview-card:hover {
    border-color: #a78bfa;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.08);
}

.link-img-wrapper {
    position: relative;
    border-radius: 12px;
    /* overflow: hidden; */
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.link-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.platform-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.custom-input {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    border-radius: 8px;
    height: 48px;
    font-size: 0.95rem;
}

.custom-input:focus {
    background-color: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    outline: none;
}

.action-btn {
    background-color: transparent;
    border: 1px solid #e2e8f0;
    color: #4b5563;
    font-weight: 500;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    transition: all 0.2s;
    font-size: 0.85rem;
}

.action-btn:hover {
    background-color: #f1f5f9;
    color: #1e293b;
}

.pagination-custom .page-link {
    color: #4f46e5;
    border: 1px solid #e5e7eb;
    margin: 0 2px;
    border-radius: 4px;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
}

.pagination-custom .page-item.active .page-link {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: white;
}

.pagination-custom .page-item:first-child .page-link,
.pagination-custom .page-item:last-child .page-link {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }
}

/* Utilities */
.text-gradient {
    background: linear-gradient(90deg, var(--accent-cyan), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Tom Select Custom Styling */
.ts-control {
    background-color: #f3f4f6 !important;
    border: 1px solid #e5e7eb !important;
    color: #4b5563 !important;
    border-radius: 8px !important;
    min-height: 48px !important;
    font-size: 0.95rem !important;
    display: flex;
    align-items: center;
}

.ts-control>input {
    font-size: 0.95rem !important;
    color: #4b5563 !important;
}

.ts-wrapper.focus .ts-control {
    background-color: #ffffff !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1) !important;
}

.ts-dropdown {
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}
