/*
 * OpenWrite modern visual system
 *
 * Loaded after page-specific styles so the public site and signed-in workspace
 * share one consistent visual language without changing existing behavior.
 */

:root {
    --primary-gradient: linear-gradient(135deg, #c2412d 0%, #a63b25 100%);
    --primary-color: #c2412d;
    --primary-dark: #7c2d12;
    --secondary-color: #24251f;
    --accent-color: #c88a4b;
    --success-color: #16a34a;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --bg-primary: #ffffff;
    --bg-secondary: #f7f5f0;
    --bg-tertiary: #efebe4;
    --text-primary: #24251f;
    --text-secondary: #73736a;
    --text-muted: #9b9a90;
    --border-light: #e7e2d9;
    --border-medium: #d8d1c6;
    --sidebar-width: 248px;
    --sidebar-collapsed-width: 76px;
    --header-height: 72px;
    --border-radius: 14px;
    --border-radius-sm: 10px;
    --box-shadow: 0 1px 2px rgba(47, 45, 40, 0.04), 0 8px 24px rgba(47, 45, 40, 0.04);
    --box-shadow-lg: 0 18px 50px rgba(47, 45, 40, 0.09);
    --transition: all 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    --transition-fast: all 0.16s cubic-bezier(0.2, 0.8, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text-primary);
    background: var(--bg-secondary);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
        "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.65;
    letter-spacing: -0.006em;
}

::selection {
    color: #fff;
    background: rgba(194, 65, 45, 0.86);
}

a {
    color: var(--primary-color);
    text-underline-offset: 3px;
}

:focus-visible {
    outline: 3px solid rgba(194, 65, 45, 0.26) !important;
    outline-offset: 2px;
}

.container {
    max-width: 1180px;
    padding-right: 24px;
    padding-left: 24px;
}

.gradient-text,
.header-title,
.logo span,
.navbar .logo span,
.footer h4,
.page-title {
    color: var(--text-primary);
    background: none;
    -webkit-text-fill-color: currentColor;
}

/* Public navigation */

.navbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    min-height: 72px;
    padding: 0;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(231, 226, 217, 0.9);
    box-shadow: none;
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.navbar .container {
    min-height: 72px;
}

.navbar .nav-left {
    gap: 2rem;
}

.navbar .logo,
.logo {
    gap: 10px;
    color: var(--text-primary);
    font-size: 1.18rem;
    font-weight: 760;
    letter-spacing: -0.035em;
}

.navbar .logo:hover,
.logo:hover {
    color: var(--text-primary);
    filter: none;
    transform: none;
}

.navbar .logo .logo-img,
.logo .logo-img {
    width: 30px;
    height: 30px;
}

.navbar .nav-links {
    gap: 0.25rem;
    padding-left: 0;
}

.navbar .nav-links a,
.navbar .nav-links .dropdown-toggle {
    padding: 0.55rem 0.8rem;
    color: #5f6058;
    border-radius: 9px;
    font-size: 0.9rem;
    font-weight: 560;
}

.navbar .nav-links a:hover,
.navbar .nav-links .dropdown-toggle:hover {
    color: #30322c;
    background: #f4f1eb;
    transform: none;
}

.navbar .auth-links li:last-child a {
    padding-right: 1rem;
    padding-left: 1rem;
    color: #fff;
    background: var(--primary-color);
    box-shadow: 0 5px 14px rgba(194, 65, 45, 0.2);
}

.navbar .auth-links li:last-child a:hover {
    color: #fff;
    background: #9a3412;
}

.navbar .nav-links .dropdown-menu,
.user-dropdown {
    margin-top: 0.65rem;
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 18px 45px rgba(47, 45, 40, 0.12);
}

.navbar .nav-links .dropdown-item,
.dropdown-item,
.logout-form .dropdown-item {
    margin: 0;
    padding: 0.65rem 0.75rem;
    color: #5f6058;
    border-radius: 8px;
}

.navbar .nav-links .dropdown-item:hover,
.dropdown-item:hover,
.logout-form .dropdown-item:hover {
    color: #7c2d12;
    background: #fdf1ec;
    transform: none;
}

/* Public pages */

.main-content-public {
    position: relative;
    min-height: calc(100vh - 72px);
    padding: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 2%, rgba(194, 65, 45, 0.08), transparent 27rem),
        radial-gradient(circle at 88% 5%, rgba(202, 138, 75, 0.06), transparent 24rem),
        #fff;
}

