:root {
    --primary: #6C63FF;
    --primary-dark: #5548e8;
    --secondary: #FF6584;
    --dark: #1a1a2e;
    --gray: #6c757d;
    --light-bg: #f8f9ff;
    --card-shadow: 0 4px 24px rgba(108,99,255,.12);
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--light-bg);
    color: #333;
}

/* ─── Navbar ─── */
.navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary) !important;
}
.navbar-brand span { color: var(--secondary); }

/* ─── Hero ─── */
.hero {
    background: linear-gradient(135deg, #6C63FF 0%, #9B59B6 100%);
    color: #fff;
    padding: 100px 0 80px;
    text-align: center;
}
.hero h1 { font-size: 2.8rem; font-weight: 800; }
.hero p { font-size: 1.2rem; opacity: .9; }
.hero .badge-hero {
    background: rgba(255,255,255,.2);
    color: #fff;
    border-radius: 50px;
    padding: 6px 18px;
    font-size: .85rem;
    margin-bottom: 20px;
    display: inline-block;
}

/* ─── Pricing Cards ─── */
.pricing-section { padding: 80px 0; }

.pricing-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 40px 32px;
    text-align: center;
    transition: transform .25s, box-shadow .25s;
    position: relative;
    height: 100%;
}
.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(108,99,255,.2);
}
.pricing-card.popular {
    border: 2px solid var(--primary);
    transform: scale(1.04);
}
.pricing-card.popular:hover { transform: scale(1.04) translateY(-6px); }

.badge-popular {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 4px 20px;
    border-radius: 50px;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}

.pricing-card .plan-name {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray);
    margin-bottom: 12px;
}
.pricing-card .price {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
}
.pricing-card .price span { font-size: 1rem; font-weight: 400; color: var(--gray); }
.pricing-card .price small { font-size: 1.2rem; vertical-align: super; }

.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 24px 0;
    text-align: left;
}
.pricing-card ul li {
    padding: 7px 0;
    color: #444;
    font-size: .95rem;
    border-bottom: 1px solid #f0f0f0;
}
.pricing-card ul li:last-child { border-bottom: none; }
.pricing-card ul li::before {
    content: '✓';
    color: var(--primary);
    font-weight: 700;
    margin-right: 10px;
}

.btn-plan {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 36px;
    font-weight: 600;
    font-size: 1rem;
    width: 100%;
    transition: background .2s, transform .2s;
}
.btn-plan:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
}
.btn-plan-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}
.btn-plan-outline:hover {
    background: var(--primary);
    color: #fff;
}

/* ─── Auth Forms ─── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #6C63FF 0%, #9B59B6 100%);
    padding: 40px 0;
}
.auth-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
    padding: 40px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}
.auth-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 6px;
}
.auth-card .subtitle { color: var(--gray); font-size: .9rem; margin-bottom: 28px; }

.form-label { font-weight: 600; font-size: .88rem; color: #444; }
.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid #e0e0e0;
    padding: 11px 14px;
    font-size: .95rem;
    transition: border-color .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,99,255,.15);
}

/* Payment method selector */
.payment-option {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    display: flex;
    align-items: center;
    gap: 14px;
}
.payment-option:hover { border-color: var(--primary); background: #f8f7ff; }
.payment-option.selected { border-color: var(--primary); background: #f0eeff; }
.payment-option .pay-icon { font-size: 2rem; }
.payment-option .pay-title { font-weight: 700; font-size: .95rem; }
.payment-option .pay-desc { font-size: .82rem; color: var(--gray); }

/* ─── Dashboard ─── */
.sidebar {
    width: 260px;
    background: var(--dark);
    min-height: 100vh;
    padding: 24px 0;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
}
.sidebar-brand {
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
}
.sidebar-brand span { color: var(--secondary); }
.sidebar-nav { padding: 16px 0; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: color .2s, background .2s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    color: #fff;
    background: rgba(108,99,255,.3);
}
.sidebar-nav a svg { width: 18px; height: 18px; }

.main-content {
    margin-left: 260px;
    padding: 32px;
    min-height: 100vh;
}

.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.6rem; font-weight: 800; color: var(--dark); }
.page-header p { color: var(--gray); font-size: .9rem; }

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}
.stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #9B59B6);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-label { font-size: .82rem; color: var(--gray); font-weight: 600; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--dark); }

