/* =====================================================
   CreditCard BD - Main Stylesheet
   Green/Finance Theme | Mobile-First Responsive
   ===================================================== */

/* --- CSS Custom Properties --- */
:root {
    --primary: #0d6e3f;
    --primary-dark: #094d2c;
    --primary-light: #11a05c;
    --primary-bg: #e8f5ee;
    --secondary: #1a1a2e;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --text: #1f2937;
    --text-light: #6b7280;
    --text-muted: #9ca3af;
    --bg: #ffffff;
    --bg-gray: #f8f9fa;
    --bg-dark: #f3f4f6;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-bn: 'Noto Sans Bengali', 'Kalpurush', sans-serif;
    --transition: all 0.2s ease;
    --max-width: 1200px;
    --header-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-gray);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body.lang-bn { font-family: var(--font-bn), var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }
input, select, textarea, button { font: inherit; border: none; outline: none; }
table { border-collapse: collapse; width: 100%; }
td, th { padding: 8px; border: 1px solid var(--border); text-align: left; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; line-height: 1.3; color: var(--secondary); }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p { margin-bottom: 1rem; }

/* --- Utilities --- */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.fw-bold { font-weight: 700; }
.fw-medium { font-weight: 500; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.w-full { width: 100%; }
.rounded { border-radius: var(--radius); }
.overflow-hidden { overflow: hidden; }
.relative { position: relative; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
@media (min-width: 768px) { .d-md-flex { display: flex; } .d-md-block { display: block; } .d-md-none { display: none; } }
@media (min-width: 1024px) { .d-lg-flex { display: flex; } .d-lg-block { display: block; } .d-lg-none { display: none; } }

/* --- Grid System --- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Header & Navigation --- */
.header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
}
.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.logo { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; font-weight: 700; color: var(--primary); }
.logo img { height: 36px; width: auto; }
.logo span { color: var(--secondary); }
.nav { display: none; }
.nav.active { display: flex; flex-direction: column; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 16px; z-index: 999; }
.nav a { padding: 10px 16px; color: var(--text); font-weight: 500; border-radius: var(--radius-sm); }
.nav a:hover, .nav a.active { color: var(--primary); background: var(--primary-bg); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.menu-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: none; cursor: pointer; border-radius: var(--radius); }
.menu-toggle:hover { background: var(--bg-dark); }
.hamburger { width: 20px; height: 2px; background: var(--text); position: relative; transition: var(--transition); }
.hamburger::before, .hamburger::after { content: ''; position: absolute; width: 20px; height: 2px; background: var(--text); transition: var(--transition); }
.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }
.menu-toggle.active .hamburger { background: transparent; }
.menu-toggle.active .hamburger::before { transform: rotate(45deg); top: 0; }
.menu-toggle.active .hamburger::after { transform: rotate(-45deg); top: 0; }
.lang-switch { padding: 6px 12px; border-radius: var(--radius-sm); background: var(--bg-dark); color: var(--text); font-size: 0.8rem; font-weight: 600; cursor: pointer; border: 1px solid var(--border); }
.lang-switch:hover { background: var(--primary-bg); color: var(--primary); }
@media (min-width: 1024px) {
    .nav { display: flex; align-items: center; gap: 4px; }
    .menu-toggle { display: none; }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { background: #0f0f1e; color: #fff; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-sm { padding: 10px 14px; font-size: 0.8rem; min-height: 44px; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Cards --- */
.card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card-img { width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 20px; }
.card-title { font-size: 1.1rem; margin-bottom: 8px; }
.card-title a { color: var(--secondary); }
.card-title a:hover { color: var(--primary); }
.card-text { color: var(--text-light); font-size: 0.9rem; margin-bottom: 12px; }
.card-meta { display: flex; align-items: center; gap: 12px; font-size: 0.8rem; color: var(--text-muted); }
.card-badge { display: inline-block; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }

/* --- Credit Card Item --- */
.cc-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}
.cc-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.cc-card-header {
    background: #f3f4f6;
    padding: 0;
    position: relative;
    overflow: hidden;
    aspect-ratio: 86 / 54;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}
.cc-card-header.visa, .cc-card-header.mastercard, .cc-card-header.amex { background: #f3f4f6; }
.cc-card-network { position: absolute; top: 32px; right: 32px; font-size: 1rem; font-weight: 900; font-style: italic; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.55), 0 0 2px rgba(0,0,0,0.3); background: none; padding: 0; border-radius: 0; z-index: 2; }
.cc-card-name { font-size: 1rem; font-weight: 700; text-align: center; color: var(--text); padding: 0 12px; }
.cc-card-bank { font-size: 0.8rem; text-align: center; margin-top: 4px; color: var(--text-muted); }
.cc-card-img { width: 100%; height: 100%; object-fit: contain; display: block; margin: 0; filter: none; border-radius: 0; }
.cc-card-body { padding: 16px 20px; }
.cc-card-features { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.cc-card-feature { font-size: 0.8rem; color: var(--text-light); }
.cc-card-feature strong { display: block; color: var(--text); font-size: 0.85rem; }
.cc-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cc-tag { padding: 2px 8px; background: var(--primary-bg); color: var(--primary); border-radius: var(--radius-full); font-size: 0.7rem; font-weight: 600; }
.cc-card-footer { padding: 12px 20px; background: var(--bg-gray); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cc-card-footer .btn { flex: 1; text-align: center; }
.featured-badge { position: absolute; top: 18px; left: -24px; width: 90px; text-align: center; transform: rotate(-45deg); background: var(--accent); color: #fff; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 0; z-index: 3; pointer-events: none; }

/* --- Bank Cards --- */
.bank-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; transition: var(--transition); }
.bank-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.bank-card-header { height: 100px; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--bg-gray); border-bottom: 1px solid var(--border-light); }
.bank-logo { max-width: 140px; max-height: 60px; object-fit: contain; }
.bank-card-body { padding: 14px 16px; flex: 1; }
.bank-card-body h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.bank-card-body h3 a { color: var(--text); text-decoration: none; }
.bank-card-body h3 a:hover { color: var(--primary); }
.bank-card-body .text-muted { font-size: 0.8rem; margin-bottom: 8px; line-height: 1.5; }
.bank-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.bank-card-footer { padding: 10px 16px; border-top: 1px solid var(--border-light); background: var(--bg-gray); }
.bank-card-footer .btn { width: 100%; text-align: center; }

/* --- Card Grid Compare Button --- */
.cc-card-compare-row { padding: 0 20px 12px; background: var(--bg-gray); }
.cc-compare-btn { width: 100%; padding: 6px 12px; font-size: 0.78rem; font-weight: 500; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text-muted); cursor: pointer; transition: var(--transition); letter-spacing: 0.01em; }
.cc-compare-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--bg); }
.cc-compare-btn.cc-compare-added { border-color: var(--primary); color: var(--primary); background: #e8f5ec; font-weight: 600; }
.cc-compare-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Sticky Compare Bar --- */
.cc-compare-bar { position: fixed; bottom: -90px; left: 0; right: 0; background: #fff; border-top: 2px solid var(--primary); box-shadow: 0 -4px 24px rgba(0,0,0,0.13); z-index: 490; transition: bottom 0.3s cubic-bezier(0.4,0,0.2,1); padding: 12px 0; }
.cc-compare-bar.visible { bottom: 0; }
.cc-compare-bar-inner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.cc-compare-bar-info { font-size: 0.85rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.cc-compare-bar-names { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; min-width: 0; }
.cc-compare-bar-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; background: var(--bg-gray); border: 1px solid var(--border); border-radius: var(--radius-full); padding: 3px 10px 3px 12px; color: var(--text); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.cc-compare-bar-chip button { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 0.9rem; line-height: 1; padding: 0; margin-left: 2px; }
.cc-compare-bar-chip button:hover { color: var(--danger, #dc3545); }
.cc-compare-bar-actions { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 600px) {
    .cc-compare-bar-names { display: none; }
    .cc-compare-bar-inner { justify-content: space-between; }
}


/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--secondary) 100%);
    color: #fff;
    padding: 48px 0;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.05) 0%, transparent 70%);
    pointer-events: none;
}
.hero h1 { color: #fff; font-size: 1.75rem; margin-bottom: 12px; }
.hero p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 24px; max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 32px; }
.hero-stat { text-align: center; }
.hero-stat-num { font-size: 1.75rem; font-weight: 800; }
.hero-stat-label { font-size: 0.8rem; opacity: 0.8; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,0.7); background: transparent; }
.hero .btn-outline:hover { background: rgba(255,255,255,0.15); color: #fff; border-color: #fff; }
@media (min-width: 768px) {
    .hero { padding: 72px 0; }
    .hero h1 { font-size: 2.5rem; }
}

/* --- Section --- */
.section { padding: 48px 0; }
.search-section { padding: 0; }
.section-title { font-size: 1.5rem; margin-bottom: 8px; }
.section-subtitle { color: var(--text-light); margin-bottom: 32px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }

/* --- Breadcrumb --- */
.breadcrumb { padding: 12px 0; font-size: 0.85rem; }
.breadcrumb ul { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.breadcrumb li::after { content: '/'; margin-left: 8px; color: var(--text-muted); }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb li:last-child { color: var(--text-muted); }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); }