.main-content-public > .container {
    position: relative;
}

.hero-section {
    min-height: 680px;
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

.hero-section > .container {
    padding: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 2rem 0 !important;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.35rem;
    padding: 0.42rem 0.75rem;
    color: #9a3412;
    background: rgba(253, 241, 236, 0.9);
    border: 1px solid #f3d4c8;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 680;
    letter-spacing: 0.02em;
}

.hero-content h1 {
    max-width: 700px;
    color: #1f211d;
    font-size: clamp(3rem, 5.6vw, 5rem);
    line-height: 1.04;
    letter-spacing: -0.065em;
}

.hero-content h1 .gradient-text {
    color: #c2412d;
}

.hero-content .lead {
    max-width: 610px;
    color: #73736a !important;
    font-size: clamp(1.06rem, 1.7vw, 1.24rem);
    line-height: 1.75;
}

.hero-content .version-badge,
.version-badge {
    vertical-align: top;
    margin: 0.25rem 0 0 0.65rem;
    padding: 0.28rem 0.56rem;
    color: #5f6058;
    background: #fff;
    border: 1px solid #e6e1d8;
    border-radius: 999px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0;
    box-shadow: 0 3px 10px rgba(47, 45, 40, 0.05);
}

.hero-version {
    margin: -0.5rem 0 1.35rem;
}

.hero-buttons {
    justify-content: flex-start !important;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem 1.15rem;
    color: #73736a;
    font-size: 0.84rem;
    font-weight: 540;
}

.hero-trust i {
    margin-right: 0.25rem;
    color: #16a34a;
    font-size: 0.72rem;
}

.hero-image {
    position: relative;
    padding: 2rem !important;
}

.hero-distribution {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(194, 65, 45, 0.08) 0, rgba(194, 65, 45, 0.025) 33%, transparent 64%);
}

.hero-orbit-ring {
    position: absolute;
    z-index: 1;
    inset: 9%;
    border: 1px dashed rgba(194, 65, 45, 0.34);
    border-radius: 50%;
    animation: heroOrbitSpin 24s linear infinite;
}

.hero-orbit-ring::before,
.hero-orbit-ring::after {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c2412d;
    box-shadow: 0 0 0 6px rgba(194, 65, 45, 0.1);
    content: "";
}

.hero-orbit-ring::before {
    top: -4px;
    left: 50%;
}

.hero-orbit-ring::after {
    right: 8.5%;
    bottom: 19%;
    width: 5px;
    height: 5px;
    background: #e6a28f;
}

.hero-signal {
    position: absolute;
    z-index: 0;
    top: 32%;
    left: 32%;
    width: 36%;
    aspect-ratio: 1;
    border: 1px solid rgba(194, 65, 45, 0.28);
    border-radius: 50%;
    opacity: 0;
    animation: heroSignal 4.2s ease-out infinite;
}

.hero-signal.signal-two {
    animation-delay: 1.4s;
}

.hero-signal.signal-three {
    animation-delay: 2.8s;
}

.hero-md-file {
    position: absolute;
    z-index: 3;
    top: 31%;
    left: 35%;
    display: flex;
    width: 30%;
    aspect-ratio: 0.82;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(81, 71, 61, 0.16);
    border-radius: 20px;
    background: linear-gradient(145deg, #fffefd 0%, #f8f1e9 100%);
    box-shadow: 0 24px 52px rgba(67, 53, 42, 0.16), 0 0 0 8px rgba(255, 255, 255, 0.46);
    animation: heroFileBreathe 4.8s ease-in-out infinite;
}

.hero-file-fold {
    position: absolute;
    top: 0;
    right: 0;
    width: 25%;
    aspect-ratio: 1;
    border-bottom: 1px solid rgba(81, 71, 61, 0.12);
    border-left: 1px solid rgba(81, 71, 61, 0.12);
    border-bottom-left-radius: 8px;
    background: #eee4d8;
}

.hero-file-dots {
    position: absolute;
    top: 10%;
    left: 11%;
    display: flex;
    gap: 4px;
}

.hero-file-dots i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #d8c9b9;
}

