/* ============================================================
   SEO Tools Portal — shared design system (Laravel version)
   Improved + fully responsive layout
   ============================================================ */
:root {
    --st-navy: #0f172a;
    --st-navy-2: #1e293b;
    --st-blue: #3b82f6;
    --st-blue-dark: #1d4ed8;
    --st-bg: #f1f5f9;
    --st-card: #ffffff;
    --st-border: #e2e8f0;
    --st-muted: #64748b;
    --st-radius: 12px;
    --st-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --sidebar-w: 260px;
}

body { background: var(--st-bg); font-size: 14px; color: #1e293b; font-family: var(--st-font); }
h1, h2, h3, h4, h5, h6 { font-weight: 700; }
a { text-decoration: none; }
code { background: #eef2f7; padding: 1px 5px; border-radius: 4px; font-size: .85em; }
hr { border-color: var(--st-border); }

/* ---------- avatars ---------- */
.avatar-circle {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: linear-gradient(135deg, var(--st-blue), var(--st-blue-dark));
    color: #fff; font-weight: 600; flex-shrink: 0; letter-spacing: .5px;
}

/* ---------- cards ---------- */
.card { border: 0; border-radius: var(--st-radius); box-shadow: 0 1px 3px rgba(15, 23, 42, .08); }
.card-header { background: #fff; border-bottom: 1px solid var(--st-border); font-weight: 700; border-radius: var(--st-radius) var(--st-radius) 0 0 !important; }
.card.pricing-hover { transition: transform .15s ease, box-shadow .15s ease; }
.card.pricing-hover:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(15, 23, 42, .14); }

/* ---------- tables ---------- */
.table td, .table th { vertical-align: middle; }
.table > :not(caption) > * > * { padding: .7rem .75rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .4px; color: var(--st-muted); background: #f8fafc; }
.table-responsive { border-radius: var(--st-radius); }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-shell { min-height: 100vh; }

/* Sidebar: fixed panel on lg+, slide-in offcanvas below lg */
.admin-sidebar {
    background: linear-gradient(180deg, var(--st-navy) 0%, var(--st-navy-2) 100%);
    color: #cbd5e1;
}
@media (min-width: 992px) {
    .admin-sidebar { position: sticky; top: 0; height: 100vh; width: var(--sidebar-w); flex-shrink: 0; }
}
.admin-sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 20px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); min-height: 64px; }
.admin-sidebar .nav-link {
    color: #cbd5e1; padding: 11px 20px; display: flex; align-items: center; gap: 11px;
    border-left: 3px solid transparent; margin: 1px 0; font-size: .92rem;
}
.admin-sidebar .nav-link i { width: 20px; text-align: center; font-size: 1rem; }
.admin-sidebar .nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-sidebar .nav-link.active { background: color-mix(in srgb, var(--st-blue) 18%, transparent); color: #fff; border-left-color: var(--st-blue); }
.admin-sidebar .nav-caption { font-size: .68rem; text-transform: uppercase; letter-spacing: 1px; color: #64748b; padding: 14px 20px 4px; }
/* Collapsible menu groups */
.admin-sidebar .nav-group-toggle { cursor: pointer; }
.admin-sidebar .nav-caret { font-size: .72rem; transition: transform .2s ease; opacity: .7; }
.admin-sidebar .nav-group-toggle[aria-expanded="true"] .nav-caret { transform: rotate(90deg); }
.admin-sidebar .nav-group-toggle[aria-expanded="true"] { color: #fff; background: rgba(255, 255, 255, .04); }
.admin-sidebar .nav-group { background: rgba(0, 0, 0, .14); }
.admin-sidebar .nav-group .nav-link { padding-left: 42px; font-size: .9rem; }
.admin-sidebar .nav-group .nav-group .nav-link { padding-left: 58px; }
.admin-sidebar .nav-group .nav-link i { font-size: .95rem; }
.admin-sidebar .sidebar-user { margin: auto 12px 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: .75rem; padding: 10px 12px; display: flex; gap: 10px; align-items: center; }
.btn-close-white-close { filter: invert(1); }

/* Customer portal top navbar — themed background (uses the same palette as the
   admin sidebar, so it follows Admin → Theme automatically). */
.site-nav {
    background: linear-gradient(90deg, var(--st-navy) 0%, var(--st-navy-2) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 2px 14px rgba(15, 23, 42, .16);
    padding-top: .55rem;
    padding-bottom: .55rem;
}
.site-nav .navbar-brand { color: #fff; font-weight: 700; letter-spacing: .2px; }
.site-nav .navbar-nav { gap: .15rem; }
.site-nav .nav-link {
    color: rgba(255, 255, 255, .72);
    font-weight: 500;
    padding: .5rem .95rem !important;
    border-radius: 999px;
    transition: color .15s ease, background-color .15s ease;
}
.site-nav .nav-link:hover, .site-nav .nav-link:focus { color: #fff; background: rgba(255, 255, 255, .08); }
.site-nav .nav-link.active { color: #fff; font-weight: 600; background: color-mix(in srgb, var(--st-blue) 30%, transparent); }
.site-nav .navbar-toggler { border-color: rgba(255, 255, 255, .25); }
.site-nav .navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .15); }
.site-nav .dropdown-toggle::after { display: none; }
.site-nav .dropdown-menu { --bs-dropdown-link-active-bg: var(--st-blue); border: 0; border-radius: var(--st-radius); box-shadow: 0 10px 30px rgba(15, 23, 42, .18); margin-top: .4rem; }
@media (max-width: 991.98px) {
    .site-nav .navbar-nav { gap: .1rem; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid rgba(255, 255, 255, .08); }
    .site-nav .dropdown { margin-top: .5rem; }
}

.admin-topbar {
    background: #fff; border-bottom: 1px solid var(--st-border);
    min-height: 64px; display: flex; align-items: center; gap: 12px;
    padding: 10px 20px; position: sticky; top: 0; z-index: 1020;
}
.admin-content { padding: 22px; }

/* stat cards */
.stat-icon { width: 48px; height: 48px; border-radius: var(--st-radius); display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.25rem; flex-shrink: 0; }
a.stat-card { display: block; color: inherit; }
a.stat-card:hover .card { box-shadow: 0 8px 20px rgba(15, 23, 42, .12); }

/* scrollable tab bar on small screens */
.nav-scroll { display: flex; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: thin; }
.nav-scroll .nav-link { white-space: nowrap; }

/* Customer service cards — product-style: image on top, name / package / price + button */
.service-card { overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.service-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(15, 23, 42, .12); }
.service-media {
    position: relative;
    height: 180px;
    display: flex; align-items: center; justify-content: center;
    padding: 18px;
    background: radial-gradient(120% 120% at 50% 0%, #ffffff 0%, #eef2f7 100%);
    border-bottom: 1px solid var(--st-border);
}
.service-media-img { max-width: 82%; max-height: 144px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(15, 23, 42, .14)); }
.service-media .avatar-circle { width: 96px !important; height: 96px !important; border-radius: 22px; font-size: 34px; }
.service-media-badge {
    position: absolute; top: 12px; right: 12px;
    width: 38px; height: 38px; border-radius: 50%;
    background: #fff; color: var(--st-blue); font-size: 1.05rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .16);
}
.service-price { font-size: 1.25rem; font-weight: 800; color: var(--st-navy); line-height: 1; }

/* Homepage "Our Services" — modern card grid */
.home-services .eyebrow {
    display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: 1.6px;
    text-transform: uppercase; color: var(--st-blue);
    background: color-mix(in srgb, var(--st-blue) 10%, #fff);
    border: 1px solid color-mix(in srgb, var(--st-blue) 22%, transparent);
    padding: 6px 14px; border-radius: 999px;
}
.svc-card {
    display: flex; flex-direction: column; overflow: hidden;
    aspect-ratio: 1 / 1;            /* square card, as in the reference */
    background: #fff; border: 1px solid var(--st-border); border-radius: 18px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.svc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 38px rgba(15, 23, 42, .13);
    border-color: color-mix(in srgb, var(--st-blue) 42%, var(--st-border));
}
/* Stage: service logo fills the card background, brand logo pinned top-left */
.svc-stage {
    position: relative; flex: 1 1 auto; min-height: 0;
    display: flex; align-items: center; justify-content: center; padding: 14px;
    background: #fff;
}
.svc-brand { position: absolute; top: 12px; left: 14px; height: 22px; width: auto; max-width: 48%; object-fit: contain; z-index: 1; }
.svc-logo { max-width: 92%; max-height: 92%; width: auto; height: auto; object-fit: contain; transition: transform .25s ease; }
.svc-card:hover .svc-logo { transform: scale(1.04); }
.svc-initial { font-size: 3.4rem; font-weight: 800; color: color-mix(in srgb, var(--st-blue) 55%, #ffffff); }
/* Footer: name + package note (left), price (right) */
.svc-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 16px; border-top: 1px solid var(--st-border);
}
.svc-foot-info { min-width: 0; }
.svc-name {
    font-size: 1rem; font-weight: 800; color: var(--st-navy); margin: 0;
    text-transform: uppercase; letter-spacing: .3px; line-height: 1.15;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.svc-pkg { font-size: .72rem; color: var(--st-muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.svc-price { font-size: 1.3rem; font-weight: 800; color: var(--st-blue-dark); white-space: nowrap; }
.svc-access { white-space: nowrap; flex-shrink: 0; }
.svc-tag {
    display: inline-block; font-size: .72rem; font-weight: 600; color: var(--st-muted);
    background: var(--st-bg); border: 1px solid var(--st-border); padding: 3px 10px; border-radius: 999px;
}
/* Locked (no access) service cards */
.svc-locked .svc-logo, .svc-locked .svc-initial { filter: grayscale(.45) opacity(.6); }
.svc-lock {
    position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 50%;
    background: rgba(15, 23, 42, .08); color: var(--st-muted);
    display: flex; align-items: center; justify-content: center; font-size: .85rem;
}
@media (max-width: 575.98px) {
    .svc-stage { min-height: 120px; padding: 18px 16px; }
    .svc-logo { max-height: 72px; }
    .svc-name { font-size: .9rem; }
    .svc-price { font-size: 1.1rem; }
}

/* reveal credential boxes */
.cred-box { background: #f8fafc; border: 1px dashed var(--st-border); border-radius: .6rem; }

/* chat bubbles */
.chat-admin { background: color-mix(in srgb, var(--st-blue) 16%, white); border-radius: 1rem 1rem 1rem .25rem; }
.chat-customer { background: #f1f5f9; border: 1px solid var(--st-border); border-radius: 1rem 1rem .25rem 1rem; }

/* ============================================================
   PUBLIC SITE
   ============================================================ */
/* ============ microsoft-style flat header ============ */
.ms-header { position: sticky; top: 0; z-index: 1040; background: #fff; border-bottom: 1px solid #ebebeb; }
.ms-header-in { height: 54px; display: flex; align-items: center; gap: 6px; }
.ms-brand { display: flex; align-items: center; gap: 8px; color: #262626; font-weight: 700; font-size: 1.05rem; margin-right: 10px; white-space: nowrap; }
.ms-links { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; gap: 2px; }
.ms-link {
    display: inline-block; color: #262626; font-size: .9rem; font-weight: 500;
    padding: 6px 12px; border-radius: 4px; transition: color .15s ease;
}
.ms-link:hover { color: #000; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.ms-link.active { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.ms-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ms-signin { display: inline-flex; align-items: center; color: #262626; font-size: .9rem; font-weight: 500; padding: 6px 10px; border-radius: 4px; }
.ms-signin:hover { color: #000; text-decoration: underline; text-underline-offset: 4px; }
.ms-cta { display: inline-flex; align-items: center; background: var(--st-navy); color: #fff; font-size: .88rem; font-weight: 600; padding: 7px 18px; border-radius: 4px; transition: background .2s ease; }
.ms-cta:hover { background: var(--st-blue-dark); color: #fff; }
.ms-user { display: flex; align-items: center; gap: 8px; color: #262626; font-size: .88rem; font-weight: 600; padding: 4px 8px; border-radius: 4px; }
.ms-user:hover { background: #f5f5f5; }
.ms-burger { display: none; width: 40px; height: 40px; border: 0; background: transparent; color: #262626; font-size: 1.35rem; border-radius: 4px; align-items: center; justify-content: center; }
.ms-burger:hover { background: #f5f5f5; }

/* slide-in drawer */
.ms-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1050; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s; }
.ms-drawer {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(400px, 88vw); z-index: 1055;
    background: #fff; box-shadow: 0 0 24px rgba(0,0,0,.18);
    transform: translateX(-102%); transition: transform .28s ease;
    display: flex; flex-direction: column; overflow-y: auto;
}
body.ms-drawer-open .ms-backdrop { opacity: 1; visibility: visible; }
body.ms-drawer-open .ms-drawer { transform: none; }
body.ms-drawer-open { overflow: hidden; }
.msd-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid #f2f2f2; }
.msd-head .ms-brand { margin: 0; }
.msd-close { width: 38px; height: 38px; border: 0; background: transparent; color: #262626; font-size: 1.1rem; border-radius: 4px; }
.msd-close:hover { background: #f5f5f5; }
.msd-links { list-style: none; margin: 10px 0 0; padding: 0 18px; flex: 1; }
.msd-links a {
    display: flex; align-items: center; justify-content: space-between;
    color: #262626; font-size: .98rem; font-weight: 600; padding: 13px 6px;
    border-bottom: 1px solid #f2f2f2;
}
.msd-links a i { color: #616161; font-size: .85rem; }
.msd-links a:hover, .msd-links a.active { color: var(--st-blue); }
.msd-actions { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.msd-actions .ms-cta { justify-content: center; }
.ms-signin-btn { display: flex; align-items: center; justify-content: center; border: 1px solid #8a8a8a; color: #262626; padding: 9px 16px; border-radius: 4px; font-weight: 600; font-size: .92rem; }
.ms-signin-btn:hover { background: #f5f5f5; }
@media (max-width: 991.98px) { .ms-burger { display: inline-flex; } }

/* ============ PUBLIC SITE ============ */
.site-footer { background: var(--st-navy); color: #94a3b8; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.hero {
    background:
        radial-gradient(1000px 400px at 85% -10%, color-mix(in srgb, var(--st-blue) 45%, transparent), transparent 60%),
        linear-gradient(135deg, var(--st-navy) 0%, var(--st-blue-dark) 55%, var(--st-blue) 120%);
    color: #fff;
}
.hero .carousel-item .img-fluid { max-height: 380px; object-fit: cover; }
.hero .carousel-indicators [data-bs-target] { width: 26px; height: 4px; border-radius: 2px; }
@media (max-width: 991.98px) { .hero .carousel-item .img-fluid { max-height: 240px; } }
.feature-icon { width: 58px; height: 58px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem; background: color-mix(in srgb, var(--st-blue) 10%, white); color: var(--st-blue-dark); }
.price-chip { display: inline-block; background: color-mix(in srgb, var(--st-blue) 10%, white); color: var(--st-blue-dark); border-radius: 20px; padding: 4px 14px; font-size: .85rem; font-weight: 600; margin: 0 4px 6px 0; }
.service-logo-wrap { width: 84px; height: 84px; border-radius: var(--st-radius); display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, color-mix(in srgb, var(--st-blue) 8%, white), color-mix(in srgb, var(--st-blue) 16%, white)); border: 1px solid color-mix(in srgb, var(--st-blue) 25%, white); transition: transform .2s ease; }
.service-card:hover .service-logo-wrap { transform: translateY(-4px) scale(1.05); box-shadow: 0 10px 22px color-mix(in srgb, var(--st-blue) 25%, transparent); }
.pay-card { background: #fff; border: 1px solid var(--st-border); border-radius: var(--st-radius); box-shadow: 0 1px 3px rgba(15, 23, 42, .07); transition: transform .15s ease, box-shadow .15s ease; }
.pay-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 23, 42, .12); }
.chat-admin { background: color-mix(in srgb, var(--st-blue) 16%, white); border-radius: 1rem 1rem 1rem .25rem; }
.chat-customer { background: #f1f5f9; border: 1px solid var(--st-border); border-radius: 1rem 1rem .25rem 1rem; }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; background: linear-gradient(135deg, var(--st-navy) 0%, var(--st-blue-dark) 60%, var(--st-blue) 100%); }

.blog-content p.blog-content p { margin-bottom: 1.1rem; }
/* dropdowns escape the table on desktop */
@media (min-width: 992px) { .table-responsive { overflow: visible !important; } }
/* ---------- duralux-style row action buttons ---------- */
.st-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.st-icon-btn {
    width: 30px; height: 30px; min-width: 30px; border-radius: 100%;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid #dcdee4; color: #283c50;
    cursor: pointer; transition: all .3s ease; font-size: .85rem; padding: 0;
}
.st-icon-btn:hover { background: var(--st-navy); border-color: var(--st-navy); color: #fff; }
.st-icon-btn.st-success:hover { background: #198754; border-color: #198754; }
.st-icon-btn.st-warning:hover { background: #f0ad4e; border-color: #f0ad4e; }
.st-icon-btn.st-danger:hover { background: #dc3545; border-color: #dc3545; }
.st-icon-btn.btn-sm-icon { width: 26px; height: 26px; min-width: 26px; font-size: .75rem; }
.dropdown-menu .dropdown-item { display: flex; align-items: center; font-size: .88rem; }
.dropdown-menu .dropdown-item i:first-child { width: 18px; text-align: center; }
.dropdown-item.st-danger { color: #dc3545; }
.dropdown-item.st-danger:hover { background: #dc3545; color: #fff; }

/* print (invoices) */
@media print {
    .no-print { display: none !important; }
    body { background: #fff !important; }
    .invoice-sheet { border: 0 !important; margin: 0 !important; box-shadow: none !important; }
}

/* small-screen polish */
@media (max-width: 575.98px) {
    .admin-content { padding: 14px; }
    .admin-topbar { padding: 10px 14px; }
    h1.page-title { font-size: 1.15rem; }
    .btn-group-sm .btn { padding: .35rem .5rem; }
}

/* Social share buttons */
.social-share .ss-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--st-border); background: #fff; color: var(--st-navy); display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; transition: transform .12s ease, background .12s ease, color .12s ease; cursor: pointer; }
.social-share .ss-btn:hover { transform: translateY(-2px); color: #fff; }
.social-share .ss-fb:hover { background: #1877f2; border-color: #1877f2; }
.social-share .ss-x:hover { background: #000; border-color: #000; }
.social-share .ss-in:hover { background: #0a66c2; border-color: #0a66c2; }
.social-share .ss-wa:hover { background: #25d366; border-color: #25d366; }
.social-share .ss-copy:hover { background: var(--st-blue); border-color: var(--st-blue); }
