/* Polipics Partner Portal - Modern Glassmorphism Theme */

:root {
    /* Corporate Colors */
    --color-1: #433bdb;
    --color-2: #830fea;
    --color-3: #bf1db8;
    --color-4: #e51f7e;
    --color-5: #ff1d48;
    --color-6: #ff4343;
    --color-7: #ff552e;
    --color-8: #ff9d00;

    /* Design System Map */
    --primary-gradient: linear-gradient(135deg, var(--color-1) 0%, var(--color-4) 50%, var(--color-8) 100%);
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(67, 59, 219, 0.08);
    --backdrop-blur: saturate(180%) blur(20px);

    --text-main: #1e293b;
    --text-muted: #64748b;

    /* Layout */
    --navbar-height: 72px;
}

body {
    font-family: 'Roboto', sans-serif;
    background: #f0f2f5;
    /* Animated Mesh Background */
    background-image:
        radial-gradient(at 0% 0%, rgba(67, 59, 219, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(229, 31, 126, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(131, 15, 234, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(255, 157, 0, 0.08) 0px, transparent 50%);
    min-height: 100vh;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6,
.heading-font {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* Glassmorphism Navbar (Liquid Glass Style) */
.glass-nav {
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    border-bottom: var(--glass-border);
    padding: 0.8rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--color-1);
    text-decoration: none;
}

.navbar-brand img {
    height: 40px;
}

.channel-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-1);
    border-left: 2px solid #e2e8f0;
    padding-left: 15px;
    line-height: 1.2;
    font-family: 'Poppins', sans-serif;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    color: #64748b;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    margin: 0 0.1rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-1);
    background: rgba(67, 59, 219, 0.06);
}

/* Modern Cards (Glassmorphism) */
.glass-card {
    background: white;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--glass-shadow);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass-card.h-100 {
    height: 100%;
}

/* Ensure stat cards are equal height */
.row.g-4>[class*="col-"] {
    display: flex;
}

.row.g-4>[class*="col-"]>.glass-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(67, 59, 219, 0.12);
    border-color: rgba(229, 31, 126, 0.3);
}

/* Mobile Menu */
.offcanvas-glass {
    background: #ffffff;
    backdrop-filter: none;
}

.offcanvas-body .nav-link {
    font-size: 1.1rem;
    padding: 1rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin: 0;
    border-radius: 0;
    color: var(--text-main) !important;
}

.offcanvas-body .nav-link:hover {
    background-color: rgba(67, 59, 219, 0.05);
}

/* Stat Cards */
.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.stat-icon-wrapper.primary {
    background: rgba(67, 59, 219, 0.1);
    color: var(--color-1);
}

.stat-icon-wrapper.success {
    background: rgba(52, 211, 153, 0.1);
    color: #059669;
}

.stat-icon-wrapper.warning {
    background: rgba(255, 157, 0, 0.1);
    color: var(--color-8);
}

.stat-icon-wrapper.info {
    background: linear-gradient(135deg, rgba(229, 31, 126, 0.1), rgba(255, 157, 0, 0.1));
    color: var(--color-4);
}

.stat-value {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 0.5rem;
}

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

.trend-indicator {
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 8px;
    display: block;
}

/* Buttons */
.btn-modern-primary {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 0.6rem 1.75rem;
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(229, 31, 126, 0.25);
    transition: all 0.3s;
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(229, 31, 126, 0.35);
    color: white;
}

.btn-modern-outline {
    background: transparent;
    border: 2px solid var(--color-1);
    color: var(--color-1);
    padding: 0.4rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.btn-modern-outline:hover {
    background: var(--color-1);
    color: white;
    box-shadow: 0 4px 12px rgba(67, 59, 219, 0.2);
}

.btn-logout {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-5);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.03),
        inset 0 1px 1px rgba(255, 255, 255, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-logout:hover {
    background: #fef2f2;
    border-color: var(--color-5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 29, 72, 0.15);
}

.btn-logout:hover .liquid-glass-flare {
    opacity: 0.7;
    animation: liquid-flux 5s infinite ease-in-out;
}

/* Liquid Glass Flare & Animations */
.liquid-glass-flare {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center,
            rgba(255, 255, 255, 0.9) 0%,
            rgba(255, 255, 255, 0.2) 25%,
            transparent 50%);
    filter: url(#liquid-glass-refraction) blur(2px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 1;
    transform: translate(-15%, -15%);
    transition: opacity 0.5s ease;
}

@keyframes liquid-flux {
    0% {
        transform: translate(-15%, -15%) scale(1);
        rotate: 0deg;
    }

    50% {
        transform: translate(5%, -5%) scale(1.1);
        rotate: 180deg;
    }

    100% {
        transform: translate(-15%, -15%) scale(1);
        rotate: 360deg;
    }
}

/* Badges & Tables */
.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    margin-right: 8px;
    margin-bottom: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.table-custom th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: rgba(248, 250, 252, 0.5);
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
}

.table-custom td {
    vertical-align: middle;
    padding: 1rem 1.5rem;
    color: var(--text-main);
    font-weight: 500;
}

.table-hover tbody tr:hover {
    background-color: rgba(67, 59, 219, 0.02);
}

/* Forms (Settings Page) */
.form-label {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-radius: 12px;
    padding: 0.8rem 1rem;
    border: 1px solid #e2e8f0;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 4px rgba(67, 59, 219, 0.1);
    border-color: var(--color-1);
}

/* Remove focus outline from input-group inputs to prevent disconnected look */
.input-group .form-control:focus {
    box-shadow: none;
    border-color: #e2e8f0;
    outline: none;
}

/* Apply focus style to entire input-group instead */
.input-group:focus-within {
    box-shadow: 0 0 0 4px rgba(67, 59, 219, 0.1);
}

.input-group:focus-within .form-control {
    border-color: var(--color-1);
}

.input-group:focus-within .input-group-text {
    border-color: var(--color-1);
}

.input-group-text {
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

/* Login Page Specifics */
body.login-page {
    background: linear-gradient(135deg, var(--color-1) 0%, var(--color-4) 50%, var(--color-8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 450px;
}

.login-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.5rem;
}

/* Filter Buttons - Match Bootstrap default btn-outline-secondary style (grey minimal) */
.btn-group .btn-outline-secondary {
    font-weight: 400;
    /* Thinner font as per design sample */
}

/* Ensure active state uses Bootstrap's default grey (not custom purple) */
.btn-group .btn-outline-secondary.active {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.btn-group .btn-outline-secondary.active:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

/* Ensure no transform on filter buttons */
.btn-group .btn-outline-secondary,
.btn-group .btn-outline-secondary:hover,
.btn-group .btn-outline-secondary.active,
.btn-group .btn-outline-secondary.active:hover {
    transform: none !important;
}

/* Footer link hover effect */
.hover-primary:hover {
    color: var(--color-1) !important;
    transition: color 0.2s;
}