.hero-md-file strong {
    color: #242621;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 830;
    letter-spacing: -0.12em;
    line-height: 1;
}

.hero-file-name {
    margin-top: 0.6rem;
    color: #7b756c;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: clamp(0.56rem, 1vw, 0.74rem);
    font-weight: 600;
}

.hero-file-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 12%;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: rgba(194, 65, 45, 0.1);
    color: #a63525;
    font-size: clamp(0.5rem, 0.9vw, 0.66rem);
    font-weight: 700;
}

.hero-platform-logo {
    position: absolute;
    z-index: 4;
    display: grid;
    width: 18%;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid rgba(85, 78, 66, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 32px rgba(61, 51, 42, 0.12), 0 0 0 6px rgba(255, 255, 255, 0.38);
    animation: heroLogoFloat 5s ease-in-out infinite;
}

.hero-platform-logo img {
    width: 58%;
    height: 58%;
    object-fit: contain;
}

.logo-juejin {
    top: 0;
    left: 41%;
}

.logo-zhihu {
    top: 27%;
    right: 2%;
    animation-delay: -1s;
}

.logo-csdn {
    right: 15%;
    bottom: 2%;
    animation-delay: -2s;
}

.logo-weixin {
    bottom: 2%;
    left: 15%;
    animation-delay: -3s;
}

.logo-toutiao {
    top: 27%;
    left: 2%;
    animation-delay: -4s;
}

@keyframes heroOrbitSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes heroSignal {
    0% {
        opacity: 0;
        transform: scale(0.72);
    }
    16% {
        opacity: 0.48;
    }
    75%,
    100% {
        opacity: 0;
        transform: scale(2.25);
    }
}

@keyframes heroFileBreathe {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}

@keyframes heroLogoFloat {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

.main-content-public section {
    position: relative;
}

.main-content-public section > .container,
.partner-banner {
    position: relative;
}

.main-content-public .display-5 {
    color: #1f211d;
    font-size: clamp(2rem, 3.8vw, 3rem);
    letter-spacing: -0.045em;
}

.feature-card,
.card {
    background: rgba(255, 255, 255, 0.96) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 16px;
    box-shadow: var(--box-shadow);
}

.feature-card {
    background: #fff !important;
}

.feature-card:hover {
    border-color: #d8cfc4 !important;
    box-shadow: 0 18px 45px rgba(47, 45, 40, 0.08) !important;
    transform: translateY(-4px);
}

.feature-icon {
    width: 58px !important;
    height: 58px !important;
    color: #c2412d;
    background: #fdf1ec !important;
    border: 1px solid #f4d8cf;
    border-radius: 15px !important;
    font-size: 1.25rem !important;
    box-shadow: none !important;
}

.feature-card:hover .feature-icon {
    color: #fff;
    background: #c2412d !important;
    transform: translateY(-2px) !important;
}

.step-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    color: #c2412d;
    background: #fbf5ef;
    border: 1px solid #ebe4da;
    border-radius: 18px;
    font-size: 1.35rem !important;
}

.step-icon i {
    color: inherit !important;
}

.step-number-inline {
    width: 22px !important;
    height: 22px !important;
    color: #c2412d !important;
    background: #fdf1ec !important;
    font-size: 0.72rem !important;
}

.platforms-list {
    gap: 0.8rem !important;
}

.platform-item {
    min-width: 106px !important;
    padding: 1.15rem 0.8rem !important;
    background: #fff !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 14px !important;
}

.platform-item:hover {
    border-color: #e7b6a5 !important;
    box-shadow: 0 12px 26px rgba(47, 45, 40, 0.07);
    transform: translateY(-4px);
}

.platform-icon-img,
.platform-icon-placeholder {
    width: 42px !important;
    height: 42px !important;
}

.platform-name {
    color: #4a4a42 !important;
    font-size: 0.82rem;
}

.partner-banner {
    padding: 2rem !important;
    background:
        radial-gradient(circle at 93% 5%, rgba(194, 65, 45, 0.12), transparent 18rem),
        #fbf7f1 !important;
    border: 1px solid #ebe1d7 !important;
    border-radius: 20px !important;
}

.partner-banner:hover {
    box-shadow: 0 18px 45px rgba(47, 45, 40, 0.07) !important;
    transform: none !important;
}

.partner-banner-icon {
    width: 56px !important;
    height: 56px !important;
    background: #c2412d !important;
    border-radius: 15px !important;
    box-shadow: 0 10px 25px rgba(194, 65, 45, 0.2) !important;
}

.partner-badge {
    color: #9a3412 !important;
    background: #fdf1ec !important;
    border-color: #f3d4c8 !important;
    border-radius: 999px !important;
}

.partner-badge-soft {
    color: #a16207 !important;
    background: #fef9c3 !important;
    border-color: #fef08a !important;
}

.partner-proof span {
    color: #5f6058 !important;
    background: #fff !important;
    border-color: #e6e1d8 !important;
}

.partner-activity-item,
.partner-activity-placeholder,
.partner-activity-skeleton {
    background: #fff !important;
    border-color: #e9e4dc !important;
}

/* Buttons and form controls */

.btn {
    min-height: 42px;
    padding: 0.68rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.2;
    box-shadow: none;
    transition: var(--transition-fast);
}

.btn:hover {
    filter: none;
    transform: translateY(-1px);
}

.btn-primary,
.btn.btn-primary,
.btn:not([class*="btn-"]) {
    color: #fff;
    background: #c2412d;
    border-color: #c2412d;
    box-shadow: 0 6px 16px rgba(194, 65, 45, 0.2);
}

.btn-primary:hover,
.btn.btn-primary:hover,
.btn:not([class*="btn-"]):hover {
    color: #fff;
    background: #9a3412;
    border-color: #9a3412;
    box-shadow: 0 8px 20px rgba(194, 65, 45, 0.25);
}

.btn-success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
    box-shadow: none;
}

