:root {
    --bg: #edf3ff;
    --surface: #ffffff;
    --primary: #1e4fd8;
    --primary-dark: #163ea8;
    --primary-soft: #dfe7ff;
    --accent: #f26a3d;
    --text: #1e293b;
    --muted: #64748b;
    --border: #d2ddf5;
    --danger-bg: #fff1f2;
    --danger-border: #fecdd3;
    --success-bg: #ecfdf5;
    --success-border: #86efac;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Tahoma, Arial, sans-serif;
    background:
        radial-gradient(1100px 520px at 8% -10%, rgba(242, 106, 61, 0.2), rgba(242, 106, 61, 0)),
        radial-gradient(900px 380px at 92% -16%, rgba(30, 79, 216, 0.2), rgba(30, 79, 216, 0)),
        radial-gradient(680px 320px at 40% 0%, rgba(94, 95, 242, 0.12), rgba(94, 95, 242, 0)),
        var(--bg);
    color: var(--text);
    line-height: 1.45;
}

h1,
h2,
h3,
h4 {
    letter-spacing: -0.015em;
    color: #1c2a3a;
}

a {
    color: #145a95;
}

main {
    min-height: 56vh;
}

.container {
    width: min(1120px, 92vw);
    margin: 0 auto;
}

.container-fluid {
    width: min(1600px, 100%);
    margin: 0 auto;
}

.law-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(190, 206, 240, 0.95) !important;
}

.law-header .navbar {
    box-shadow: 0 10px 24px rgba(13, 44, 76, 0.08);
}

.law-header .navbar-brand {
    font-size: 1.7rem;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    color: #0f4171 !important;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0;
    min-width: 0;
    max-width: min(78vw, 520px);
}

.site-logo {
    height: 56px !important;
    max-height: 56px !important;
    width: auto;
    display: block;
    object-fit: contain;
}

.site-name {
    font-size: 1.02rem;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #0f4171;
    white-space: normal;
    max-width: min(62vw, 320px);
    overflow-wrap: anywhere;
}

.law-header .nav-link {
    color: #2b3d52;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.46rem 0.72rem !important;
    transition: all 0.2s ease;
}

.law-header .nav-link:hover,
.law-header .nav-link.active {
    color: #173eaa;
    background: linear-gradient(180deg, #e8f0ff, #dbe6ff);
    box-shadow: inset 0 0 0 1px rgba(34, 78, 205, 0.18);
}

.law-header .btn {
    border-radius: 10px !important;
    font-weight: 700;
}

.law-header .btn-outline-primary {
    border-color: #c9dbef;
    color: #124d81;
}

.law-header .btn-outline-primary:hover {
    background: #eaf3ff;
    border-color: #b8d2ed;
    color: #0d436f;
}

.topbar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(219, 227, 239, 0.8);
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: 0 14px 30px rgba(15, 76, 129, 0.08);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    min-height: 64px;
}

.brand {
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.06rem;
    letter-spacing: 0.01em;
}