/* --- Forms --- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.875rem; color: var(--text); }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: var(--transition);
    background: var(--bg);
    color: var(--text);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,110,63,0.1); }
.form-control.error { border-color: var(--danger); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 4px; }
textarea.form-control { min-height: 100px; resize: vertical; }
select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input[type="checkbox"], .form-check input[type="radio"] { width: 18px; height: 18px; accent-color: var(--primary); }
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

/* --- Form Card (used in admin and apply pages) --- */
.form-card { background: var(--bg); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.form-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-bg); color: var(--text); }
.form-actions { display: flex; gap: 12px; align-items: center; padding-top: 8px; }
/* --- Collapsible sections (used in SEO admin form) --- */
.collapsible-section .collapsible-toggle { cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: space-between; margin-bottom: 0; }
.collapsible-section .collapsible-toggle::after { content: '▲'; font-size: 0.75rem; color: var(--text-muted); transition: transform .2s; }
.collapsible-section.is-collapsed .collapsible-toggle::after { transform: rotate(180deg); }
.collapsible-section .collapsible-content { overflow: hidden; transition: max-height .25s ease, opacity .2s ease; max-height: 2000px; opacity: 1; padding-top: 16px; }
.collapsible-section.is-collapsed .collapsible-content { max-height: 0; opacity: 0; padding-top: 0; pointer-events: none; }
.req { color: var(--danger, #dc3545); font-size: 0.85em; }
.toggle-row { display: flex; align-items: center; gap: 8px; }
.toggle-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: normal; }
.toggle-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .detail-grid { grid-template-columns: 1fr 1fr; } }
.detail-list { display: flex; flex-direction: column; gap: 0; }
.detail-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-light); font-size: 0.9rem; }
.detail-item:last-child { border-bottom: none; }
.detail-label { color: var(--text-muted); min-width: 130px; flex-shrink: 0; }
.detail-value { color: var(--text); font-weight: 500; text-align: right; }