.btn-success:hover {
    color: #14532d;
    background: #dcfce7;
    box-shadow: none;
}

.btn-secondary {
    color: #4a4a42;
    background: #fff;
    border-color: #dfd9cf;
    box-shadow: none;
}

.btn-secondary:hover {
    color: #24251f;
    background: #faf9f6;
    border-color: #d6d1c8;
    box-shadow: none;
}

.btn-outline-primary {
    color: #9a3412;
    background: #fff;
    border: 1px solid #e7b6a5;
}

.btn-outline-primary:hover {
    color: #7c2d12;
    background: #fdf1ec;
    border-color: #d99078;
    box-shadow: none;
}

.btn-danger {
    color: #b91c1c;
    background: #fff;
    border-color: #fecaca;
    box-shadow: none;
}

.form-container {
    max-width: 440px;
    margin: 5rem auto;
    padding: 2.4rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    box-shadow: 0 28px 70px rgba(47, 45, 40, 0.1);
}

.form-container h2 {
    color: #24251f !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    font-size: 1.65rem;
    letter-spacing: -0.035em;
}

.form-group label,
.form-label {
    margin-bottom: 0.45rem;
    color: #4a4a42;
    font-size: 0.84rem;
    font-weight: 620;
}

.form-group input,
.form-group textarea,
.form-control,
.form-select {
    min-height: 44px;
    padding: 0.72rem 0.85rem;
    color: #24251f;
    background: #fff;
    border: 1px solid #ddd7ce;
    border-radius: 10px;
    font-size: 0.92rem;
    box-shadow: inset 0 1px 1px rgba(47, 45, 40, 0.02);
}

.form-group input:focus,
.form-group textarea:focus,
.form-control:focus,
.form-select:focus {
    border-color: #d26a4d;
    box-shadow: 0 0 0 3px rgba(194, 65, 45, 0.12);
    transform: none;
}

.alert,
.form-message {
    border-width: 1px;
    border-style: solid;
    border-radius: 10px;
}

.alert-info,
.form-message.success {
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.alert-warning {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.alert-danger,
.alert-error,
.form-message.error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

/* Signed-in workspace */

.top-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border-light);
    box-shadow: none;
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
}

.header-content {
    padding: 0 1.35rem;
}

.sidebar-toggle {
    width: 38px;
    height: 38px;
    padding: 0;
    color: #73736a;
    border: 1px solid transparent;
    border-radius: 10px;
}

