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

:root {
    --primary-color: #032b5c;
    --secondary-color: #F3F7FA;
    --text-color: #032b5c;
    --accent-color: #51b036;
    --accent-color-two: #fc6c02;
    --white-color: #FFFFFF;
    --divider-color: rgba(3, 43, 92, 0.1);
    --dark-divider-color: rgba(255, 255, 255, 0.15);
    --error-color: #ef4444;
    --default-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --heading-font: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;

    /* Semantic mappings */
    --bg-primary: var(--secondary-color);
    --bg-card: var(--white-color);
    --bg-card-hover: rgba(81, 176, 54, 0.04);
    --border-color: var(--divider-color);
    --text-main: #2b303a;
    --text-secondary: #6c757d;
    --success: var(--accent-color);
    --warning: var(--accent-color-two);
    --danger: var(--error-color);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(at 10% 10%, rgba(3, 43, 92, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(81, 176, 54, 0.05) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    font-family: var(--default-font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(81, 176, 54, 0.15);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Header & Navigation */
header {
    background: var(--primary-color);
    border-bottom: 1px solid var(--dark-divider-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    background: linear-gradient(135deg, var(--white-color), var(--accent-color-two));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--white-color);
    background: rgba(255, 255, 255, 0.1);
}

.user-badge {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--dark-divider-color);
    color: var(--white-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-logout {
    color: var(--error-color) !important;
}

.btn-logout:hover {
    background: rgba(230, 87, 87, 0.12) !important;
}

/* Page Layout */
main {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.page-actions {
    display: flex;
    gap: 1rem;
}

/* Cards & Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(11, 16, 48, 0.03), 0 2px 4px -1px rgba(11, 16, 48, 0.02);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 15px -3px rgba(3, 43, 92, 0.1), 0 4px 6px -2px rgba(3, 43, 92, 0.05);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
}

.stat-card.color-violet::before { background: var(--accent-color); }
.stat-card.color-cyan::before { background: var(--accent-color-two); }
.stat-card.color-success::before { background: var(--success); }
.stat-card.color-warning::before { background: var(--accent-color-two); }

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.card-container {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(11, 16, 48, 0.03);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-family: var(--default-font);
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(97, 45, 145, 0.15);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--default-font);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--white-color);
}
.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(81, 176, 54, 0.2);
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.btn-secondary {
    background: var(--white-color);
    border-color: var(--border-color);
    color: var(--text-color);
}
.btn-secondary:hover {
    background: rgba(81, 176, 54, 0.05);
    border-color: var(--accent-color);
}

.btn-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--success);
}
.btn-success:hover {
    background: var(--success);
    color: var(--white-color);
}

.btn-danger {
    background: rgba(230, 87, 87, 0.1);
    border-color: rgba(230, 87, 87, 0.2);
    color: var(--danger);
}
.btn-danger:hover {
    background: var(--danger);
    color: var(--white-color);
}

.btn-xs {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

th {
    background: rgba(3, 43, 92, 0.03);
    color: var(--text-color);
    font-weight: 700;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg-card-hover);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-active, .badge-completed, .badge-approved, .badge-paid {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-disabled, .badge-inactive, .badge-cancelled, .badge-rejected {
    background: rgba(230, 87, 87, 0.1);
    color: var(--danger);
    border: 1px solid rgba(230, 87, 87, 0.2);
}

.badge-suspended, .badge-pending, .badge-processing {
    background: rgba(213, 117, 69, 0.1);
    color: var(--accent-color-two);
    border: 1px solid rgba(213, 117, 69, 0.2);
}

.badge-expired {
    background: rgba(107, 114, 208, 0.1);
    color: #5256a0;
    border: 1px solid rgba(107, 114, 208, 0.25);
}

.badge-deleted {
    background: rgba(100, 100, 100, 0.1);
    color: #555;
    border: 1px solid rgba(100, 100, 100, 0.2);
    text-decoration: line-through;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.alert-danger {
    background: rgba(230, 87, 87, 0.1);
    border: 1px solid rgba(230, 87, 87, 0.2);
    color: var(--danger);
}

.alert-warning {
    background: rgba(213, 117, 69, 0.1);
    border: 1px solid rgba(213, 117, 69, 0.2);
    color: var(--accent-color-two);
}

/* Login Page Container */
.login-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.login-card {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 10px 25px -5px rgba(11, 16, 48, 0.1);
    text-align: center;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Tab Filter for Admin Panels */
.tab-navigation {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    overflow-x: auto;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--text-color);
    background: rgba(81, 176, 54, 0.05);
}

.tab-btn.active {
    color: var(--white-color);
    background: var(--accent-color);
}

/* QR Code & Link Container */
.share-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.qr-box {
    background: var(--white-color);
    padding: 1rem;
    border-radius: 12px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--border-color);
}

.link-copy-box {
    flex: 1;
    min-width: 250px;
}

/* Sandbox Shop Layout */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--accent-color-two);
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(213, 117, 69, 0.1);
}

.product-image {
    height: 180px;
    background: linear-gradient(135deg, rgba(97, 45, 145, 0.1), rgba(213, 117, 69, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.product-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color-two);
    margin-bottom: 1rem;
}

.checkout-sidebar {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(11, 16, 48, 0.03);
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.checkout-summary-row.total {
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--primary-color);
}

.coupon-badge {
    background: rgba(81, 176, 54, 0.05);
    border: 1px dashed var(--accent-color);
    color: var(--accent-color);
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

/* Dashboard Leaderboard */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(81, 176, 54, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.leaderboard-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(81, 176, 54, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.leaderboard-rank.rank-1 { background: var(--accent-color-two); color: var(--white-color); }
.leaderboard-rank.rank-2 { background: var(--accent-color); color: var(--white-color); }
.leaderboard-rank.rank-3 { background: rgba(11, 16, 48, 0.1); color: var(--primary-color); }

.leaderboard-name {
    flex: 1;
    margin-left: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.leaderboard-value {
    font-weight: 700;
    color: var(--accent-color-two);
}

/* Banner grids for Marketing downloads */
.banner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.banner-card {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
}

.banner-preview {
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 8px;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--white-color);
    border: 1px solid var(--divider-color);
}

/* Inline Charts */
.chart-container {
    width: 100%;
    height: 340px;
    position: relative;
    margin-top: 0.5rem;
    overflow: hidden;
}

.chart-container canvas {
    display: block;
    max-width: 100%;
}

/* Footer styling */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

footer a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
}
footer a:hover {
    color: var(--accent-color-two);
}

/* Sidebar Layout styles */
.sidebar-nav {
    width: 260px;
    height: 100vh;
    background: var(--primary-color);
    border-right: 1px solid var(--dark-divider-color);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 10010;
}

.sidebar-brand {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--dark-divider-color);
}

.sidebar-menu {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-menu a:hover {
    color: var(--white-color);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-menu a.active {
    color: var(--white-color);
    background: var(--accent-color);
    box-shadow: 0 4px 10px rgba(81, 176, 54, 0.3);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--dark-divider-color);
}

.sidebar-footer .user-badge {
    margin-bottom: 0.5rem;
    justify-content: center;
}

/* Content Wrapper & Top Bar */
.content-wrapper {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: 70px;
    background: var(--white-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    z-index: 99;
}

.content-body {
    padding: 2rem;
    margin-top: 70px; /* offset top-bar */
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Public layout wrapper (e.g. login, checkout simulator) */
.public-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    padding-top: 0; /* Handled by the hero banner top padding */
}

/* Public top bar */
.public-topbar {
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--accent-color-two) 100%);
    color: var(--white-color);
    font-size: 0.82rem;
    padding: 0.5rem 2rem;
    font-weight: 600;
}

.public-topbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-topbar a {
    color: var(--white-color);
    text-decoration: none;
}

.public-topbar a:hover {
    text-decoration: underline;
}

.public-topbar .social-links a {
    margin-left: 0.75rem;
    text-decoration: none;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
    display: inline-block;
}

.public-topbar .social-links a:hover {
    transform: scale(1.2);
}

/* Public Header navigation */
.public-header {
    background: var(--white-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(11, 16, 48, 0.02);
}

.public-header .nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.public-header .logo {
    display: flex;
    align-items: center;
}

.public-header .nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.public-header .nav-links a.nav-link-site:hover {
    color: var(--accent-color) !important;
}

/* Public Footer styles */
.public-footer {
    background: var(--primary-color);
    color: var(--white-color);
    padding-top: 3.5rem;
    border-top: 1px solid var(--dark-divider-color);
    margin-top: auto;
}

.public-footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h4 {
    color: var(--white-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-color-two);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links li a {
    color: #9fa4c4;
    text-decoration: none;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-links li a:hover {
    color: var(--white-color);
    transform: translateX(4px);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--dark-divider-color);
}

.footer-bottom-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #9fa4c4;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-container a {
    color: #9fa4c4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-container a:hover {
    color: var(--white-color);
}

/* Sidebar Toggle Burger Button */
.btn-sidebar-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}
.btn-sidebar-toggle:hover {
    background: rgba(11, 16, 48, 0.05);
}

/* Sidebar backdrop for mobile view */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 16, 48, 0.4);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE MEDIA QUERIES
   ═══════════════════════════════════════════════════════ */

/* ── Tablet / Collapsed Sidebar (≤992px) ── */
@media (max-width: 992px) {
    .sidebar-nav {
        left: -260px;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar-nav.active {
        left: 0;
    }
    .content-wrapper {
        margin-left: 0;
    }
    .top-bar {
        left: 0;
        padding: 0 1rem;
    }
    .btn-sidebar-toggle {
        display: inline-flex;
    }
    /* Stack side-by-side card layouts */
    .content-body > div[style*="display: flex"],
    .content-body > form > div[style*="display: flex"] {
        flex-direction: column !important;
    }
    /* Card containers fill full width when stacked */
    .content-body .card-container[style*="min-width"] {
        min-width: 0 !important;
        flex: 1 1 100% !important;
    }
    /* Sticky simulator card → static when stacked */
    #simulator-card[style*="sticky"],
    #simulator-card {
        position: static !important;
        top: auto !important;
    }
    /* KPI stats grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    /* Page title size */
    .page-title h1 {
        font-size: 1.6rem;
    }
    /* Notification dropdown width */
    .notification-dropdown {
        width: 320px;
        right: -60px;
    }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {
    /* Public top bar hidden */
    .public-topbar {
        display: none;
    }
    .public-header .nav-container {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    .public-header .nav-links {
        gap: 0.75rem;
    }
    main {
        padding: 1rem;
    }
    .content-body {
        padding: 1rem;
        margin-top: 70px;
    }
    .card-container {
        padding: 1rem;
        margin-bottom: 1.25rem;
    }
    /* Force all inline min-width overrides */
    .card-container[style*="min-width"],
    div[style*="min-width: 500px"],
    div[style*="min-width: 380px"] {
        min-width: 0 !important;
        width: 100% !important;
    }
    th, td {
        padding: 0.65rem 0.4rem;
        font-size: 0.78rem;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }
    .page-title h1 {
        font-size: 1.4rem;
    }
    .page-title p {
        font-size: 0.85rem;
    }
    .page-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .login-wrapper {
        padding: 1rem;
    }
    .login-card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    /* Stats grid → 2 columns */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .stat-value {
        font-size: 1.5rem;
    }
    /* Card title row */
    .card-title {
        font-size: 1.05rem;
    }
    /* Mock phone device: scale to container width */
    .mock-phone {
        width: 100%;
        max-width: 320px;
        height: 480px;
        margin: 0 auto;
    }
    /* Mock email: full width */
    .mock-email-client {
        width: 100%;
        height: 440px;
    }
    /* Notification dropdown: fixed full-width overlay on mobile */
    .notification-dropdown {
        position: fixed;
        top: 70px;
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
        transform: none;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        z-index: 9998;
    }
    /* Share container stacks */
    .share-container {
        flex-direction: column;
        gap: 1rem;
    }
    /* Footer columns stack */
    .footer-col {
        min-width: 100%;
    }
    /* Public footer */
    .public-footer-container {
        flex-direction: column;
        gap: 2rem;
        padding: 0 1rem 2rem;
    }
    /* Profile name text hide on very small topbar */
    .profile-name-text {
        display: none;
    }
    /* Floating toast: full-width at bottom */
    .floating-toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: 100%;
    }
}

/* ── Small Mobile (≤576px) ── */
@media (max-width: 576px) {
    .top-bar-left span {
        display: none !important;
    }
    #topbar-shop-link span {
        display: none !important;
    }
    #topbar-shop-link {
        padding: 0.35rem 0.6rem !important;
    }
    .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    /* Full-width buttons in page actions */
    .page-actions .btn {
        flex: 1;
        justify-content: center;
    }
    /* Stats grid single column */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    /* Reduce content body padding */
    .content-body {
        padding: 0.75rem;
    }
    /* Page title even smaller */
    .page-title h1 {
        font-size: 1.2rem;
    }
    /* Tables: tighter on tiny screens */
    th, td {
        padding: 0.5rem 0.35rem;
        font-size: 0.75rem;
    }
    /* btn-xs compact */
    .btn-xs {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
    /* Mock phone: slim to screen */
    .mock-phone {
        max-width: 100%;
        height: 420px;
        border-width: 8px;
        border-radius: 24px;
    }
    /* Sim tabs wrap */
    #sim-tab-selectors {
        flex-wrap: wrap;
    }
    .sim-tab-btn {
        flex: 1;
        text-align: center;
        padding: 0.4rem 0.5rem;
        font-size: 0.72rem;
    }
}

/* Public template header navbar V1 */
.header-v1-wrapper {
    position: fixed;
    top: 20px;
    left: 0;
    width: 100%;
    z-index: 1050;
    padding: 0 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-v1-wrapper.scrolled {
    top: 10px;
}

.header-v1 {
    background: rgba(255, 255, 255, 0.1); /* Transparent Glassmorphism */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 10px 30px;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-v1.scrolled {
    background: rgba(3, 43, 92, 0.98); /* Transition to Solid Navy on scroll */
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    padding: 6px 25px;
}

.header-v1-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.header-v1-nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.header-v1-nav-link:hover {
    color: var(--accent-color) !important; /* Green hover */
    background: rgba(255, 255, 255, 0.05);
}

.header-v1-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Primary Version 1 Pill Button (Green) */
.btn-v1-primary {
    background: var(--accent-color);
    color: var(--white-color) !important;
    border: none;
    border-radius: 50px;
    padding: 9px 22px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(81, 176, 54, 0.3);
    transition: all 0.3s ease;
}

.btn-v1-primary:hover {
    background: linear-gradient(135deg, var(--accent-color), #009688);
    box-shadow: 0 6px 20px rgba(81, 176, 54, 0.5);
    transform: translateY(-1px);
}

/* Secondary Version 1 Pill Button (White Border) */
.btn-v1-secondary {
    background: transparent;
    color: var(--white-color) !important;
    border: 2px solid var(--white-color);
    border-radius: 50px;
    padding: 7px 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-v1-secondary:hover {
    background: var(--white-color);
    color: var(--primary-color) !important;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

/* Public navbar toggler button (mobile) */
.public-navbar-toggler {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: var(--white-color);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 6px 12px;
    transition: all 0.2s ease;
}

.public-navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 992px) {
    .header-v1 {
        background: rgba(3, 43, 92, 0.96) !important; /* Solid Navy on mobile collapse */
        border-radius: 20px;
        padding: 10px 20px;
        flex-wrap: wrap;
        border: 1px solid rgba(255, 255, 255, 0.15);
    }
    
    .public-navbar-toggler {
        display: block;
    }
    
    .header-v1-nav-links {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        gap: 0.5rem;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 10px;
    }
    
    .header-v1-buttons {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        gap: 0.75rem;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 10px;
    }
    
    .header-v1-nav-links.active,
    .header-v1-buttons.active {
        display: flex;
    }
    
    .header-v1-nav-link {
        width: 100%;
        padding: 10px 0;
    }
    
    .btn-v1-primary, .btn-v1-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Public pages premium dark gradient hero section */
.public-hero-banner {
    background: linear-gradient(135deg, #032b5c 0%, #083366 100%);
    color: var(--white-color);
    padding: 130px 2rem 55px; /* space to clear floating header */
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: inset 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.public-hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(81, 176, 54, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.public-hero-banner h1 {
    font-family: var(--heading-font);
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--white-color);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.public-hero-banner p {
    font-family: var(--default-font);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .public-hero-banner {
        padding: 110px 1.5rem 40px;
    }
    
    .public-hero-banner h1 {
        font-size: 1.8rem;
    }
    
    .public-hero-banner p {
        font-size: 0.9rem;
    }
}

/* ───────────────────────────────────────────────────────
   NOTIFICATION SYSTEM STYLING
   ─────────────────────────────────────────────────────── */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-color-two);
    color: var(--white-color);
    font-size: 0.65rem;
    font-weight: 800;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white-color);
    box-shadow: 0 2px 4px rgba(252, 108, 2, 0.4);
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); box-shadow: 0 2px 8px rgba(252, 108, 2, 0.6); }
    100% { transform: scale(1); }
}

.topbar-notification-btn:hover {
    transform: scale(1.1);
}

.notification-dropdown {
    position: absolute;
    top: 42px;
    right: 0;
    width: 360px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(3, 43, 92, 0.15);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: top right;
    animation: dropdown-slide-down 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.notification-dropdown.active {
    display: flex;
}

@keyframes dropdown-slide-down {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.notification-dropdown-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown-header h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
}

.mark-all-read-btn {
    background: none;
    border: none;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-color);
    cursor: pointer;
    padding: 0;
}
.mark-all-read-btn:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

.notification-dropdown-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.notification-item {
    transition: background 0.2s ease;
}
.notification-item.unread {
    background: rgba(81, 176, 54, 0.03);
}
.notification-item:hover {
    background: rgba(3, 43, 92, 0.02);
}

.notification-dropdown-footer {
    padding: 0.85rem;
    background: var(--secondary-color);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.notification-dropdown-footer a {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}
.notification-dropdown-footer a:hover {
    text-decoration: underline;
}

/* ───────────────────────────────────────────────────────
   SIMULATOR LAYOUT VIEWS (Mock devices)
   ─────────────────────────────────────────────────────── */
.simulator-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

@media (max-width: 992px) {
    .simulator-layout-grid { grid-template-columns: 1fr; }
}

/* 1. Phone frame */
.mock-phone {
    width: 320px;
    height: 580px;
    border: 12px solid #2b303a;
    border-radius: 36px;
    background: #1e1e24;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mock-phone-header {
    height: 35px;
    background: #2b303a;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
}

.mock-phone-screen {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-size: cover;
    background-position: center;
}

/* Device screen wallpapers */
.bg-whatsapp {
    background-color: #efeae2;
    background-image: radial-gradient(#dcd8d0 1px, transparent 0), radial-gradient(#dcd8d0 1px, transparent 0);
    background-size: 16px 16px;
    background-position: 0 0, 8px 8px;
}

.bg-sms {
    background: #fff;
}

.bg-push {
    background: linear-gradient(to bottom, #1f426e, #0e1e32);
}

/* WhatsApp bubbles */
.whatsapp-bubble {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.4;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
    position: relative;
    word-break: break-word;
}
.whatsapp-bubble.received {
    background: #fff;
    align-self: flex-start;
    border-top-left-radius: 0;
}
.whatsapp-bubble.sent {
    background: #d9fdd3;
    align-self: flex-end;
    border-top-right-radius: 0;
}
.whatsapp-time {
    font-size: 0.6rem;
    color: #8696a0;
    text-align: right;
    margin-top: 3px;
}

/* SMS chat styles */
.sms-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 5px;
    word-break: break-word;
}
.sms-bubble.received {
    background: #e9e9eb;
    color: #000;
    align-self: flex-start;
}
.sms-bubble.sent {
    background: #34c759;
    color: #fff;
    align-self: flex-end;
}

/* Push notification lockscreen banner */
.push-banner {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 14px;
    padding: 12px;
    color: #000;
    display: flex;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    margin-top: 15px;
}
.push-banner-icon {
    font-size: 1.5rem;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.push-banner-body {
    flex: 1;
}
.push-banner-title {
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
}
.push-banner-desc {
    font-size: 0.75rem;
    color: #333;
    margin-top: 2px;
    line-height: 1.3;
}

/* 2. Mock Email Client Frame */
.mock-email-client {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    height: 580px;
}

.email-client-header {
    background: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 12px 12px 0 0;
}

.email-meta-row {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

.email-client-body {
    flex: 1;
    overflow-y: auto;
    background: #F3F7FA;
    padding: 10px;
}

.email-iframe-sim {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    border-radius: 8px;
}

/* Floating Toast notifications */
.floating-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
}

.floating-toast {
    background: var(--primary-color);
    color: var(--white-color);
    border-left: 5px solid var(--accent-color-two);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    display: flex;
    gap: 12px;
    transform: translateX(120%);
    animation: toast-slide-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toast-slide-in {
    to { transform: translateX(0); }
}

/* ── Dashboard KPI Grid ── */
.dash-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    .dash-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .dash-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .dash-kpi-grid { grid-template-columns: 1fr; }
}

.dash-kpi-card {
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.dash-kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px -6px rgba(11,16,48,0.12);
}

.dash-kpi-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 0 0 16px 16px;
}

.dash-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-kpi-body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dash-kpi-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
}

.dash-kpi-value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
}

.dash-kpi-sub {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.15rem;
    flex-wrap: wrap;
}

.dash-kpi-pill {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}
.pill-success { background: rgba(16,185,129,0.1); color: #10b981; }
.pill-info    { background: rgba(14,165,233,0.1); color: #0ea5e9; }
.pill-warning { background: rgba(213,117,69,0.1); color: #D57545; }
.pill-indigo  { background: rgba(99,102,241,0.1); color: #6366f1; }

/* ── Shortcut Buttons ── */
.dash-shortcut-btn {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    text-decoration: none;
    background: var(--white-color);
    transition: all 0.2s ease;
}
.dash-shortcut-btn:hover {
    border-color: var(--accent-color);
    background: rgba(97,45,145,0.03);
    transform: translateX(3px);
}
.shortcut-icon {
    width: 36px; height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}