/* --- Apply for Card Page --- */
.apply-card-summary {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.apply-card-img {
    width: 200px;
    max-width: 200px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    flex-shrink: 0;
}
.apply-card-name { font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.apply-card-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 0.875rem; color: var(--text-light); }
.apply-form-actions { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.apply-disclaimer { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }
@media (max-width: 600px) {
    .apply-card-summary { flex-direction: column; text-align: center; }
    .apply-card-img { width: 160px; max-width: 160px; }
    .apply-card-meta { justify-content: center; }
    .apply-form-actions { flex-direction: column; }
    .apply-form-actions .btn { width: 100%; text-align: center; }
}

/* --- Search & Filters --- */
.search-box {
    background: var(--bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin: 16px auto 32px;
    position: relative;
    z-index: 10;
    max-width: 800px;
}
@media (min-width: 768px) { .search-box { margin: -40px auto 0; } }
.search-input-wrap { display: flex; gap: 8px; }
.search-input-wrap .form-control { flex: 1; padding: 12px 16px; font-size: 1rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0; }
.filter-chip {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg);
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}
.filter-chip:hover, .filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --- Cards Listing Filter Bar --- */
/* Desktop: sticky horizontal bar */
.cl-filter-sticky { position: sticky; top: 64px; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border-light); box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.cl-filter-row { display: flex; align-items: center; gap: 8px; padding: 10px 0; flex-wrap: nowrap; }
.cl-filter-sel { flex: 1; min-width: 0; font-size: 0.83rem; padding: 7px 10px; height: auto; }
.cl-filter-actions { display: flex; gap: 6px; flex-shrink: 0; }
/* Mobile: hide desktop bar */
@media (max-width: 900px) { .cl-filter-sticky { display: none; } }

/* Mobile sticky toggle button */
.cl-filter-mobile-wrap { display: none; }
@media (max-width: 900px) {
    .cl-filter-mobile-wrap { display: block; position: sticky; top: 64px; z-index: 80; background: var(--bg); border-bottom: 1px solid var(--border-light); padding: 8px 0; }
    .cl-filter-mobile-inner { display: flex; align-items: center; justify-content: space-between; }
    .cl-filter-mobile-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--bg); font-size: 0.875rem; font-weight: 500; cursor: pointer; color: var(--text); transition: var(--transition); }
    .cl-filter-mobile-btn:hover { border-color: var(--primary); color: var(--primary); }
    .cl-filter-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; border-radius: var(--radius-full); background: var(--primary); color: #fff; font-size: 0.7rem; font-weight: 700; padding: 0 5px; }
    .cl-filter-count { font-size: 0.82rem; color: var(--text-muted); }
}

/* Mobile overlay */
.cl-filter-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 200; }
.cl-filter-overlay.open { display: block; }

/* Mobile bottom drawer */
.cl-filter-drawer { position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg); border-radius: var(--radius-lg) var(--radius-lg) 0 0; z-index: 300; transform: translateY(110%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); max-height: 88dvh; overflow-y: auto; }
.cl-filter-drawer.open { transform: translateY(0); }
.cl-filter-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border-light); position: sticky; top: 0; background: var(--bg); z-index: 1; }
.cl-filter-drawer-title { font-weight: 600; font-size: 1rem; }
.cl-filter-drawer-close { background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--text-muted); padding: 0 4px; }
.cl-filter-drawer-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.cl-filter-drawer-group { display: flex; flex-direction: column; gap: 5px; }
.cl-filter-drawer-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.cl-filter-drawer-foot { display: flex; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border-light); position: sticky; bottom: 0; background: var(--bg); }
.cl-filter-drawer-foot .btn { flex: 1; }


/* Results header */
.compare-results-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 24px 0 16px; }
.compare-results-header h1 { margin: 0; font-size: 1.6rem; }

/* Table wrapper */
.compare-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 16px; }
.compare-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.compare-table th, .compare-table td { border-bottom: 1px solid var(--border-light); }

/* Feature label column */
.compare-feature-col { background: var(--bg-gray); width: 160px; min-width: 130px; padding: 12px 16px; font-size: 0.875rem; vertical-align: middle; }