.sidebar-toggle:hover {
    color: #4a4a42;
    background: #f2eee8;
    transform: none;
}

.extension-status-indicator {
    padding: 0;
}

.nav-extension-checking,
.nav-extension-installed,
.nav-extension-outdated,
.nav-extension-missing {
    padding: 0.42rem 0.65rem;
    background: #faf9f6;
    border: 1px solid var(--border-light);
    border-radius: 999px;
}

.nav-extension-installed {
    color: #15803d;
    background: #f0fdf4;
    border-color: #dcfce7;
}

.extension-version {
    color: #5f6058;
    background: #fff;
    border-color: #e6e1d8;
    box-shadow: none;
}

.user-info {
    padding: 0.48rem 0.75rem;
    background: #fff;
    border-color: #e4ded5;
    border-radius: 10px;
}

.user-info:hover {
    background: #faf9f6;
    border-color: #ded8cf;
    transform: none;
}

.layout-container {
    margin-top: var(--header-height);
}

.sidebar {
    top: var(--header-height);
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    padding: 1rem 0.75rem;
    background: #fff;
    border-right: 1px solid var(--border-light);
    box-shadow: none;
}

.sidebar-nav {
    padding: 0.4rem 0;
}

.nav-link {
    min-height: 44px;
    margin: 0.2rem 0;
    padding: 0.7rem 0.9rem;
    color: #73736a;
    border: 0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 560;
}

.nav-link i {
    margin-right: 0.8rem;
    color: #9b9a90;
    font-size: 0.92rem;
}

.nav-link:hover {
    color: #4a4a42;
    background: #f2efe9;
    transform: none;
}

.nav-link.active {
    color: #7c2d12;
    background: #fdf1ec;
    border: 0;
    box-shadow: none;
    font-weight: 650;
}

.nav-link.active i {
    color: #c2412d;
}

.sidebar.collapsed .nav-link {
    padding-right: 0;
    padding-left: 0;
}

.sidebar.collapsed .nav-link i {
    margin-right: 0;
}

.main-content {
    min-width: 0;
    margin-left: var(--sidebar-width);
    background:
        radial-gradient(circle at 96% 0, rgba(194, 65, 45, 0.035), transparent 24rem),
        var(--bg-secondary);
}

.content-wrapper {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: clamp(1.5rem, 3vw, 2.75rem);
    background: transparent;
}

.page-header {
    margin-bottom: 1.75rem;
    padding-bottom: 1.2rem;
    background: none;
    border-bottom: 1px solid var(--border-light);
}

.page-title {
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 730;
    letter-spacing: -0.04em;
}

.card {
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.2rem;
    color: #4a4a42;
    background: #fbfaf7;
    border-bottom: 1px solid var(--border-light);
}

.card-body {
    background: transparent;
}

.welcome-section {
    padding: 2.1rem !important;
    background:
        radial-gradient(circle at 92% 5%, rgba(255, 255, 255, 0.15), transparent 18rem),
        linear-gradient(125deg, #292a25 0%, #39372f 58%, #704234 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px !important;
    box-shadow: 0 18px 40px rgba(41, 42, 37, 0.16) !important;
}

.welcome-section::before {
    width: 210px !important;
    height: 210px !important;
    top: -95px !important;
    right: -55px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 50% !important;
    transform: none !important;
}

.welcome-content h2 {
    font-size: 1.75rem !important;
    letter-spacing: -0.035em;
}

.welcome-content p {
    margin-bottom: 0 !important;
    font-size: 0.98rem !important;
}

.stat-icon {
    width: 50px !important;
    height: 50px !important;
    background: rgba(255, 255, 255, 0.13) !important;
    border-radius: 13px !important;
    font-size: 1.15rem !important;
}

.stat-number {
    font-size: 1.7rem !important;
    letter-spacing: -0.04em;
}

.quick-actions h3 {
    color: #24251f !important;
    font-size: 1.12rem;
    font-weight: 680;
}

.action-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 340px)) !important;
    gap: 0.9rem !important;
}

.action-card {
    padding: 1.2rem !important;
    background: #fff !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 14px !important;
}

.action-card::before {
    display: none;
}

