/* =====================================================================
   DIGITALMART — ULTRA PRO 4K DESIGN SYSTEM (v2, full redesign)
   Same class contracts as before (no HTML/PHP text touched), completely
   reimagined visual language: bold type, blob-mesh backgrounds, squircle
   icon badges, pill buttons with neon bloom, accent-striped cards.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary: #E11D2E;
    --primary-dark: #B3121F;
    --primary-light: #FF6B6B;
    --secondary: #FFC107;
    --secondary-dark: #E6A800;
    --accent-gold: #FFC107;
    --accent-gold-dark: #E6A800;
    --accent-rose: #FF4D4D;
    --accent-cyan: #FFD966;
    --accent-green: #16A34A;
    --accent-green-dark: #0F7A37;

    --bg-light: #FFFDF9;
    --bg-dark: #3A0B12;
    --card-light: rgba(255, 255, 255, 0.85);
    --card-dark: rgba(255, 255, 255, 0.06);
    --text-light: #2A1010;
    --text-dark: #FFFDF9;
    --border-light: rgba(60, 15, 15, 0.10);
    --border-dark: rgba(255, 255, 255, 0.12);

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --radius-pill: 999px;

    --shadow-soft: 0 12px 36px rgba(150, 20, 20, 0.10);
    --shadow-hover: 0 24px 56px rgba(225, 29, 46, 0.30);
    --glow-primary: 0 0 28px rgba(225, 29, 46, 0.5);
    --glow-emerald: 0 0 26px rgba(255, 193, 7, 0.45);
    --glow-gold: 0 0 26px rgba(255, 193, 7, 0.45);

    --gradient-aurora: linear-gradient(120deg, #E11D2E 0%, #FFFDF9 30%, #FFC107 65%, #16A34A 100%);
    --gradient-text: linear-gradient(120deg, #E11D2E 0%, #FFC107 55%, #16A34A 100%);
    --gradient-primary: linear-gradient(135deg, #E11D2E, #B3121F);
    --gradient-gold: linear-gradient(135deg, #FFC107, #E6A800);

    --font-display: 'Space Grotesk', 'Poppins', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

::selection { background: var(--primary); color: #fff; }

body {
    font-family: var(--font-body);
    background: var(--bg-light);
    color: var(--text-light);
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    position: relative;
}

/* Large blurred blob-mesh background — modern SaaS style, replaces flat gradients */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(38vw 38vw at 6% -6%, rgba(225,29,46,0.16), transparent 60%),
        radial-gradient(34vw 34vw at 100% 8%, rgba(255,193,7,0.14), transparent 60%),
        radial-gradient(40vw 40vw at 45% 105%, rgba(22,163,74,0.12), transparent 60%);
    animation: blobDrift 26s ease-in-out infinite alternate;
}
body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}
body.dark-mode::after {
    background:
        radial-gradient(1.5px 1.5px at 15% 25%, rgba(255,255,255,.55) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 80% 12%, rgba(255,255,255,.4) 50%, transparent 51%),
        radial-gradient(1px 1px at 55% 65%, rgba(255,255,255,.35) 50%, transparent 51%),
        radial-gradient(1px 1px at 30% 82%, rgba(255,255,255,.3) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 92% 55%, rgba(255,255,255,.4) 50%, transparent 51%),
        radial-gradient(42vw 42vw at 6% -6%, rgba(225,29,46,0.40), transparent 60%),
        radial-gradient(36vw 36vw at 100% 6%, rgba(255,193,7,0.24), transparent 60%),
        radial-gradient(44vw 44vw at 45% 108%, rgba(22,163,74,0.22), transparent 60%);
    background-size: 220px 220px, 260px 260px, 200px 200px, 240px 240px, 280px 280px, auto, auto, auto;
}
@keyframes blobDrift {
    0%   { transform: translate(0,0) scale(1); }
    100% { transform: translate(-2%, 2%) scale(1.05); }
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); letter-spacing: -0.02em; font-weight: 700; }

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-aurora);
    background-size: 300% 100%;
    animation: auroraSweep 8s ease-in-out infinite;
    z-index: 2000;
    pointer-events: none;
}
@keyframes auroraSweep {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ---------------------------------------------------------------------
   HEADER
   --------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0; z-index: 1000;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--border-light);
}
body.dark-mode .site-header {
    background: rgba(23, 11, 51, 0.72);
    border-color: var(--border-dark);
}