/* Card header cells */
.compare-card-th { padding: 0; vertical-align: top; min-width: 180px; }
.compare-th-inner { display: flex; flex-direction: column; }
.compare-th-img-wrap { height: 160px; display: flex; align-items: center; justify-content: center; padding: 0; background: transparent; overflow: hidden; }
.compare-th-img-wrap.mastercard, .compare-th-img-wrap.amex, .compare-th-img-wrap.unionpay { background: transparent; }
.compare-th-img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 0; }
.compare-th-placeholder { color: var(--text-muted); font-size: 0.85rem; font-weight: 600; text-align: center; }
.compare-th-info { padding: 12px 14px 16px; background: var(--bg); display: flex; flex-direction: column; gap: 4px; }
.compare-th-network { font-size: 0.7rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; }
.compare-th-name { font-size: 0.9rem; font-weight: 700; color: var(--text); text-decoration: none; line-height: 1.3; }
.compare-th-name:hover { color: var(--primary); }
.compare-th-bank { font-size: 0.78rem; color: var(--text-muted); }
.compare-th-apply { margin-top: 8px; align-self: center; font-size: 0.78rem; padding: 5px 12px; }
.compare-tfoot td { padding: 14px 10px; text-align: center; border-top: 2px solid var(--border); background: var(--bg-gray); }
.compare-tfoot td:first-child { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* Data cells */
.compare-table td { padding: 11px 14px; font-size: 0.875rem; vertical-align: middle; background: var(--bg); }
.compare-table tr:hover td { background: #f8fdf9; }
.compare-table tr:hover td.compare-feature-col { background: var(--bg-gray); }

/* Section header rows */
.compare-section-row td { background: var(--primary-bg) !important; color: var(--primary); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 14px; }

/* Best value highlight */
.compare-best { background: #f0fdf4 !important; }
.compare-badge-best { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: var(--radius-full); background: var(--primary); color: #fff; font-size: 0.68rem; font-weight: 700; vertical-align: middle; text-transform: uppercase; letter-spacing: 0.03em; }
.compare-free { color: var(--success); font-weight: 600; }

/* Yes / No icons */
.compare-yes { color: var(--success); font-size: 1.1rem; font-weight: 700; }
.compare-no  { color: #d1d5db; font-size: 1.1rem; }

/* Footer */
.compare-table-footer { display: flex; gap: 12px; flex-wrap: wrap; padding: 12px 0 32px; }

/* ---- Card Selector Page ---- */
.compare-selector-page { padding-bottom: 40px; }

/* Sticky bar */
.compare-selector-bar { position: sticky; top: 64px; z-index: 90; display: flex; align-items: center; justify-content: space-between; background: #fff; border: 2px solid var(--primary); border-radius: var(--radius-lg); padding: 12px 20px; margin-bottom: 20px; box-shadow: var(--shadow-md); gap: 12px; }
.compare-selector-bar span { font-size: 0.9rem; }
#compareSelectedCount { font-size: 1.1rem; color: var(--primary); }

/* ---- Compare Layout (desktop) ---- */
.compare-layout { display: flex; gap: 24px; align-items: flex-start; }
.compare-main { flex: 1; min-width: 0; isolation: isolate; }
.compare-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

/* Filter sidebar — desktop: sticky on right */
.compare-filter-sidebar { width: 256px; flex-shrink: 0; position: sticky; top: 140px; z-index: 10; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: -4px 0 16px rgba(0,0,0,0.06); }
.compare-filter-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 12px; border-bottom: 1px solid var(--border); }
.compare-filter-panel-head strong { font-size: 0.95rem; }
.compare-filter-close { display: none; background: none; border: none; font-size: 1rem; cursor: pointer; color: var(--text-muted); padding: 4px 6px; border-radius: var(--radius); transition: var(--transition); }
.compare-filter-close:hover { background: var(--bg-gray); color: var(--text); }
.compare-filter-section { padding: 14px 16px; border-bottom: 1px solid var(--border-light); }
.compare-filter-section:last-child { border-bottom: none; }
.compare-filter-title { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.compare-filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.compare-filter-sidebar .filter-chip { padding: 4px 10px; font-size: 0.78rem; border-radius: var(--radius-full); border: 1px solid var(--border); background: var(--bg-gray); color: var(--text); cursor: pointer; transition: var(--transition); }
.compare-filter-sidebar .filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.compare-filter-sidebar .filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.compare-filter-section .form-control { font-size: 0.85rem; }

/* Overlay backdrop (mobile) */
.compare-filter-overlay { display: none; }

/* Mobile toggle button */
.compare-filter-toggle-wrap { display: none; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.compare-filter-toggle-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--bg); font-size: 0.875rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.compare-filter-toggle-btn:hover { border-color: var(--primary); color: var(--primary); }
.compare-active-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-full); background: var(--primary); color: #fff; font-size: 0.68rem; font-weight: 700; display: none; align-items: center; justify-content: center; }
.compare-active-badge.visible { display: inline-flex; }
.compare-results-count { font-size: 0.85rem; color: var(--text-muted); }

/* Mobile sticky compare bar */
.compare-mobile-bar { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: var(--bg); border-top: 2px solid var(--border); padding: 12px 16px; z-index: 150; align-items: center; justify-content: space-between; box-shadow: 0 -4px 16px rgba(0,0,0,0.1); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .compare-layout { display: block; }
    .compare-selector-bar { display: none; }
    .compare-mobile-bar { display: flex; }
    .compare-selector-page { padding-bottom: 72px; }

    /* Filter toggle — sticky below navbar */
    .compare-filter-toggle-wrap { display: flex; position: sticky; top: 64px; z-index: 80; background: var(--bg); padding: 10px 0; margin-bottom: 10px; border-bottom: 1px solid var(--border-light); }

    /* Overlay */
    .compare-filter-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 299; opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
    .compare-filter-overlay.active { opacity: 1; visibility: visible; }

    /* Sidebar drawer from right */
    .compare-filter-sidebar { position: fixed; top: 0; right: 0; transform: translateX(110%); width: 300px; max-width: 88vw; height: 100dvh; overflow-y: auto; z-index: 300; border-radius: 0; border-left: 1px solid var(--border); border-right: none; border-top: none; border-bottom: none; transition: transform 0.3s cubic-bezier(0.4,0,0.2,1); }
    .compare-filter-sidebar.open { transform: translateX(0); }
    .compare-filter-close { display: flex; }
    .compare-card-grid { grid-template-columns: 1fr; }
}

/* Pagination */
.compare-pagination { margin-top: 24px; }
.compare-pag-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.compare-pag-info { font-size: 0.85rem; color: var(--text-muted); }
.compare-pag-controls { display: flex; gap: 4px; flex-wrap: wrap; }
.compare-pag-btn { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); font-size: 0.85rem; cursor: pointer; transition: var(--transition); }
.compare-pag-btn:hover:not([disabled]) { border-color: var(--primary); color: var(--primary); }
.compare-pag-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.compare-pag-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* Card option cards — horizontal layout (image left, info right) */
.compare-card-option { display: block; cursor: pointer; position: relative; }
.compare-card-option-inner { background: var(--bg); border: 2px solid var(--border); border-radius: var(--radius-lg); display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 10px 12px; transition: var(--transition); }
.compare-card-option:hover .compare-card-option-inner { border-color: var(--primary); box-shadow: var(--shadow-md); }
.compare-card-option.selected .compare-card-option-inner { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,110,63,0.15); }

/* Checkmark overlay */
.compare-option-check { position: absolute; top: 8px; right: 8px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0.6); transition: opacity 0.15s, transform 0.15s; }
.compare-card-option.selected .compare-option-check { opacity: 1; transform: scale(1); }

/* Card image area — neutral bg so actual card art is visible */
.compare-option-img { flex-shrink: 0; width: 84px; height: 54px; display: flex; align-items: center; justify-content: center; background: #f3f4f6; border-radius: 6px; border: 1px solid var(--border-light); overflow: hidden; }
.compare-option-img img { max-width: 78px; max-height: 50px; object-fit: contain; }
.compare-option-img span { color: var(--text-muted); font-size: 0.65rem; font-weight: 600; text-align: center; padding: 4px; line-height: 1.2; }

/* Card option text info */
.compare-option-info { flex: 1; min-width: 0; }
.compare-option-name { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text); line-height: 1.3; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compare-option-bank { display: block; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.compare-option-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.compare-option-network { font-size: 0.65rem; font-weight: 700; color: #fff; background: var(--primary); padding: 2px 6px; border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: 0.04em; }
.compare-option-fee  { font-size: 0.75rem; color: var(--text-muted); }
.compare-option-free { font-size: 0.75rem; color: var(--success); font-weight: 600; }

/* ---- Compare selector — large screen enhancements ---- */
@media (min-width: 1024px) {
    .compare-card-grid { gap: 16px; }
    .compare-card-option-inner { padding: 14px 18px; gap: 16px; }
    .compare-option-check { width: 26px; height: 26px; font-size: 0.85rem; top: 10px; right: 10px; }
    .compare-option-img { width: 118px; height: 76px; border-radius: 8px; }
    .compare-option-img img { max-width: 112px; max-height: 70px; }
    .compare-option-name { font-size: 0.95rem; margin-bottom: 4px; }
    .compare-option-bank { font-size: 0.82rem; margin-bottom: 8px; }
    .compare-option-network { font-size: 0.72rem; padding: 3px 9px; }
    .compare-option-fee  { font-size: 0.82rem; }
    .compare-option-free { font-size: 0.82rem; }
    .compare-results-count { font-size: 0.9rem; }
}

@media (min-width: 1400px) {
    .compare-card-grid { gap: 20px; }
    .compare-card-option-inner { padding: 18px 22px; gap: 18px; }
    .compare-option-img { width: 136px; height: 88px; }
    .compare-option-img img { max-width: 130px; max-height: 82px; }
    .compare-option-name { font-size: 1.05rem; }
    .compare-option-bank { font-size: 0.875rem; }
    .compare-option-network { font-size: 0.75rem; padding: 3px 10px; }
    .compare-option-fee,
    .compare-option-free { font-size: 0.875rem; }
}

.stars { display: flex; gap: 2px; }
.star { color: #d1d5db; font-size: 1rem; }
.star.filled { color: var(--accent); }
.star-filled { color: var(--accent); }
.rating-avg { font-weight: 700; color: var(--text); }
.star-rating { display: flex; gap: 4px; align-items: center; }
.star-btn { background: none; border: none; cursor: pointer; font-size: 1.6rem; color: #d1d5db; padding: 0 2px; line-height: 1; transition: color 0.1s; }
.star-btn.filled, .star-btn.hover { color: var(--accent); }
.review-form-wrap { border-top: 1px solid var(--border-light); padding-top: 20px; }
.review-form-wrap h3 { margin-bottom: 16px; font-size: 1rem; }

/* --- Badges --- */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; }
.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: var(--bg-dark); color: var(--text-light); }

/* --- Alerts --- */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 16px; font-size: 0.9rem; display: flex; align-items: flex-start; gap: 10px; }
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid var(--success); }
.alert-danger { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger); }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid var(--warning); }
.alert-info { background: #dbeafe; color: #1e40af; border-left: 4px solid var(--info); }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 4px; padding: 24px 0; flex-wrap: wrap; }
.page-item { display: inline-flex; }
.page-link {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text);
    background: var(--bg);
    transition: var(--transition);
    font-weight: 500;
}
.page-link:hover { background: var(--primary-bg); color: var(--primary); border-color: var(--primary); }
.page-item.active .page-link { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-item.disabled .page-link { opacity: 0.5; cursor: not-allowed; }

/* --- Blog Card --- */
.blog-card { background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; transition: var(--transition); display: block; text-decoration: none; color: var(--text); }
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--text); }
.blog-card-img { height: 200px; width: 100%; object-fit: cover; }
.blog-card-body { padding: 20px; }
.blog-card-category { font-size: 0.75rem; font-weight: 700; color: var(--primary); text-transform: uppercase; margin-bottom: 6px; display: inline-block; }
.blog-card-title { font-size: 1.05rem; margin-bottom: 8px; line-height: 1.4; }
.blog-card-excerpt { color: var(--text-light); font-size: 0.875rem; margin-bottom: 12px; }
.blog-card-meta { display: flex; align-items: center; gap: 12px; font-size: 0.8rem; color: var(--text-muted); }
.blog-card-image { display: block; overflow: hidden; }
.blog-card-image img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform 0.3s ease; }
.blog-card:hover .blog-card-image img { transform: scale(1.03); }