.action-card:hover {
    border-color: #e7b6a5 !important;
    box-shadow: 0 12px 28px rgba(47, 45, 40, 0.07) !important;
    transform: translateY(-2px) !important;
}

.action-icon {
    width: 48px !important;
    height: 48px !important;
    color: #c2412d !important;
    background: #fdf1ec !important;
    border-radius: 12px !important;
    font-size: 1.08rem !important;
}

.action-card:hover .action-icon {
    color: #fff !important;
    background: #c2412d !important;
    box-shadow: none !important;
    transform: none !important;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #faf9f6;
    --bs-table-hover-bg: #faf9f6;
    color: #4a4a42;
}

.table > :not(caption) > * > * {
    padding: 0.85rem 0.9rem;
    border-bottom-color: #eeebe5;
}

.table thead th {
    color: #73736a;
    background: #faf9f6;
    font-size: 0.75rem;
    font-weight: 680;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.modal-content {
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 28px 80px rgba(47, 45, 40, 0.2);
}

.modal-header,
.modal-footer {
    border-color: var(--border-light);
}

.badge {
    border-radius: 999px;
    font-weight: 620;
}

.pagination .page-link {
    margin: 0 0.15rem;
    color: #5f6058;
    border-color: #e6e1d8;
    border-radius: 8px;
}

.pagination .page-item.active .page-link {
    color: #fff;
    background: #c2412d;
    border-color: #c2412d;
}

/* Footer */

.footer {
    margin-top: 6rem;
    padding: 4rem 0 1.5rem;
    color: #73736a;
    background: #faf9f6;
    border-top: 1px solid #ebe7df;
}

.footer h4 {
    color: #30322c;
    font-size: 0.95rem;
    letter-spacing: -0.015em;
}

.footer p,
.footer ul li a {
    color: #73736a;
    font-size: 0.86rem;
}

.footer ul li a:hover {
    color: #7c2d12;
    transform: none;
}

.footer-bottom {
    border-top-color: #e9e5de;
}

@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
        padding-top: 3.5rem !important;
    }

    .hero-content h1 {
        margin-right: auto;
        margin-left: auto;
    }

    .hero-content .lead {
        margin-right: auto;
        margin-left: auto;
    }

    .hero-buttons,
    .hero-trust {
        justify-content: center !important;
    }

    .hero-image {
        max-width: 580px;
        margin: 1.5rem auto 0;
    }
}