.nav-links,
.nav-auth {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.nav-links a,
.nav-auth a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.92rem;
    padding: 0.42rem 0.62rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-auth a:hover,
.nav-links a.active,
.nav-auth a.active {
    background: linear-gradient(180deg, #eef5ff, #e5effd);
    color: var(--primary-dark);
    box-shadow: inset 0 0 0 1px rgba(15, 76, 129, 0.1);
}

.hero {
    background:
        radial-gradient(500px 220px at 10% 10%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
        linear-gradient(130deg, #2f4fe1, #163ea8 62%, #0f2d7f);
    color: #ffffff;
    padding: 2.4rem 0;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.2rem;
    align-items: start;
}

.hero h1 {
    margin-top: 0;
    font-size: clamp(1.65rem, 3vw, 2.5rem);
}

.hero-card {
    background: rgba(255, 255, 255, 0.98);
    color: var(--text);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 18px 32px rgba(7, 28, 56, 0.22);
}

.page-content {
    padding: 1rem 0 2rem;
}

.card {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.15rem;
    margin: 0.9rem 0;
    box-shadow: 0 10px 22px rgba(48, 81, 174, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(35, 74, 180, 0.16);
    border-color: #b9ccf2;
}

.card h1,
.card h2,
.card h3 {
    margin-top: 0;
}

.card-grid {
    display: grid;
    gap: 1rem;
}

.card-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.search-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.search-form input,
.search-form select,
.search-form textarea {
    width: 100%;
    border: 1px solid #cad5e7;
    border-radius: 8px;
    padding: 0.7rem 0.75rem;
    margin-bottom: 0.9rem;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form input:focus,
.search-form select:focus,
.search-form textarea:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(15, 76, 129, 0.12);
}

.form-control,
.form-select {
    border-radius: 10px !important;
    border-color: #cfd9e8;
}

.form-control:focus,
.form-select:focus {
    border-color: #2f6ea5;
    box-shadow: 0 0 0 0.18rem rgba(22, 101, 165, 0.16);
}

button,
.btn {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.7rem 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button,
.btn-primary {
    background: linear-gradient(180deg, #2c69e8, #1b49bf);
    color: #ffffff;
    box-shadow: 0 10px 18px rgba(22, 65, 177, 0.34);
}

button:hover,
.btn-primary:hover {
    background: linear-gradient(180deg, #2456d3, #163ea8);
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(18, 56, 160, 0.38);
}

.btn-light {
    background: linear-gradient(180deg, #fff2eb, #ffe4d8);
    color: #7c2d12;
    box-shadow: inset 0 0 0 1px rgba(230, 96, 53, 0.16);
}

.btn-light:hover {
    background: linear-gradient(180deg, #ffe7d9, #ffd8c3);
    transform: translateY(-1px);
}

.btn-dashboard-maroon {
    background: linear-gradient(180deg, #8e1f3a, #6f132a);
    color: #fff;
    border-color: #6f132a;
    box-shadow: 0 10px 18px rgba(111, 19, 42, 0.34);
}

.btn-dashboard-maroon:hover {
    background: linear-gradient(180deg, #a62a48, #7f1732);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(111, 19, 42, 0.4);
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 0.8rem;
}

.grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.grid-three {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.8rem;
}

.results-list {
    display: grid;
    gap: 0.75rem;
}

.result-item {
    background: #fcfdff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.8rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(15, 76, 129, 0.08);
}

.result-item h3 {
    margin: 0 0 0.2rem;
}

.result-item a {
    text-decoration: none;
    color: var(--primary-dark);
}

.result-item a:hover {
    text-decoration: underline;
}

.meta {
    color: var(--muted);
    font-size: 0.85rem;
}

.card-head {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: center;
}

.inline-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.inline-link:hover {
    text-decoration: underline;
}

.flash-wrap {
    padding-top: 0.8rem;
}

.flash {
    border-radius: 8px;
    padding: 0.7rem 0.9rem;
    border: 1px solid;
}

.flash-success {
    background: var(--success-bg);
    border-color: var(--success-border);
}

.flash-error,
.error-card {
    background: var(--danger-bg);
    border-color: var(--danger-border);
}

.muted {
    color: var(--muted);
}

.tag-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.tag {
    text-decoration: none;
    background: linear-gradient(180deg, #edf5ff, #e4eefc);
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 0.35rem 0.65rem;
    font-size: 0.86rem;
    border: 1px solid #d6e4f8;
    transition: all 0.2s ease;
}

.tag:hover {
    background: linear-gradient(180deg, #d9e9ff, #d2e3fb);
    transform: translateY(-1px);
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border: 1px solid var(--border);
    padding: 0.55rem;
    text-align: left;
    font-size: 0.92rem;
}

thead th {
    background: #f3f8ff;
    color: #274364;
}

.auth-card {
    max-width: 560px;
}

.auth-shell {
    min-height: calc(100vh - 260px);
}

.auth-panel {
    background: linear-gradient(180deg, #ffffff, #f9fcff);
    border: 1px solid #dbe6f4 !important;
}

.auth-side {
    background: linear-gradient(160deg, #f2f8ff, #ffffff);
    border: 1px solid #dbe6f4 !important;
}

.auth-label {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
}

.auth-points {
    padding-left: 1rem;
}

.auth-points li {
    margin-bottom: 0.45rem;
}

.package-cost-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    border: 1px solid #d1e2f5;
    border-radius: 10px;
    background: linear-gradient(180deg, #f5faff, #ffffff);
    color: #1f3e62;
    font-size: 0.95rem;
}

.package-cost-note strong {
    font-weight: 700;
}

.package-cost-note span {
    font-weight: 600;
    color: #0f4c81;
}

.eyebrow {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
}

.static-hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1rem;
    align-items: center;
}

.static-image-wrap img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #f5f9ff;
}

.static-highlight {
    background: linear-gradient(180deg, #f7fbff, #ffffff);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.price-card {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.price-card h2 {
    margin: 0;
    font-size: 1.8rem;
}

.price-card h2 span {
    font-size: 0.92rem;
    color: var(--muted);
    font-weight: 500;
}

.plan-label {
    margin: 0;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--primary);
}

.price-card ul {
    margin: 0;
    padding-left: 1.1rem;
}

.price-card.featured {
    border: 2px solid #9ec2eb;
    background: linear-gradient(180deg, #f2f8ff, #ffffff);
    box-shadow: 0 16px 30px rgba(15, 76, 129, 0.14);
}

.dashboard-page .card {
    margin: 0.7rem 0;
}

.dashboard-page {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
}

.dashboard-sidebar {
    position: sticky;
    top: 82px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border: 1px solid #d7e4f5;
    box-shadow: 0 12px 24px rgba(15, 76, 129, 0.08);
    padding: 0.75rem;
    align-self: start;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
}

.dashboard-sidebar h3 {
    margin: 0 0 0.6rem;
    font-size: 1.7rem;
}

.sidebar-nav {
    display: grid;
    gap: 0.45rem;
}

.sidebar-nav a {
    text-decoration: none;
    color: var(--text);
    background: #f7faff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
    background: linear-gradient(180deg, #eaf3ff, #e0ecff);
    color: var(--primary-dark);
    border-color: #bdd2ef;
}

.sidebar-nav a.case-diary-link {
    background: linear-gradient(180deg, #f4ecff, #efe2ff);
    border-color: #d9c3ff;
    color: #54208a;
}

.sidebar-nav a.case-diary-link:hover,
.sidebar-nav a.case-diary-link.active {
    background: linear-gradient(180deg, #7c3aed, #6d28d9);
    border-color: #6d28d9;
    color: #fff;
}

.sidebar-nav a.speech-to-text-link {
    background: linear-gradient(180deg, #e8f8ff, #dff4ff);
    border-color: #b9e7fb;
    color: #0f5e84;
}

.sidebar-nav a.speech-to-text-link:hover,
.sidebar-nav a.speech-to-text-link.active {
    background: linear-gradient(180deg, #0ea5e9, #0284c7);
    border-color: #0284c7;
    color: #fff;
}

.dashboard-main {
    min-width: 0;
}

.speech-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.speech-status {
    font-size: 0.9rem;
    color: #3f5579;
    font-weight: 600;
}

.speech-editor .ql-toolbar.ql-snow {
    border: 1px solid #cbd9ef;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.speech-editor .ql-container.ql-snow {
    border: 1px solid #cbd9ef;
    border-top: 0;
    min-height: 720px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    background: #fff;
}

@media (max-width: 768px) {
    .speech-editor .ql-container.ql-snow {
        min-height: 460px;
    }
}

.case-diary-page .search-form textarea.editor-large {
    min-height: 260px;
    resize: vertical;
    border: 1px solid #cbd9ef;
    border-radius: 10px;
    background: #fff;
    line-height: 1.6;
    padding: 0.7rem 0.8rem;
}

@media (max-width: 768px) {
    .case-diary-page .search-form textarea.editor-large {
        min-height: 190px;
    }
}

.case-diary-page {
    background:
        radial-gradient(1100px 340px at -10% -20%, rgba(117, 167, 255, 0.2), rgba(117, 167, 255, 0)),
        radial-gradient(900px 300px at 110% 0%, rgba(255, 168, 122, 0.2), rgba(255, 168, 122, 0)),
        linear-gradient(180deg, #eff4fb, #e7eef9 50%, #edf2fb);
    border-radius: 8px;
    padding: 0.45rem;
}

.case-diary-page .dashboard-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 0.8rem;
}

.case-diary-sidebar {
    position: sticky;
    top: 82px;
    align-self: start;
    background: linear-gradient(180deg, #edf3fb, #e3ebf6);
    border: 1px solid #b9cbe2;
    border-radius: 8px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    box-shadow: 0 16px 30px rgba(18, 64, 110, 0.16);
}

.cd-profile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #2f7ec0, #285fbb);
    border-bottom: 1px solid #315ca2;
}

.cd-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #c7d2df;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d6ca6;
}

.cd-profile-name {
    margin: 0;
    font-weight: 700;
    font-size: 0.98rem;
    color: #fff;
}

.cd-online {
    margin: 0.05rem 0 0;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.92);
}

.cd-online span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3ca75a;
    margin-right: 0.35rem;
}

.cd-nav {
    display: grid;
}

.cd-nav a {
    text-decoration: none;
    color: #2f4560;
    border-bottom: 1px solid #cad7e7;
    background: linear-gradient(180deg, #f8fbff, #eef4fb);
    font-weight: 600;
    padding: 0.78rem 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.18s ease;
}

/* Fallback for cached/older markup: force row-style links inside case diary sidebar */
.case-diary-sidebar nav {
    display: block;
}

.case-diary-sidebar nav a {
    display: flex !important;
    width: 100%;
    text-decoration: none !important;
    box-sizing: border-box;
}

.cd-nav a i {
    color: #5d7390;
}

.cd-submenu-wrap {
    display: block;
}

.cd-submenu {
    display: grid;
    background: #f1f5fb;
    border-bottom: 1px solid #d3dce6;
}

.cd-submenu a {
    padding: 0.56rem 0.75rem 0.56rem 1.8rem;
    font-size: 0.92rem;
    border-bottom: 1px solid #dbe3ee;
    background: #f6f9fd;
}

.cd-submenu a:last-child {
    border-bottom: 0;
}

.cd-nav a:hover,
.cd-nav a.active {
    background: linear-gradient(135deg, #5a97e0, #4479d0);
    color: #fff;
}

.cd-nav a:hover i,
.cd-nav a.active i {
    color: #fff;
}

.case-diary-page .dashboard-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.93), rgba(247, 251, 255, 0.95));
    border: 1px solid #bcd1ea;
    box-shadow: 0 12px 24px rgba(32, 80, 134, 0.12);
}

.case-diary-page .dashboard-stats .stat-card {
    background: linear-gradient(135deg, #1f6fbe, #2f92d8);
    border: 1px solid #2a6fb5;
    box-shadow: 0 14px 26px rgba(26, 90, 150, 0.22);
}

.case-diary-page .dashboard-stats .stat-card p,
.case-diary-page .dashboard-stats .stat-card h2 {
    color: #fff;
}

.case-diary-page .dashboard-stats .stat-card h2 {
    font-size: 1.6rem;
}

.case-diary-page.case-diary-overview .dashboard-main > .card:first-child {
    background:
        radial-gradient(500px 170px at -10% -40%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, #245eb0, #2b89d2 62%, #53a2df);
    border: 1px solid #2f73bc;
}

.case-diary-page.case-diary-overview .dashboard-main > .card:first-child h1,
.case-diary-page.case-diary-overview .dashboard-main > .card:first-child p,
.case-diary-page.case-diary-overview .dashboard-main > .card:first-child .inline-link {
    color: #fff;
}

.dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1.1rem;
    text-align: left;
}

.dashboard-hero-premium {
    background:
        radial-gradient(420px 180px at 15% 10%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)),
        linear-gradient(135deg, #1b5f9a, #0f4c81 58%, #0b3a62);
    color: #fff;
    border-color: #225f94;
    box-shadow: 0 18px 32px rgba(11, 58, 98, 0.28);
}

.dashboard-hero-premium h1 {
    color: #fff;
    margin-bottom: 0.35rem;
}

.dashboard-hero-premium p {
    color: rgba(255, 255, 255, 0.9);
}

.dashboard-hero-profile {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: flex-start;
}

.dashboard-hero-premium > div {
    width: 100%;
    margin: 0;
}

.profile-badge {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    backdrop-filter: blur(2px);
}

.dashboard-hero-actions .btn-light {
    background: rgba(255, 255, 255, 0.9);
}

.dashboard-hero-actions .btn-light:hover {
    background: #fff;
}

.dashboard-hero-actions {
    justify-content: flex-start;
    margin-top: 1rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.stat-card {
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border-color: #d9e6f6;
}

.stat-card h2 {
    margin: 0.2rem 0 0;
    font-size: 1.35rem;
    word-break: break-word;
}

.dashboard-panel {
    border: 1px solid #d8e5f5;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.dashboard-panel h2 {
    margin-bottom: 0.8rem;
}

.dashboard-main > .card,
.dashboard-main .dashboard-panel,
.dashboard-main .stat-card {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
}

.empty-state {
    min-height: 120px;
    border: 1px dashed #c9d9ef;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: #f8fbff;
}

.empty-state i {
    font-size: 1.5rem;
    color: #4e79a8;
}

.latest-case-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.latest-case-card {
    border: 1px solid #d8e4f4;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    border-radius: 12px;
    padding: 1.05rem;
    box-shadow: 0 8px 18px rgba(15, 76, 129, 0.07);
    overflow: hidden;
}

.latest-case-head {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    align-items: center;
    margin-bottom: 0.55rem;
}

.latest-chip {
    display: inline-block;
    background: #eaf3ff;
    color: #154875;
    border: 1px solid #c9dcf5;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    max-width: 100%;
}

.latest-date {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.latest-case-number {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

.latest-party {
    margin: 0.2rem 0 0.65rem;
    color: #2a3f58;
    font-size: 1.02rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.latest-summary {
    margin: -0.2rem 0 0.65rem;
    color: #4d6280;
    font-size: 0.94rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-results-grid .latest-party {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

.vs-sep {
    color: #5b7897;
    font-weight: 600;
    margin: 0 0.35rem;
}

.latest-actions {
    margin-top: 0.2rem;
}

.search-preview {
    margin: 0.15rem 0 0.55rem;
    padding: 0.6rem 0.7rem;
    background: #f8fbff;
    border: 1px solid #d9e6f6;
    border-radius: 8px;
    color: #233a53;
    font-size: 0.95rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: calc(1.45em * 4);
    white-space: normal;
}

.search-preview mark {
    background: #fff3a6;
    color: #1a2c44;
    padding: 0 0.1rem;
    border-radius: 3px;
}

.judgement-block h2 {
    font-size: 1.08rem;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #183f66;
}

.judgement-reader {
    background: linear-gradient(180deg, #ffffff, #fbfdff);
    border: 0;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.judgement-reader::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7e1830, #aa3754 42%, #1b5f9a);
}

.judgement-reader .card-head {
    border-bottom: 1px solid #dbe5f2;
    padding: 0.75rem 0.85rem;
    margin: -0.25rem -0.25rem 0.85rem;
    background: linear-gradient(180deg, #f9fbff, #f3f7fe);
    border-radius: 10px;
    align-items: flex-start;
    gap: 0.9rem;
}

.judgement-title-wrap {
    min-width: 0;
}

.judgement-kicker {
    margin: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: #2d5f8c;
}

.party-heading-maroon {
    color: #6a1523;
    margin-bottom: 0;
    font-size: clamp(1rem, 1.45vw, 1.45rem);
    line-height: 1.25;
    font-weight: 650;
    letter-spacing: 0;
    max-width: 46ch;
    word-break: break-word;
    text-wrap: balance;
}

.judgement-back-link {
    border: 1px solid #c9d8eb;
    border-radius: 999px;
    padding: 0.35rem 0.72rem;
    background: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    color: #1b4f81;
    box-shadow: 0 6px 14px rgba(15, 76, 129, 0.08);
}

.judgement-back-link:hover {
    background: #eef5ff;
    text-decoration: none;
}

.judgement-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
    padding: 0.35rem 0.45rem;
    background: #f5f9ff;
    border: 1px solid #d9e5f3;
    border-radius: 12px;
}

.judgement-actions .btn {
    border-radius: 10px !important;
    padding: 0.5rem 0.9rem;
    font-weight: 700;
    box-shadow: none;
    transform: none;
}

.judgement-actions .btn-light {
    background: #fff;
    border: 1px solid #cfdded;
}

.judgement-actions .btn-light:hover {
    background: #edf4ff;
    border-color: #b7cde7;
}

.judgement-reader .muted {
    font-size: 0.95rem;
}

.judgement-content {
    border: 0;
    border-radius: 0;
    background: #fff;
    padding: 1.2rem 1.15rem;
    line-height: 1.5;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.05rem;
    color: #14293f;
    margin: 0;
    max-height: none;
    overflow: visible;
    white-space: pre-wrap;
    box-shadow: none;
}

.judgement-compare-wrap {
    display: block;
}

.judgement-compare-wrap.is-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.judgement-translation-view {
    border-left: 1px solid #e6edf7;
}

.judgement-intro-part {
    text-align: center;
    font-size: 1.16rem;
    line-height: 1.6;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.85rem 0.9rem 0.95rem;
    margin-bottom: 0.85rem;
    border: 0;
    border-left: 0;
    border-radius: 0;
    background: transparent;
    letter-spacing: 0.01em;
}

.judgement-body-part {
    text-align: left;
    line-height: 1.58;
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.judgement-body-part + .judgement-body-part {
    margin-top: 0.75rem;
}

@media print {
    .print-hide,
    .dashboard-sidebar,
    header,
    footer,
    .law-header {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .container-fluid,
    .dashboard-main,
    .dashboard-layout {
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .judgement-reader,
    .judgement-content {
        box-shadow: none !important;
        border-color: #d8d8d8 !important;
    }
}

@media (max-width: 900px) {
    .judgement-compare-wrap.is-compare {
        grid-template-columns: 1fr;
    }

    .judgement-translation-view {
        border-left: 0;
        border-top: 1px solid #e6edf7;
        margin-top: 10px;
        padding-top: 12px;
    }
}

.site-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    margin-top: 1.6rem;
}

footer.bg-dark {
    background: linear-gradient(180deg, #1f2631, #161c26) !important;
}

footer.bg-dark h5,
footer.bg-dark h6 {
    color: #fff;
}

footer.bg-dark a:hover {
    color: #cfe5ff !important;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 1rem;
    padding: 1.2rem 0;
}

.footer-grid h4 {
    margin: 0 0 0.45rem;
}

.footer-grid a {
    display: block;
    margin: 0.2rem 0;
    color: var(--primary-dark);
    text-decoration: none;
}

.footer-grid a:hover {
    text-decoration: underline;
}

@media (max-width: 960px) {
    .hero-grid,
    .card-grid.two,
    .card-grid.three,
    .footer-grid,
    .dashboard-stats,
    .latest-case-grid,
    .static-hero,
    .pricing-grid,
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .case-diary-page .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .case-diary-sidebar {
        position: static;
        max-height: none;
    }
}

@media (max-width: 760px) {
    .nav-wrap {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.7rem 0;
    }

    .grid-two,
    .grid-three,
    .card-head,
    .dashboard-hero {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-hero-profile {
        width: 100%;
    }

    .auth-shell {
        min-height: auto;
    }

    .site-logo {
        height: 44px !important;
        max-height: 44px !important;
    }

    .site-name {
        font-size: 0.88rem;
        max-width: min(56vw, 180px);
    }

    .site-logo {
        height: 40px !important;
        max-height: 40px !important;
    }

    .judgement-reader .card-head {
        padding: 0.6rem;
        margin: -0.15rem -0.15rem 0.75rem;
    }

    .judgement-back-link {
        align-self: flex-start;
    }

    .latest-case-head {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .latest-party {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-break: break-word;
    }

    .latest-summary {
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 520px) {
    .site-name {
        display: none;
    }
}