/* --- Category Card --- */
.category-card { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: var(--bg); border-radius: var(--radius-lg); border: 2px solid var(--border); box-shadow: var(--shadow-sm); text-align: center; text-decoration: none; color: var(--text); transition: var(--transition); cursor: pointer; }
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-3px); color: var(--primary); }
.category-icon { font-size: 2rem; margin-bottom: 10px; line-height: 1; }
.category-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.category-count { font-size: 0.8rem; color: var(--text-muted); }

/* --- Sidebar --- */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget { background: var(--bg); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.sidebar-widget h3 { font-size: 1rem; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.sidebar-list li { padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { color: var(--text); font-size: 0.9rem; display: flex; justify-content: space-between; }
.sidebar-list a:hover { color: var(--primary); }
.sidebar-list .count { color: var(--text-muted); font-size: 0.8rem; }

/* --- Footer --- */
.footer { background: var(--secondary); color: #ccc; padding: 48px 0 0; }
.footer h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer a { color: #adb5bd; }
.footer a:hover { color: var(--primary-light); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px; }
.footer-about p { font-size: 0.9rem; line-height: 1.7; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { font-size: 0.9rem; }
.footer-contact li { margin-bottom: 10px; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.footer-social { display: flex; gap: 10px; margin-top: 12px; }
.footer-social a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; background: rgba(255,255,255,0.1); border-radius: var(--radius-full); color: #fff; font-size: 0.9rem; }
.footer-social a:hover { background: var(--primary); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; text-align: center; font-size: 0.85rem; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

/* --- Auth Pages --- */
.auth-page { min-height: calc(100vh - var(--header-height)); display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-box { background: var(--bg); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); padding: 24px 16px; width: 100%; max-width: 440px; }
@media (min-width: 480px) { .auth-box { padding: 40px 32px; } }
.auth-box h1 { text-align: center; margin-bottom: 8px; font-size: 1.5rem; }
.auth-box .subtitle { text-align: center; color: var(--text-light); margin-bottom: 24px; font-size: 0.9rem; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-muted); font-size: 0.85rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-footer { text-align: center; margin-top: 16px; font-size: 0.9rem; color: var(--text-light); }

/* --- User Dashboard --- */
.dashboard { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 24px 0; }
.dashboard-sidebar { background: var(--bg); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.dashboard-sidebar .user-info { text-align: center; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.dashboard-sidebar .user-avatar { width: 72px; height: 72px; border-radius: var(--radius-full); margin: 0 auto 10px; background: var(--primary-bg); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--primary); font-weight: 700; overflow: hidden; }
.dashboard-sidebar .user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.dashboard-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius); color: var(--text); font-weight: 500; font-size: 0.9rem; margin-bottom: 2px; }
.dashboard-nav a:hover, .dashboard-nav a.active { background: var(--primary-bg); color: var(--primary); }
.dashboard-content { min-width: 0; }
.stat-cards { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 24px; }
@media (min-width: 400px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
.stat-card { background: var(--bg); padding: 20px; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.stat-card-icon { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 10px; }
.stat-card-icon.green { background: var(--primary-bg); color: var(--primary); }
.stat-card-icon.blue { background: #dbeafe; color: var(--info); }
.stat-card-icon.amber { background: #fef3c7; color: var(--warning); }
.stat-card-icon.red { background: #fee2e2; color: var(--danger); }
.stat-card-num { font-size: 1.5rem; font-weight: 800; color: var(--text); }
.stat-card-label { font-size: 0.8rem; color: var(--text-muted); }
@media (min-width: 1024px) {
    .dashboard { grid-template-columns: 260px 1fr; }
    .stat-cards { grid-template-columns: repeat(4, 1fr); }
}

/* --- Admin Panel --- */
.admin-layout { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
.admin-sidebar {
    background: var(--secondary);
    color: #fff;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    z-index: 1100;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
}
.admin-sidebar.active { transform: translateX(0); }
.admin-sidebar-header { padding: 0 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 12px; }
.admin-sidebar-header .logo { color: #fff; font-size: 1.1rem; }
.admin-nav-section { padding: 8px 12px; }
.admin-nav-label { font-size: 0.7rem; text-transform: uppercase; color: rgba(255,255,255,0.4); font-weight: 700; padding: 8px 8px 4px; letter-spacing: 0.5px; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: rgba(255,255,255,0.7);
    border-radius: var(--radius);
    font-size: 0.875rem;
    margin-bottom: 1px;
    transition: var(--transition);
}
.admin-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.admin-nav a.active { background: var(--primary); color: #fff; }
.admin-nav a .nav-icon { width: 20px; text-align: center; font-size: 0.9rem; }
.admin-topbar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.admin-content { padding: 24px 20px; background: var(--bg-gray); min-height: calc(100vh - 56px); }
.admin-page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-page-header h1 { font-size: 1.35rem; }
.admin-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1050; }
@media (min-width: 1024px) {
    .admin-layout { grid-template-columns: 260px 1fr; }
    .admin-main { min-width: 0; }
    .admin-sidebar { transform: translateX(0); position: sticky; top: 0; height: 100vh; }
    .admin-overlay { display: none !important; }
}

/* --- Data Tables --- */
.data-table-wrap { background: var(--bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table-header { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-bottom: 1px solid var(--border-light); }
.data-table { width: 100%; min-width: 600px; border-collapse: collapse; }
.data-table th { background: var(--bg-gray); padding: 12px 16px; font-size: 0.8rem; text-transform: uppercase; color: var(--text-muted); font-weight: 600; text-align: left; letter-spacing: 0.5px; white-space: nowrap; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border-light); font-size: 0.875rem; vertical-align: middle; }
.data-table tr:hover td { background: var(--bg-gray); }
.data-table .actions { display: flex; gap: 6px; }
.data-table .actions a, .data-table .actions button { padding: 4px 8px; border-radius: var(--radius-sm); font-size: 0.75rem; cursor: pointer; border: none; }
.data-table .actions .edit { background: #dbeafe; color: #1e40af; }
.data-table .actions .edit:hover { background: #bfdbfe; }
.data-table .actions .delete { background: #fee2e2; color: #991b1b; }
.data-table .actions .delete:hover { background: #fecaca; }
.data-table-footer { padding: 12px 20px; border-top: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); }

/* --- Modal --- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.active { display: flex; }
.modal { background: var(--bg); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1.1rem; }
.modal-close { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-full); cursor: pointer; background: none; font-size: 1.2rem; color: var(--text-muted); }
.modal-close:hover { background: var(--bg-dark); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* --- Blog Detail --- */
.article-content { background: var(--bg); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow-sm); }
@media (min-width: 640px) { .article-content { padding: 32px; } }
.article-content h2 { margin: 24px 0 12px; font-size: 1.35rem; }
.article-content h3 { margin: 20px 0 10px; font-size: 1.15rem; }
.article-content p { margin-bottom: 16px; line-height: 1.8; }
.article-content ul, .article-content ol { margin: 12px 0 16px 24px; }
.article-content li { margin-bottom: 6px; list-style: disc; }
.article-content ol li { list-style: decimal; }
.article-content img { border-radius: var(--radius); margin: 16px 0; }
.article-content blockquote { border-left: 4px solid var(--primary); padding: 12px 20px; background: var(--primary-bg); border-radius: 0 var(--radius) var(--radius) 0; margin: 16px 0; }
.article-header { margin-bottom: 24px; }
.article-header h1 { font-size: 1.75rem; margin-bottom: 12px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text-muted); font-size: 0.875rem; }

/* --- Card Detail Page --- */
.card-detail-header {
    background: var(--bg);
    padding: 24px 0 20px;
    border-bottom: 1px solid var(--border-light);
}
.card-detail-header-info { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.card-detail-header-info > div { flex: 1; min-width: 200px; }
.card-detail-img {
    width: 300px;
    max-width: 300px;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 6px 28px rgba(0,0,0,0.18);
    flex-shrink: 0;
    display: block;
}
@media (max-width: 900px) {
    .card-detail-img { width: 240px; max-width: 240px; }
}
@media (max-width: 640px) {
    .card-detail-header-info { flex-direction: column; text-align: center; gap: 16px; }
    .card-detail-img { width: 220px; max-width: 220px; }
    .card-detail-header-info > div { min-width: unset; width: 100%; }
}
.card-detail-grid { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 24px 0; }
.card-detail-main { display: flex; flex-direction: column; gap: 24px; }
.detail-section { background: var(--bg); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.detail-section h2 { font-size: 1.15rem; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-bg); }
.detail-features li { padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 0.9rem; display: flex; align-items: flex-start; gap: 8px; }
.detail-features li::before { content: '✓'; color: var(--primary); font-weight: 700; flex-shrink: 0; }
.html-content { font-size: 0.92rem; line-height: 1.7; color: var(--text); }
.html-content p { margin-bottom: 0.75em; }
.html-content p:last-child { margin-bottom: 0; }
.html-content ul, .html-content ol { padding-left: 1.4em; margin-bottom: 0.75em; }
.html-content li { margin-bottom: 0.35em; }
.html-content h1, .html-content h2, .html-content h3, .html-content h4 { font-weight: 600; margin: 0.8em 0 0.4em; }
.html-content strong, .html-content b { font-weight: 600; }
.html-content table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 0.75em; }
.html-content table th, .html-content table td { padding: 8px 10px; border: 1px solid var(--border-light); text-align: left; }
.html-content table th { background: var(--primary-bg); font-weight: 600; }
.detail-fees-table td { padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.detail-fees-table td:first-child { font-weight: 600; width: 40%; color: var(--text); }
.detail-fees-table td:last-child { color: var(--text-light); }
@media (min-width: 1024px) { .card-detail-grid { grid-template-columns: 2fr 1fr; } }
/* Sticky sidebar on desktop */
.card-detail-sidebar { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 1024px) {
    .card-detail-sidebar { position: sticky; top: 80px; align-self: start; }
}
/* Mobile sticky Apply Now bar */
.apply-sticky-bar {
    display: none;
}
@media (max-width: 1023px) {
    .apply-sticky-bar {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        padding: 12px 16px;
        background: #fff;
        border-top: 2px solid var(--primary);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.13);
    }
    .apply-sticky-bar .btn { width: 100%; font-size: 1rem; padding: 13px; }
    .card-detail-grid { padding-bottom: 72px; }
}

/* --- Notification Badge --- */
.notification-dot { width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--danger); display: inline-block; }
.notification-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; background: var(--danger); color: #fff; border-radius: var(--radius-full); font-size: 0.65rem; font-weight: 700; padding: 0 4px; }

/* --- Dropdown --- */
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: 100%; right: 0; background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--border); min-width: 180px; padding: 6px 0; z-index: 100; }
.dropdown-menu.active { display: block; }
.dropdown-menu a { display: block; padding: 8px 14px; font-size: 0.875rem; color: var(--text); }
.dropdown-menu a:hover { background: var(--bg-gray); color: var(--primary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* --- Status Tags --- */
.status { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 600; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-reviewing { background: #dbeafe; color: #1e40af; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-active { background: #d1fae5; color: #065f46; }
.status-inactive { background: var(--bg-dark); color: var(--text-muted); }
.status-draft { background: #fef3c7; color: #92400e; }
.status-published { background: #d1fae5; color: #065f46; }

/* --- Loading Spinner --- */
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.6s linear infinite; margin: 20px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Skeleton Loading --- */
.skeleton { background: linear-gradient(90deg, var(--bg-dark) 25%, var(--border-light) 50%, var(--bg-dark) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* --- Toast Notifications --- */
.toast-container { position: fixed; top: 80px; right: 16px; z-index: 3000; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 14px 18px; display: flex; align-items: center; gap: 10px; font-size: 0.875rem; min-width: 280px; max-width: 400px; animation: slideIn 0.3s ease; border-left: 4px solid var(--primary); }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* --- Responsive Layout with Sidebar --- */
.page-layout { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 1024px) { .page-layout { grid-template-columns: 1fr 300px; } }
.page-layout.sidebar-left { direction: ltr; }
@media (min-width: 1024px) { .page-layout.sidebar-left { grid-template-columns: 300px 1fr; } }

/* --- Image Placeholder --- */
.img-placeholder { background: var(--bg-dark); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 2rem; }

/* --- Logout Button (looks like a link) --- */
.nav-logout-btn, .dropdown-logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    display: inline;
    width: 100%;
}
.nav-logout-btn { padding: 8px 0; color: var(--text); }
.dropdown-logout-btn { display: block; padding: 8px 16px; color: var(--text); font-size: 0.875rem; width: 100%; }
.dropdown-logout-btn:hover { background: var(--bg-gray); color: var(--primary); }

/* --- Ad Slots --- */
.ad-banner-wrap { padding: 8px 0; text-align: center; }
.ad-slot { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.ad-item { display: inline-block; }
.ad-image { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }
.ad-link { display: block; }
.ad-link:hover .ad-image { opacity: 0.92; }

/* --- Print Styles --- */
@media print {
    .header, .footer, .admin-sidebar, .btn, .pagination, .nav-right { display: none !important; }
    body { background: #fff; font-size: 12pt; }
    .card, .cc-card { box-shadow: none; border: 1px solid #ddd; }
}

/* --- Accessibility --- */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-gray); }
::-webkit-scrollbar-thumb { background: #c1c5cc; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a0a4ab; }