@media (max-width: 767.98px) {
    .container {
        padding-right: 18px;
        padding-left: 18px;
    }

    .navbar .container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.55rem 1rem;
        min-height: 0;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    .navbar {
        position: relative;
    }

    .navbar .nav-left {
        display: contents;
    }

    .navbar .nav-right {
        grid-row: 1;
        grid-column: 2;
        width: auto;
        min-width: 0;
    }

    .navbar .logo {
        grid-row: 1;
        grid-column: 1;
        width: max-content;
    }

    .navbar .nav-left > .nav-links {
        grid-row: 2;
        grid-column: 1 / -1;
        justify-content: space-between;
        width: 100%;
        padding-top: 0.4rem;
        border-top: 1px solid var(--border-light);
    }

    .navbar .nav-left > .nav-links,
    .navbar .nav-right .nav-links {
        flex-wrap: nowrap;
    }

    .navbar .nav-left > .nav-links > li {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }

    .navbar .nav-left > .nav-links a,
    .navbar .nav-left > .nav-links .dropdown-toggle {
        justify-content: center;
        width: 100%;
        margin: 0;
        padding: 0.45rem 0.3rem;
        font-size: 0.82rem;
        text-align: center;
        white-space: nowrap;
    }

    .navbar .user-info {
        max-width: 168px;
    }

    .navbar .user-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-section {
        min-height: 0;
        padding-top: 2rem !important;
        padding-bottom: 2.75rem !important;
    }

    .hero-content {
        padding: 1.25rem 0 0 !important;
    }

    .hero-eyebrow {
        margin-bottom: 1rem;
    }

    .hero-content h1 {
        margin-bottom: 1rem !important;
        font-size: clamp(2.35rem, 11vw, 3.15rem);
        line-height: 1.08;
        letter-spacing: -0.055em;
    }

    .hero-version {
        display: inline-flex;
        margin: 0 0 1.25rem;
    }

    .hero-content .lead {
        margin-bottom: 1.35rem !important;
        font-size: 0.98rem;
        line-height: 1.7;
    }

    .hero-buttons {
        gap: 0.7rem !important;
        margin-bottom: 1.25rem !important;
    }

    .hero-buttons .btn {
        width: 100%;
        min-height: 48px;
        margin-right: 0 !important;
    }

    .hero-trust {
        display: grid;
        grid-template-columns: repeat(2, auto);
        justify-content: center;
        gap: 0.5rem 1rem;
        margin-top: 0 !important;
        font-size: 0.78rem;
    }

    .hero-trust span:last-child {
        grid-column: 1 / -1;
    }

    .hero-image {
        display: none;
    }

    .main-content-public section.py-5 {
        padding-top: 3.25rem !important;
        padding-bottom: 3.25rem !important;
    }

    .features-section.my-5 {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .main-content-public .display-5 {
        font-size: 2rem;
    }

    .main-content-public section .text-muted.mb-5 {
        margin-bottom: 2rem !important;
    }

    .partner-banner-main {
        align-items: flex-start !important;
    }

    .partner-banner {
        padding: 1.25rem !important;
    }

    .partner-banner-icon {
        width: 48px !important;
        height: 48px !important;
        font-size: 1.2rem !important;
    }

    .partner-title {
        font-size: 1.2rem !important;
    }

    .partner-activities-list {
        display: flex !important;
        gap: 0.75rem;
        padding: 0 0 0.4rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .partner-activities-list::-webkit-scrollbar {
        display: none;
    }

    .partner-activity-item,
    .partner-activity-placeholder,
    .partner-activity-skeleton {
        flex: 0 0 86%;
        min-height: 118px;
        scroll-snap-align: start;
    }

    .features-section .row {
        flex-wrap: nowrap;
        gap: 0.8rem;
        margin-right: -18px;
        margin-left: -18px;
        padding: 0 18px 0.75rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .features-section .row::-webkit-scrollbar {
        display: none;
    }

    .features-section .col-md-4 {
        flex: 0 0 82%;
        width: auto;
        padding: 0;
        scroll-snap-align: center;
    }

    .features-section .feature-card {
        min-height: 220px;
    }

    .steps-section .row {
        gap: 0.55rem;
    }

    .steps-section .text-center {
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 0.15rem 0.8rem;
        padding: 0.9rem;
        text-align: left !important;
        background: #fff;
        border: 1px solid var(--border-light);
        border-radius: 13px;
    }

    .steps-section .step-icon {
        grid-row: 1 / 3;
        width: 46px;
        height: 46px;
        margin: 0 !important;
        border-radius: 12px;
        font-size: 1rem !important;
    }

    .steps-section h5 {
        grid-column: 2;
        margin: 0 !important;
        font-size: 0.94rem;
    }

    .steps-section p {
        grid-column: 2;
        margin: 0 !important;
        font-size: 0.78rem;
        line-height: 1.5;
    }

    .platforms-list {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        gap: 0.55rem !important;
    }

    .platform-item {
        min-width: 0 !important;
        padding: 0.85rem 0.25rem !important;
    }

    .platform-icon-img,
    .platform-icon-placeholder {
        width: 36px !important;
        height: 36px !important;
    }

    .platform-name {
        font-size: 0.75rem !important;
    }

    .top-header {
        height: 64px;
    }

    .header-content {
        padding: 0 0.8rem;
    }

    .layout-container {
        margin-top: 64px;
    }

    .sidebar {
        top: 64px;
        height: calc(100vh - 64px);
        box-shadow: 20px 0 45px rgba(47, 45, 40, 0.12);
    }

    .extension-status-indicator {
        display: none;
    }

    .content-wrapper {
        padding: 1.15rem;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.9rem;
    }

    .welcome-section {
        padding: 1.5rem !important;
    }

    .welcome-stats {
        width: 100%;
        justify-content: space-around !important;
    }

    .footer {
        margin-top: 3rem;
        padding-top: 3rem;
    }
}

/* The sidebar is off-canvas on narrow screens, so content uses the full viewport. */
@media (max-width: 768px) {
    .main-content,
    .sidebar.collapsed ~ .main-content {
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