.brand-logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    padding: 6px 18px 6px 14px;
    border: 1.5px solid var(--accent-gold);
    border-radius: var(--radius-pill);
    background: rgba(255,193,7,0.08);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.brand-logo::before {
    content: "\f521";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.95rem;
    color: var(--accent-gold-dark);
    -webkit-text-fill-color: var(--accent-gold-dark);
}
.brand-logo .logo-text,
.brand-logo {
    background-image: var(--gradient-text);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.nav-link-custom {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-light);
    position: relative;
    transition: var(--transition);
}
.nav-link-custom::after {
    content: ""; position: absolute; left: 0; bottom: -5px; width: 0; height: 2px;
    background: var(--gradient-aurora); transition: width 0.3s ease; border-radius: 2px;
}
body.dark-mode .nav-link-custom { color: var(--text-dark); }
.nav-link-custom:hover { color: var(--primary); }
.nav-link-custom:hover::after { width: 100%; }

.theme-toggle-btn {
    width: 42px; height: 42px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--card-light);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
body.dark-mode .theme-toggle-btn { background: var(--card-dark); border-color: var(--border-dark); }
.theme-toggle-btn:hover { transform: rotate(20deg) scale(1.08); box-shadow: var(--glow-emerald); border-color: var(--secondary); }

/* ---------------------------------------------------------------------
   BUTTONS — pill shape, neon bloom
   --------------------------------------------------------------------- */
.btn-primary-custom {
    background: var(--gradient-primary);
    color: #fff; border: none;
    border-radius: var(--radius-pill);
    padding: 11px 28px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    transition: var(--transition);
    position: relative; overflow: hidden;
    box-shadow: 0 8px 20px rgba(225,29,46,0.28);
}
.btn-primary-custom::before {
    content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: skewX(-20deg); transition: left 0.6s ease;
}
.btn-primary-custom:hover::before { left: 130%; }
.btn-primary-custom:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(225,29,46,0.45); color: #fff; }
.btn-primary-custom:active { transform: translateY(-1px) scale(0.98); }

.btn-outline-secondary {
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--accent-gold);
    color: var(--accent-gold-dark);
    font-family: var(--font-display);
    font-weight: 700;
    padding: 10px 26px;
    background: transparent;
    transition: var(--transition);
}
.btn-outline-secondary:hover { background: var(--gradient-gold); color: #5A121B; border-color: transparent; box-shadow: var(--glow-gold); transform: translateY(-2px); }
body.dark-mode .btn-outline-secondary { color: var(--accent-gold); }

/* ---------------------------------------------------------------------
   CARDS — accent-striped, elevated
   --------------------------------------------------------------------- */
.glass-card {
    background: var(--card-light);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    animation: cardFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.glass-card::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--gradient-aurora); background-size: 250% 100%;
    opacity: 0; transition: opacity 0.3s ease;
}
body.dark-mode .glass-card { background: var(--card-dark); border-color: var(--border-dark); }
.glass-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.glass-card:hover::before { opacity: 1; }
@keyframes cardFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.row > div:nth-child(1) > .glass-card, .row > div:nth-child(1).glass-card { animation-delay: .02s; }
.row > div:nth-child(2) > .glass-card, .row > div:nth-child(2).glass-card { animation-delay: .07s; }
.row > div:nth-child(3) > .glass-card, .row > div:nth-child(3).glass-card { animation-delay: .12s; }
.row > div:nth-child(4) > .glass-card, .row > div:nth-child(4).glass-card { animation-delay: .17s; }
.row > div:nth-child(5) > .glass-card, .row > div:nth-child(5).glass-card { animation-delay: .22s; }
.row > div:nth-child(6) > .glass-card, .row > div:nth-child(6).glass-card { animation-delay: .27s; }
.row > div:nth-child(n+7) > .glass-card, .row > div:nth-child(n+7).glass-card { animation-delay: .30s; }