.card {
    background: #fff;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid #f0f0f0;
    padding: 18px 24px;
    font-weight: 700;
    font-size: 1rem;
}

/* Widget code box */
.widget-code-box {
    background: #1a1a2e;
    color: #a8ff78;
    border-radius: 10px;
    padding: 16px;
    font-family: monospace;
    font-size: .85rem;
    word-break: break-all;
    position: relative;
}
.copy-btn {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: .78rem;
    cursor: pointer;
}

/* Instagram grid */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.ig-post {
    aspect-ratio: 1;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.ig-post img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.ig-post:hover img { transform: scale(1.05); }
.ig-post .overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.4);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .3s;
    color: #fff; font-size: .85rem;
}
.ig-post:hover .overlay { opacity: 1; }

/* ─── Status badges ─── */
.badge-pending  { background: #fff3cd; color: #856404; padding: 4px 10px; border-radius: 50px; font-size: .78rem; }
.badge-active   { background: #d1e7dd; color: #0f5132; padding: 4px 10px; border-radius: 50px; font-size: .78rem; }
.badge-rejected { background: #f8d7da; color: #842029; padding: 4px 10px; border-radius: 50px; font-size: .78rem; }

/* ─── Alert flash ─── */
.flash-alert,
.alert {
    border-radius: 10px !important;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: .9rem;
    border: 1px solid transparent;
    display: block;
}

/* Success */
.flash-alert.alert-success,
.alert.alert-success,
.alert-success {
    background-color: #d1e7dd !important;
    color: #0f5132 !important;
    border-color: #a3cfbb !important;
}

/* Danger / Error */
.flash-alert.alert-danger,
.alert.alert-danger,
.alert-danger {
    background-color: #f8d7da !important;
    color: #842029 !important;
    border-color: #f1aeb5 !important;
}

/* Warning */
.flash-alert.alert-warning,
.alert.alert-warning,
.alert-warning {
    background-color: #fff3cd !important;
    color: #664d03 !important;
    border-color: #ffe69c !important;
}

/* Info */
.flash-alert.alert-info,
.alert.alert-info,
.alert-info {
    background-color: #cff4fc !important;
    color: #055160 !important;
    border-color: #9eeaf9 !important;
}

/* ─── Pending page ─── */
.pending-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: var(--light-bg);
}

/* ─── Mobile Top Bar ─── */
.mobile-topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 56px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    z-index: 200;
}

.hamburger-btn {
    background: var(--primary);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    justify-content: center;
    align-items: center;
}
.hamburger-btn span {
    display: block;
    width: 22px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: all .3s;
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
}
.sidebar-overlay.active { display: block; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .3s;
        z-index: 100;
        top: 0;
    }
    .sidebar.open { transform: translateX(0); }
    .main-content {
        margin-left: 0;
        padding: 76px 16px 20px;
    }
    .hero h1 { font-size: 1.9rem; }
    .pricing-card.popular { transform: scale(1); }
    .ig-grid { grid-template-columns: repeat(2, 1fr); }

    /* Widget kodu — mobilde kod metnini gizle, sadece buton göster */
    .widget-code-text { display: none; }
    .widget-copy-btn {
        position: static !important;
        transform: none !important;
        width: 100%;
        text-align: center;
        padding: 8px 0 !important;
        font-size: .85rem !important;
    }
    .widget-code-wrap {
        background: transparent !important;
        padding: 0 !important;
        border-radius: 8px !important;
    }
}