/* Squircle icon badges (superellipse feel via mixed radius) replacing plain circles */
.glass-card > i.fa-2x, .glass-card > a > i.fa-2x {
    width: 62px; height: 62px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
    color: #fff !important;
    font-size: 1.3rem !important;
    background: var(--gradient-primary);
    box-shadow: 0 0 22px rgba(225,29,46,0.5);
    animation: iconFloat 3.2s ease-in-out infinite;
    transition: var(--transition);
}
.col-6.col-md-3:nth-of-type(6n+1) .fa-2x { background: linear-gradient(135deg,#E11D2E,#B3121F); box-shadow: 0 0 22px rgba(225,29,46,.5); }
.col-6.col-md-3:nth-of-type(6n+2) .fa-2x { background: linear-gradient(135deg,#16A34A,#0F7A37); box-shadow: 0 0 22px rgba(22,163,74,.5); }
.col-6.col-md-3:nth-of-type(6n+3) .fa-2x { background: linear-gradient(135deg,#FFC107,#E6A800); box-shadow: 0 0 22px rgba(255,193,7,.5); }
.col-6.col-md-3:nth-of-type(6n+4) .fa-2x { background: linear-gradient(135deg,#FFFDF9,#FFE8B0); color:#B3121F !important; box-shadow: 0 0 22px rgba(255,193,7,.35); }
.col-6.col-md-3:nth-of-type(6n+5) .fa-2x { background: linear-gradient(135deg,#22C55E,#16A34A); box-shadow: 0 0 22px rgba(34,197,94,.5); }
.col-6.col-md-3:nth-of-type(6n+6) .fa-2x { background: linear-gradient(135deg,#F0323F,#E11D2E); box-shadow: 0 0 22px rgba(240,50,63,.5); }
.glass-card:hover .fa-2x { transform: scale(1.12) rotate(-8deg); border-radius: 50%; }
@keyframes iconFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------------------------------------------------------------------
   FORMS
   --------------------------------------------------------------------- */
.form-control-custom {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-light);
    padding: 12px 18px;
    background: rgba(255,255,255,0.6);
    font-family: var(--font-body);
    transition: var(--transition);
}
body.dark-mode .form-control-custom { background: rgba(255,255,255,0.10); border-color: var(--border-dark); color: #fff; }
body.dark-mode .form-control-custom::placeholder { color: rgba(255,255,255,0.6); }
.form-control-custom:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(225,29,46,0.16); outline: none; }

/* ---------------------------------------------------------------------
   AUTH PAGES
   --------------------------------------------------------------------- */
.auth-wrapper { min-height: calc(100vh - 80px); display: flex; align-items: center; justify-content: center; padding: 40px 16px; }
.auth-card { max-width: 440px; width: 100%; padding: 44px; animation: authCardIn 0.5s cubic-bezier(0.16,1,0.3,1); }
@keyframes authCardIn { from { opacity: 0; transform: translateY(16px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.auth-card h2 { margin-bottom: 6px; background-image: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.auth-card p.subtitle { color: #8a8398; margin-bottom: 28px; font-family: var(--font-body); }
.divider-text { text-align: center; color: #a89fc4; margin: 20px 0; position: relative; font-size: 0.85rem; }
.btn-google {
    width: 100%; border: 1.5px solid var(--border-light); border-radius: var(--radius-pill);
    padding: 11px; background: #fff; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 10px; transition: var(--transition);
}
.btn-google:hover { box-shadow: var(--shadow-soft); transform: translateY(-2px); }

/* ---------------------------------------------------------------------
   OFFCANVAS MENU
   --------------------------------------------------------------------- */
.premium-offcanvas { width: 84% !important; max-width: 340px; box-shadow: 0 0 70px rgba(92,33,182,0.3); background: linear-gradient(180deg, #ffffff 0%, #f7f4ff 100%); border-right: 1px solid var(--border-light); }
body.dark-mode .premium-offcanvas { background: linear-gradient(180deg, #5A121B 0%, #3A0B12 100%); border-right: 1px solid rgba(255,193,7,0.12); }

.mobile-nav-link {
    display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: var(--radius-sm);
    color: var(--text-light); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 1rem;
    opacity: 0; transform: translateX(-16px);
    transition: background 0.25s ease, transform 0.25s ease;
    animation: navItemIn 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
}
.mobile-nav-link:nth-child(1) { animation-delay: .05s; } .mobile-nav-link:nth-child(2) { animation-delay: .10s; }
.mobile-nav-link:nth-child(3) { animation-delay: .15s; } .mobile-nav-link:nth-child(4) { animation-delay: .20s; }
.mobile-nav-link:nth-child(5) { animation-delay: .25s; } .mobile-nav-link:nth-child(n+6) { animation-delay: .30s; }
@keyframes navItemIn { to { opacity: 1; transform: translateX(0); } }
.mobile-nav-link:hover { background: rgba(225,29,46,0.10); transform: translateX(4px); }
body.dark-mode .mobile-nav-link { color: var(--text-dark); }
body.dark-mode .mobile-nav-link:hover { background: rgba(225,29,46,0.18); }

.nav-icon-badge {
    width: 38px; height: 38px; border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.9rem; color: #fff; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0,0,0,0.16); transition: var(--transition);
}
.mobile-nav-link:hover .nav-icon-badge { transform: scale(1.12) rotate(-6deg); border-radius: 50%; }
.badge-indigo  { background: linear-gradient(135deg, #E11D2E, #B3121F); }
.badge-violet  { background: linear-gradient(135deg, #16A34A, #0F7A37); }
.badge-magenta { background: linear-gradient(135deg, #FF4D4D, #C81628); }
.badge-blue    { background: linear-gradient(135deg, #22C55E, #16A34A); }
.badge-teal    { background: linear-gradient(135deg, #FFC107, #E6A800); }
.badge-gold    { background: linear-gradient(135deg, #FFC107, #E6A800); }
.badge-rose    { background: linear-gradient(135deg, #FFFDF9, #FFE8B0); color: #B3121F; }
.badge-red     { background: linear-gradient(135deg, #E11D2E, #B3121F); }

.badge-gold-pill {
    background: var(--gradient-gold); color: #5A121B; font-size: 0.68rem; font-weight: 700;
    padding: 6px 14px; border-radius: var(--radius-pill); box-shadow: var(--glow-gold);
}
.sidebar-footer-note { opacity: 0.9; }

/* ---------------------------------------------------------------------
   TOASTS & SKELETONS
   --------------------------------------------------------------------- */
.toast-container-custom { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast-custom { min-width: 280px; padding: 15px 20px; border-radius: var(--radius-md); color: #fff; font-weight: 600; box-shadow: var(--shadow-soft); animation: slideIn 0.35s cubic-bezier(0.16,1,0.3,1); }
.toast-custom.success { background: linear-gradient(135deg, #FFC107, #E6A800); }
.toast-custom.error { background: linear-gradient(135deg, #FF6B6B, #E53E3E); }
.toast-custom.info { background: var(--gradient-primary); }
@keyframes slideIn { from { transform: translateX(115%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.skeleton { background: linear-gradient(90deg, #ece9fb 25%, #f6f5ff 50%, #ece9fb 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------------------------------------------------------------------
   BADGES & MISC
   --------------------------------------------------------------------- */
.animated-counter { font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; background-image: var(--gradient-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
body.dark-mode .animated-counter { filter: drop-shadow(0 0 12px rgba(225,29,46,0.5)); }
body.dark-mode small.text-muted, body.dark-mode .text-muted { color: rgba(255,255,255,0.5) !important; }

.badge-featured, .badge-trending { padding: 5px 13px; border-radius: 8px; font-weight: 700; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; box-shadow: 0 4px 14px rgba(0,0,0,0.25); z-index: 2; }
.badge-featured { background: linear-gradient(135deg, var(--accent-gold), var(--accent-rose)); }
.badge-trending { background: linear-gradient(135deg, #FFC107, #E6A800); }

h3.fw-bold + a, .d-flex.justify-content-between a.text-decoration-none {
    border: 1.5px solid var(--accent-gold); color: var(--accent-gold-dark); padding: 7px 18px;
    border-radius: var(--radius-pill); font-weight: 700; font-size: 0.85rem; transition: var(--transition);
}
h3.fw-bold + a:hover, .d-flex.justify-content-between a.text-decoration-none:hover { background: var(--accent-gold); color: #5A121B; }
body.dark-mode h3.fw-bold + a, body.dark-mode .d-flex.justify-content-between a.text-decoration-none { color: var(--accent-gold); }

main { animation: mainFadeUp 0.55s cubic-bezier(0.16,1,0.3,1); }
@keyframes mainFadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.page-content { min-height: 100vh; }

::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gradient-aurora); border-radius: 10px; }

/* =====================================================================
   HOMEPAGE HERO ILLUSTRATION — original animated vector artwork
   (device-mockup style graphic, aurora palette, floating motion)
   ===================================================================== */
.hero-section {
    position: relative;
    overflow: visible;
}
.hero-section::after {
    content: "";
    position: absolute;
    top: 50%; right: -40px;
    transform: translateY(-50%);
    width: 480px;
    height: 420px;
    max-width: 40vw;
    background-image: url('../images/hero-illustration.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    animation: heroFloat 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}
.hero-section .container { position: relative; z-index: 1; }
@keyframes heroFloat {
    0%, 100% { transform: translateY(-50%) translateX(0); }
    50%      { transform: translateY(calc(-50% - 14px)) translateX(6px); }
}
@media (max-width: 991px) {
    .hero-section::after { display: none; }
}

/* =====================================================================
   MOBILE COMPACT SIZING (user side dashboard/cards) - reduces padding
   and font sizes on small screens so more fits without heavy scrolling
   ===================================================================== */
@media (max-width: 767px) {
    .glass-card.p-4 { padding: 16px !important; }
    .glass-card.p-5 { padding: 22px !important; }
    h1.display-5, .display-5 { font-size: 1.7rem !important; }
    h2, .fs-2 { font-size: 1.3rem !important; }
    h3, .fs-3 { font-size: 1.1rem !important; }
    .animated-counter { font-size: 1.5rem; }
    .lead { font-size: 0.95rem; }
    .row.g-3, .row.g-4 { --bs-gutter-x: 0.7rem; --bs-gutter-y: 0.7rem; }
    .btn-primary-custom, .btn-outline-secondary { padding: 9px 20px; font-size: 0.85rem; }
    .hero-section::after { display: none; }
}

/* =====================================================================
   FOOTER — solid opaque background so text stays fully readable
   (previously used a translucent card background that let the fixed
   dark blob-mesh layer bleed through, washing out the text)
   ===================================================================== */
.site-footer {
    background: var(--bg-light) !important;
    background-color: #FFFDF9 !important;
    border-top: 1px solid var(--border-light);
    position: relative;
    z-index: 2;
}
body.dark-mode .site-footer {
    background: #2B0810 !important;
    background-color: #2B0810 !important;
    border-top: 1px solid var(--border-dark);
}
.site-footer, .site-footer * { opacity: 1 !important; }
.site-footer h5, .site-footer h6 { color: inherit; }
body.dark-mode .site-footer p,
body.dark-mode .site-footer a:not(.brand-logo) { color: rgba(255,255,255,0.72); }
