@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap");

html {
    font-size: 16px;
}

body {
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    background: url("/static/IMG_1174.JPG.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body,
button,
input,
select,
textarea,
.btn,
.form-control,
.form-select,
table {
    font-family: "Poppins", sans-serif;
}

.form-container {
    max-width: 980px;
    background: linear-gradient(180deg, rgba(7, 59, 119, 0.94) 0%, rgba(25, 98, 171, 0.9) 45%, rgba(244, 246, 250, 0.95) 45%);
    padding: 22px 26px 26px;
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    margin: 54px auto;
    text-align: center;
    backdrop-filter: blur(1px);
    color: #fff;
}

.form-container.mode-file-active {
    background: linear-gradient(180deg, rgba(7, 59, 119, 0.94) 0%, rgba(25, 98, 171, 0.9) 47.5%, rgba(244, 246, 250, 0.95) 47.5%);
}

.form-container h1 {
    margin-bottom: 12px;
    letter-spacing: 1px;
    font-weight: 800;
}

.hero-title-wrap {
    margin: 6px auto -2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.hero-title {
    margin: 0;
    font-size: clamp(2.6rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.hero-subtitle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    margin-top: -2px;
    margin-bottom: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(95, 162, 233, 0.82) 0%, rgba(63, 126, 198, 0.78) 100%);
    border: 1px solid rgba(255, 255, 255, 0.42);
    font-size: clamp(0.72rem, 1.2vw, 0.86rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #f8fbff;
    text-align: center;
    box-shadow: 0 10px 28px rgba(5, 25, 52, 0.16);
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 2;
    transform: translateY(-6px);
}

.form-container.mode-file-active .hero-subtitle {
    transform: translateY(-10px);
}

.lead-text {
    margin-bottom: 18px;
    font-size: 1.2rem;
    font-weight: 600;
}

#modeChooser {
    position: relative;
    padding-top: 8px;
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding-right: 52px;
    flex-wrap: wrap;
}

.auth-topbar-bottom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    margin-bottom: 2px;
    padding-right: 0;
}

.auth-user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #2f2f73;
    border: 1px solid #2f2f73;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.92rem;
    backdrop-filter: blur(8px);
}

.auth-logout-btn {
    width: auto;
    min-width: 120px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-logout-row {
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 3px;
    flex-wrap: wrap;
}

.auth-refresh-btn {
    min-width: 120px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid #6b7280;
    background: #6b7280;
    color: #ffffff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-refresh-btn:hover {
    background: #4b5563;
    border-color: #4b5563;
    color: #ffffff;
}

#modeDetail {
    margin-top: 6px;
}

#urlInputBlock,
#fileInputBlock {
    min-height: 150px;
}

.btn-primary {
    width: 48%;
    border-radius: 30px;
    background-color: #4c89fb;
    border: none;
}

.btn-warning {
    width: 48%;
    border-radius: 30px;
    background-color: #ffc107;
    border: none;
    color: black;
}

.btn-secondary {
    border-radius: 30px;
}

.action-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.action-row .btn {
    width: auto;
    min-width: 180px;
    height: 44px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-row.hidden {
    display: none;
}

.table-container {
    margin: 40px auto;
    max-width: 1400px;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.mode-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.mode-card {
    border-radius: 12px;
    color: #fff;
    width: 300px;
    min-height: 260px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mode-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
}

.mode-url {
    background: linear-gradient(180deg, #2fac5f 0%, #269a52 100%);
}

.mode-file {
    background: linear-gradient(180deg, #f39d2e 0%, #e57f0f 100%);
}

.mode-head {
    padding: 16px 12px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.mode-body {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    min-height: 120px;
}

.mode-foot {
    padding: 12px 14px 14px;
    background: rgba(0, 0, 0, 0.12);
}

.mode-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.05;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mode-icon {
    font-size: 5rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mode-desc {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mode-icon i {
    line-height: 1;
}

.tiktok-icon i {
    color: #ffffff;
    text-shadow: -2px 0 #ff2f56, 2px 0 #2ee8f2;
}

.data-icon i {
    color: #fff7db;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.data-file {
    font-size: 3.2rem;
    margin-left: -6px;
    margin-top: 18px;
    color: #e8edf3 !important;
}

.btn-check:checked + .mode-card {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45), 0 10px 18px rgba(0, 0, 0, 0.2);
}

.input-panel {
    border: 1px solid #d7e2ee;
    border-radius: 12px;
    background: #ffffff;
    padding: 16px;
    margin-top: 14px;
    margin-bottom: 12px;
    text-align: left;
    color: #1f2d3d;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.auth-form-container {
    max-width: 600px;
    padding: 14px 20px 22px;
    background: linear-gradient(180deg, rgba(7, 59, 119, 0.94) 0%, rgba(25, 98, 171, 0.9) 37.5%, rgba(244, 246, 250, 0.95) 37.5%);
}

.auth-register-container {
    background: linear-gradient(180deg, rgba(7, 59, 119, 0.94) 0%, rgba(25, 98, 171, 0.9) 31%, rgba(244, 246, 250, 0.95) 31%);
}

.auth-intro {
    margin-top: 2px;
    margin-bottom: 14px;
}

.auth-logo {
    max-height: 94px !important;
}

.auth-form-container .hero-title {
    font-size: clamp(2.1rem, 4.4vw, 3.15rem);
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.auth-form-container .hero-subtitle {
    width: auto;
    max-width: 100%;
    padding: 6px 12px;
    font-size: clamp(0.58rem, 1vw, 0.74rem);
    line-height: 1.25;
}

.auth-mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(56, 115, 186, 0.88);
    border: 1px solid rgba(194, 220, 255, 0.34);
    color: #f8fbff;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    box-shadow: 0 10px 24px rgba(7, 59, 119, 0.18);
    backdrop-filter: blur(8px);
}

.auth-panel-shell {
    display: flex;
    justify-content: center;
}

.auth-panel {
    margin-top: 0;
    margin-bottom: 0;
    padding: 16px 16px 14px;
    border-radius: 18px;
}

.auth-panel-single {
    width: 100%;
    max-width: 420px;
    margin-top: 0;
}

.auth-login-panel {
    margin-top: 10px;
}

.auth-panel-head {
    text-align: left;
    margin-bottom: 10px;
}

.auth-panel-head h2 {
    margin: 0;
    color: #123860;
    font-size: 1.55rem;
    font-weight: 800;
}

.auth-panel-head p {
    margin: 6px 0 0;
    color: #52606d;
    line-height: 1.5;
}

.auth-alert {
    border-radius: 14px;
    margin-bottom: 12px;
    text-align: left;
}

.auth-form {
    text-align: left;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #4d6b8c;
    font-size: 0.98rem;
    z-index: 2;
}

.auth-control {
    min-height: 46px;
    border-radius: 14px;
    padding-left: 42px;
    border: 1px solid #c9d8e8;
    background: #f9fbfd;
}

.auth-control:focus {
    border-color: #4c89fb;
    box-shadow: 0 0 0 0.18rem rgba(76, 137, 251, 0.16);
    background: #ffffff;
}

.auth-register-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.auth-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 8px 0 12px;
    flex-wrap: wrap;
}

.auth-meta-row-login {
    align-items: center;
    flex-wrap: nowrap;
}

.auth-meta-row-register {
    margin-top: 8px;
    justify-content: flex-end;
}

.auth-side-link-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    text-align: right;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 0.88rem;
}

.auth-check .form-check-input {
    margin-top: 0;
}

.auth-check-block {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 0;
    color: #334155;
}

.auth-link {
    color: #1962ab;
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover {
    color: #0f4f94;
    text-decoration: underline;
}

.auth-helper {
    color: #52606d;
    font-weight: 600;
    font-size: 0.88rem;
}

.auth-action-row {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.auth-action-row .btn {
    min-width: 0;
    width: calc(50% - 6px);
}

.auth-bottom-link {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.auth-forgot-link {
    color: #2563eb;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    margin-left: auto;
    white-space: nowrap;
}

.auth-forgot-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.auth-guide-link-row {
    margin-top: 8px;
    display: flex;
    justify-content: center;
}

.auth-guide-link {
    color: #1d4ed8;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.92rem;
}

.auth-guide-link:hover {
    color: #1e40af;
    text-decoration: underline;
}

.auth-developer-row {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.auth-developer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.88);
    border: 1px solid rgba(191, 219, 254, 0.72);
    color: #8a6b12;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(30, 64, 175, 0.22);
}

.auth-developer-link:hover {
    color: #ffffff;
    background: rgba(29, 78, 216, 0.96);
    border-color: rgba(219, 234, 254, 0.9);
}

.auth-developer-copy {
    color: #6b7280;
    font-size: 0.78rem;
    line-height: 1.45;
}

.auth-developer-row-outside {
    margin: auto auto 18px;
    width: fit-content;
    max-width: calc(100% - 28px);
    padding: 4px 10px 6px;
    border-radius: 12px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.auth-login-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.auth-login-body .auth-developer-link {
    color: #fff8de;
    text-shadow: 0 2px 10px rgba(15, 23, 42, 0.85);
}

.auth-login-body .auth-developer-link:hover {
    color: #ffffff;
}

.auth-login-body .auth-developer-copy {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(15, 23, 42, 0.92);
    font-weight: 600;
}

.auth-guide-container {
    max-width: 760px;
}

.auth-guide-panel {
    max-width: 620px;
}

.guide-section {
    margin-bottom: 14px;
    color: #334155;
}

.guide-section h3 {
    margin: 0 0 6px;
    font-size: 1.02rem;
    font-weight: 800;
    color: #123860;
}

.guide-section p {
    margin: 0;
    line-height: 1.6;
}

.guide-list {
    margin: 8px 0 0 18px;
    color: #334155;
}

.guide-list li {
    margin-bottom: 6px;
}

.guide-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1e3a8a;
    margin-top: 8px;
    margin-bottom: 16px;
    line-height: 1.55;
}

.guide-action-row {
    margin-top: 4px;
}

.auth-forgot-note {
    margin-top: 2px;
}

.developer-body {
    min-height: 100vh;
    margin: 0;
    background: url("/static/IMG_1174.JPG.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #f8fafc;
    position: relative;
}

.developer-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top, rgba(132, 196, 255, 0.2), transparent 28%),
        linear-gradient(180deg, rgba(6, 26, 58, 0.34) 0%, rgba(6, 26, 58, 0.18) 20%, rgba(6, 26, 58, 0.12) 100%);
    pointer-events: none;
    z-index: 0;
}

.developer-shell {
    position: relative;
    z-index: 1;
    max-width: 1060px;
    margin: 0 auto;
    padding: 34px 20px 56px;
}

.developer-hero {
    text-align: center;
    margin-bottom: 30px;
}

.developer-hero-logo-frame {
    width: 146px;
    height: 146px;
    margin: 0 auto 16px;
    padding: 14px;
    border-radius: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.98), rgba(233, 244, 255, 0.94) 62%, rgba(199, 224, 255, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.88);
    box-shadow:
        0 24px 54px rgba(8, 38, 79, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    position: relative;
}

.developer-hero-logo-frame::before {
    content: "";
    position: absolute;
    inset: -12px;
    border-radius: 46px;
    background: radial-gradient(circle, rgba(116, 184, 255, 0.28), transparent 70%);
    z-index: -1;
}

.developer-hero-logo {
    width: 112px;
    height: 112px;
    object-fit: contain;
    display: block;
    margin: 0;
    filter:
        drop-shadow(0 10px 22px rgba(8, 38, 79, 0.22))
        saturate(1.06)
        contrast(1.06);
}

.developer-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 2.85rem);
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 10px 30px rgba(9, 25, 48, 0.34);
}

.developer-hero-subtitle {
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(81, 148, 229, 0.92) 0%, rgba(36, 95, 186, 0.88) 100%);
    border: 1px solid rgba(255, 255, 255, 0.56);
    color: #f8fbff;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 12px 30px rgba(5, 25, 52, 0.2);
    backdrop-filter: blur(10px);
}

.developer-card {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    background:
        linear-gradient(135deg, rgba(244, 248, 255, 0.94) 0%, rgba(234, 243, 255, 0.9) 54%, rgba(223, 237, 255, 0.88) 100%);
    border: 1px solid rgba(194, 220, 255, 0.78);
    border-radius: 30px;
    overflow: hidden;
    box-shadow:
        0 30px 70px rgba(8, 34, 72, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
}

.developer-photo-panel {
    position: relative;
    background:
        radial-gradient(circle at top left, rgba(98, 165, 245, 0.34), transparent 44%),
        linear-gradient(180deg, rgba(12, 56, 117, 0.98) 0%, rgba(21, 89, 170, 0.94) 100%);
    min-height: 100%;
}

.developer-photo-panel::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 34%;
    background: linear-gradient(180deg, rgba(6, 26, 58, 0) 0%, rgba(6, 26, 58, 0.34) 100%);
    pointer-events: none;
}

.developer-photo-panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.developer-photo-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(72, 139, 223, 0.96) 0%, rgba(25, 98, 171, 0.94) 100%);
    color: #f8fafc;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 10px 24px rgba(8, 38, 79, 0.22);
}

.developer-content {
    padding: 38px 36px 34px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.52) 0%, rgba(245, 249, 255, 0.34) 100%);
}

.developer-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #547db0;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.developer-label-spaced {
    margin-top: 30px;
}

.developer-content h2 {
    margin: 12px 0 6px;
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    font-weight: 900;
    color: #0b2f57;
    line-height: 1.08;
}

.developer-id {
    color: #125ca8;
    font-size: 1.02rem;
    font-weight: 800;
}

.developer-thesis-box {
    margin-top: 14px;
    padding: 20px 20px 18px;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(217, 234, 255, 0.98) 0%, rgba(239, 247, 255, 0.92) 100%);
    border: 1px solid rgba(161, 198, 247, 0.92);
    color: #123d69;
    line-height: 1.6;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.developer-meta-grid {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
}

.developer-meta-title {
    color: #6b7f96;
    font-size: 0.82rem;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.developer-meta-value {
    color: #0e335c;
    font-size: 0.98rem;
    font-weight: 800;
}

.developer-action-row {
    margin-top: 26px;
    display: flex;
    justify-content: center;
}

.developer-back-btn {
    min-width: 144px;
    padding: 13px 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(179, 209, 248, 0.72);
    background: linear-gradient(180deg, rgba(89, 108, 142, 0.95) 0%, rgba(63, 80, 112, 0.95) 100%);
    color: #f8fafc;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 16px 30px rgba(8, 34, 72, 0.18);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.developer-back-btn:hover {
    background: linear-gradient(180deg, rgba(67, 86, 118, 0.98) 0%, rgba(43, 59, 87, 0.98) 100%);
    border-color: rgba(191, 219, 254, 0.72);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(8, 34, 72, 0.24);
}

.auth-secondary-btn {
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid #6b7280;
    background: #6b7280;
    color: #ffffff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.auth-secondary-btn:hover {
    background: #4b5563;
    border-color: #4b5563;
    color: #ffffff;
}

.chart-container {
    max-width: 260px;
    height: 220px;
    margin: 0 auto 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

#sentimentChart {
    width: 220px !important;
    height: 220px !important;
    background-color: white;
    margin: 0 auto;
    display: block;
}

.chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.chart-section {
    margin-bottom: 60px;
}

.summary-text {
    margin-top: 20px;
}

.table td,
.table th {
    vertical-align: top;
    word-break: break-word;
    white-space: normal;
}

.recommendation-row {
    margin: 6px 0 14px 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    justify-content: center;
    text-align: left;
}

.recommendation-label {
    white-space: nowrap;
}

.recommendation-content {
    display: inline;
}

.recommendation-item {
    display: inline;
}

.recommendation-sep {
    color: #6c757d;
    margin: 0 2px;
}

.calc-toggle-wrap {
    text-align: center;
    margin: 4px 0 10px 0;
}

.calc-panel {
    margin: 0 0 14px 0;
    padding: 12px 14px;
    border: 1px solid #dfe4ea;
    border-radius: 10px;
    background: #f8fafc;
}

.calc-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 6px 14px;
    margin-bottom: 10px;
}

.calc-formula {
    margin-bottom: 6px;
    word-break: break-word;
}

.table th {
    text-align: center;
}

.table-responsive {
    border: 1px solid #d9e2ec;
    border-radius: 12px;
    overflow-x: auto;
    overflow-y: auto;
    background: #ffffff;
    width: 100%;
}

#sentimentTable {
    table-layout: fixed;
    width: 100%;
    margin-bottom: 0;
}

#sentimentTable th,
#sentimentTable td {
    padding: 12px 14px;
    border-color: #dbe4ee;
    font-size: 0.95rem;
    line-height: 1.45;
}

#sentimentTable th:first-child,
#sentimentTable td:first-child {
    width: 56px;
}

#sentimentTable th:nth-child(2),
#sentimentTable td:nth-child(2) {
    width: 132px;
}

#sentimentTable th:nth-child(3),
#sentimentTable td:nth-child(3) {
    width: 28%;
}

#sentimentTable th:nth-child(4),
#sentimentTable td:nth-child(4) {
    width: 24%;
}

#sentimentTable th:nth-child(5),
#sentimentTable td:nth-child(5) {
    width: 30%;
}

#sentimentTable th:nth-child(6),
#sentimentTable td:nth-child(6) {
    width: 110px;
}

#sentimentTable thead th {
    background: #183a63 !important;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    vertical-align: middle;
}

#sentimentTable tbody tr:nth-child(even) {
    background: #f8fbff;
}

#sentimentTable tbody tr:hover {
    background: #eef6ff;
}

.comment-cell,
.normalized-cell,
.label-cell {
    word-break: break-word;
    white-space: normal;
}

.comment-cell,
.normalized-cell {
    text-align: left;
}

.comment-cell {
    font-weight: 500;
    color: #1f2937;
}

.normalized-cell {
    color: #334155;
}

.label-cell,
.sentiment-cell {
    text-align: center;
}

.label-cell {
    font-size: 0.84rem;
    color: #243b53;
}

.sentiment-cell {
    white-space: nowrap;
    vertical-align: top !important;
    font-weight: 700;
    text-transform: capitalize;
}

.num-cell {
    text-align: center;
    font-weight: 600;
    vertical-align: top !important;
    color: #52606d;
}

@media (max-width: 1200px) {
    #sentimentTable {
        min-width: 980px;
    }
}

.viz-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.source-card {
    display: flex;
    gap: 16px;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px;
    margin: 10px 0 18px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.source-media {
    width: 220px;
    height: 140px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.source-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.source-info {
    flex: 1;
}

.source-title {
    font-weight: 700;
    margin-bottom: 6px;
}

.source-desc {
    color: #444;
    margin-bottom: 6px;
}

.source-meta {
    color: #666;
    margin-bottom: 8px;
}

.source-link a {
    font-weight: 600;
    text-decoration: none;
}

.results-actions {
    margin: 10px 0 14px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.results-actions .btn {
    min-width: 126px;
    height: 34px;
    border-radius: 18px;
    font-size: 0.88rem;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.result-logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.result-logo {
    max-height: 88px;
    width: auto;
}

.result-header-banner {
    margin: -20px -20px 14px -20px;
    padding: 18px 14px 12px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, #073b77 0%, #1962ab 52%);
}

.result-title {
    color: #ffffff;
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.save-info {
    margin: 10px 0 14px 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px dashed #bcc9d6;
    background: #f5faff;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 900px) {
    .mode-grid {
        grid-template-columns: 1fr;
    }

    .viz-card-wide {
        width: 100%;
    }

    .viz-card-triple {
        width: 100%;
    }
}

.viz-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 8px 10px;
    width: 280px;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.viz-card-wide {
    width: 430px;
}

.viz-card-triple {
    width: 360px;
    min-height: 220px;
}

.chart-container-wide {
    max-width: 100%;
    width: 100%;
    height: 190px;
}

.viz-title {
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

.chart-note {
    margin: 8px 4px 2px;
    font-size: 0.84rem;
    line-height: 1.35;
    color: #334155;
    background: #eef4fb;
    border: 1px solid #dbe7f3;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: left;
}

.wordcloud-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
}

.wordcloud-container img {
    max-width: 230px;
    max-height: 180px;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

#sentimentBarChart {
    width: 200px !important;
    height: 170px !important;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
    padding-top: 8px;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.show {
    display: flex;
}

.loading-card {
    background: #ffffff;
    padding: 20px 22px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 360px;
    max-width: 420px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.24);
}

.loading-visual {
    position: relative;
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 74px;
}

.loading-visual-icon {
    position: relative;
    width: 54px;
    height: 54px;
}

.loading-logo-spinner {
    background:
        radial-gradient(circle at center, #cfd6df 0%, #b8c1cd 58%, #9ea9b8 100%);
    box-shadow:
        inset 0 0 0 4px #2563eb,
        inset 0 0 0 5px rgba(255, 255, 255, 0.18),
        0 10px 22px rgba(37, 99, 235, 0.24);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: loadingSpin 2.2s linear infinite;
}

.loading-logo-spinner img {
    width: 82%;
    height: 82%;
    object-fit: contain;
    display: block;
    filter:
        drop-shadow(0 3px 8px rgba(37, 99, 235, 0.2))
        contrast(1.08)
        saturate(1.05);
}

.loading-visual-glow {
    position: absolute;
    inset: auto 10px 4px;
    height: 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.16);
    filter: blur(6px);
}

.loading-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.loading-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.loading-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.45;
}

.loading-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 2px;
}

.loading-progress-track {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: #dbeafe;
    overflow: hidden;
    flex: 1 1 auto;
}

.loading-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
    transition: width 0.35s ease;
}

.loading-progress-value {
    min-width: 40px;
    font-size: 0.92rem;
    font-weight: 800;
    color: #1d4ed8;
    text-align: right;
}

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

@keyframes loadingSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.risk-panel {
    margin: 12px 0 18px 0;
    padding: 12px 14px;
    border: 1px solid #dfe4ea;
    border-radius: 10px;
    background: #f8fafc;
    text-align: center;
}

.risk-metrics {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.risk-item {
    margin-bottom: 6px;
}

.risk-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 6px;
}

.risk-recs {
    margin: 0;
    padding-left: 18px;
    text-align: left;
    display: inline-block;
}

/* Tambahan untuk dashboard versi sekarang */
.dashboard-shell {
    --sidebar-width: 290px;
    --sidebar-width-collapsed: 92px;
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    transition: grid-template-columns 0.24s ease;
}

.dashboard-shell.sidebar-collapsed {
    grid-template-columns: var(--sidebar-width-collapsed) 1fr;
}

.dashboard-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px 14px 18px;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.96) 0%,
        rgba(12, 22, 48, 0.94) 34%,
        rgba(12, 22, 48, 0.78) 68%,
        rgba(12, 22, 48, 0.34) 100%
    );
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: hidden;
    transition: padding 0.24s ease;
}

.dashboard-sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.02) 28%,
        rgba(255, 255, 255, 0.01) 56%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
}

.dashboard-sidebar > * {
    position: relative;
    z-index: 1;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 4px;
    padding: 0 6px;
}

.sidebar-brand-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 2px;
    transition: opacity 0.18s ease;
}

.sidebar-logo {
    width: 88px;
    height: 88px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 88px;
}

.sidebar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sidebar-app {
    font-size: 1.22rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    margin-top: 0;
}

.sidebar-sub {
    margin-top: 6px;
    font-size: 0.92rem;
    line-height: 1.4;
    color: #c7d2fe;
    max-width: 150px;
}

.sidebar-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 34px;
    height: 72px;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: background 0.2s ease, right 0.2s ease, opacity 0.2s ease;
}

.sidebar-toggle:hover {
    background: rgba(30, 41, 59, 0.98);
}

.sidebar-toggle i {
    font-size: 1.05rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.94);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.sidebar-link span {
    transition: opacity 0.18s ease;
}

.sidebar-link i {
    font-size: 1rem;
    opacity: 0.95;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: rgba(79, 70, 229, 0.3);
    text-decoration: none;
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    color: #cbd5e1;
    font-size: 0.88rem;
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

.sidebar-footer-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    text-align: center;
}

.sidebar-user-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.18);
    color: #bfdbfe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex: 0 0 42px;
}

.sidebar-user-copy {
    min-width: 0;
}

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

.dashboard-shell.sidebar-collapsed .dashboard-sidebar {
    padding-left: 10px;
    padding-right: 10px;
}

.dashboard-shell.sidebar-collapsed .sidebar-brand {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin-bottom: 0;
}

.dashboard-shell.sidebar-collapsed .sidebar-brand-copy,
.dashboard-shell.sidebar-collapsed .sidebar-link span,
.dashboard-shell.sidebar-collapsed .sidebar-user-copy,
.dashboard-shell.sidebar-collapsed .sidebar-footer-meta {
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
    min-width: 0;
    overflow: hidden;
}

.dashboard-shell.sidebar-collapsed .sidebar-logo {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
}

.dashboard-shell.sidebar-collapsed .sidebar-toggle {
    right: 6px;
}

.dashboard-shell.sidebar-collapsed .sidebar-nav {
    align-items: center;
    margin-top: -2px;
}

.dashboard-shell.sidebar-collapsed .sidebar-link {
    justify-content: center;
    gap: 0;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 16px;
}

.dashboard-shell.sidebar-collapsed .sidebar-link i {
    font-size: 1.15rem;
}

.dashboard-shell.sidebar-collapsed .sidebar-footer {
    align-items: center;
}

.dashboard-shell.sidebar-collapsed .sidebar-user-card {
    justify-content: center;
    width: 56px;
    padding: 10px 0;
}

.sidebar-user-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #93c5fd;
    margin-bottom: 2px;
}

.sidebar-user-copy strong {
    display: block;
    color: #ffffff;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.sidebar-user-email {
    margin-top: 2px;
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.sidebar-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #60a5fa;
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0.18);
}

.dashboard-main-area {
    padding: 12px 14px 20px;
}

.dashboard-topbar,
.panel-card,
.kpi-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #dbe4ee;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.dashboard-topbar {
    padding: 12px 18px 13px;
    border-radius: 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.12;
}

.dashboard-subtitle {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.4;
}

.dashboard-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.toolbar-pill {
    min-width: 114px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid #dbe3f0;
    border-radius: 14px;
    color: #334155;
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn {
    border-radius: 14px;
    min-width: 132px;
    height: 36px;
    padding: 0 16px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.toolbar-btn.btn-light {
    background: #e5e7eb;
    border: 1px solid #cbd5e1;
    color: #111827;
}

.toolbar-btn.btn-light:hover {
    background: #d1d5db;
    border-color: #94a3b8;
    color: #0f172a;
}

.toolbar-btn-return {
    background: #2f2f73;
    border: 1px solid #2f2f73;
    color: #ffffff;
}

.toolbar-btn-return:hover {
    background: #272761;
    border-color: #272761;
    color: #ffffff;
}

.toolbar-btn-danger {
    background: #dc2626;
    border: 1px solid #dc2626;
    color: #ffffff;
}

.toolbar-btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    color: #ffffff;
}

.panel-card {
    border-radius: 18px;
    padding: 14px;
    margin-bottom: 16px;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.panel-head h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.panel-head p {
    margin: 4px 0 0;
    color: #64748b;
}

.panel-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.panel-actions-top {
    justify-content: flex-end;
    margin-bottom: 8px;
}

.panel-chip {
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 800;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.kpi-card {
    border-radius: 18px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.kpi-positive {
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.kpi-neutral {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.kpi-negative {
    background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
}

.kpi-positive .kpi-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.kpi-neutral .kpi-icon {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.kpi-negative .kpi-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.kpi-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #334155;
}

.kpi-value {
    font-size: 1.85rem;
    line-height: 1.05;
    font-weight: 800;
    color: #0f172a;
}

.kpi-meta {
    margin-top: 4px;
    font-size: 0.88rem;
    color: #64748b;
}

.source-preview-panel {
    overflow: hidden;
}

.source-preview-wrap {
    display: flex;
    min-height: 340px;
    padding: 10px 0 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 18px;
}

.source-preview-stage {
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 24px;
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

.source-preview-visual {
    flex: 0 0 340px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.source-preview-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: stretch;
}

.source-preview-media {
    position: relative;
    width: min(100%, 340px);
    aspect-ratio: 4 / 5;
    border-radius: 18px;
    overflow: hidden;
    display: block;
    box-shadow: 0 24px 44px rgba(15, 23, 42, 0.12);
    border: 1px solid #e5edf6;
}

.source-preview-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.source-preview-play {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 62px;
    height: 62px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-size: 1.85rem;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.24);
}

.source-preview-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 16px 16px 14px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.78) 100%);
    color: #ffffff;
}

.source-preview-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    font-size: 0.78rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.source-preview-hint {
    font-size: 0.84rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
}

.source-preview-phone {
    width: min(100%, 334px);
    min-height: 210px;
    padding: 24px 22px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid #eef2f7;
    text-align: center;
}

.source-preview-icon {
    font-size: 3.2rem;
    line-height: 1;
    color: #111111;
    margin-bottom: 14px;
}

.source-preview-phone h4 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    font-weight: 900;
    color: #0f172a;
}

.source-preview-phone p {
    margin: 0 auto 8px;
    max-width: 230px;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #334155;
}

.source-preview-account {
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
}

.source-preview-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 172px;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff3158 0%, #ff4d6d 100%);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
}

.source-preview-link-btn:hover {
    color: #ffffff;
    text-decoration: none;
}

.source-detail-panel {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 14px;
    padding: 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
}

.source-detail-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #ffffff;
    font-size: 1.25rem;
}

.source-narrative-panel {
    width: 100%;
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(180deg, #fffdf7 0%, #ffffff 100%);
    border: 1px solid #f1e4b8;
    box-shadow: 0 10px 26px rgba(148, 163, 184, 0.08);
    min-height: 100%;
}

.source-narrative-label {
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9a6700;
}

.source-narrative-title {
    margin-bottom: 10px;
    font-size: 1.02rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.6;
}

.source-narrative-text {
    font-size: 0.93rem;
    line-height: 1.8;
    color: #334155;
    white-space: pre-wrap;
    word-break: break-word;
}

.source-narrative-author {
    margin-top: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748b;
}

.source-detail-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.source-detail-meta {
    margin-top: 4px;
    color: #475569;
    word-break: break-word;
}

.trend-layout {
    display: grid;
    gap: 2px;
}

.trend-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.56fr) minmax(400px, 1.06fr);
    gap: 14px;
    align-items: stretch;
}

.sentiment-trend-chart {
    height: 446px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hero-chart-wrap {
    height: 316px;
    min-height: 316px;
    flex: 0 0 316px;
}

.trend-chart-help {
    margin: 0 0 10px;
    padding: 9px 12px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1d4ed8;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.35;
}

.trend-grouping-note {
    margin: -1px 0 10px;
    font-size: 0.82rem;
    line-height: 1.38;
    color: #475569;
}

.trend-side-stack {
    display: grid;
    grid-template-rows: 196px minmax(0, 1fr);
    gap: 12px;
    height: 446px;
    min-height: 446px;
    overflow: hidden;
}

.trend-side-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.trend-side-head {
    margin-bottom: 12px;
}

.trend-side-head h3 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
}

.trend-side-head p {
    margin: 4px 0 0;
    color: #64748b;
    line-height: 1.45;
}

.trend-stat-card {
    padding: 10px 14px 14px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.78);
    margin-bottom: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.trend-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.trend-stat-positif {
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.trend-stat-netral {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.trend-stat-negatif {
    background: linear-gradient(180deg, #fff1f2 0%, #ffffff 100%);
}

.trend-stat-label {
    font-size: 0.9rem;
    font-weight: 800;
    color: #334155;
}

.trend-stat-value {
    margin-top: 0;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    color: #0f172a;
}

.trend-stat-meta {
    margin-top: 2px;
    font-size: 0.88rem;
    color: #64748b;
}

.trend-stat-desc {
    margin-top: 6px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #475569;
}

.trend-stat-comment-list {
    display: grid;
    gap: 8px;
}

.trend-stat-comment-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.trend-stat-comment-rank {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.82rem;
    font-weight: 900;
}

.trend-stat-comment-text {
    color: #1e293b;
    font-size: 0.9rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.trend-comment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

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

.trend-context-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
}

.trend-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 6px;
}

.trend-card-value {
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
    color: #0f172a;
    white-space: nowrap;
}

.trend-context-session {
    margin: 4px 0 0;
    font-size: 0.84rem;
    font-weight: 700;
    color: #64748b;
}

.trend-context-subtitle {
    margin-bottom: 10px;
    font-size: 0.86rem;
    line-height: 1.4;
    color: #475569;
}

.trend-context-note {
    margin-bottom: 10px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: #64748b;
}

.trend-keyword-panel,
.trend-summary-panel,
.trend-distribution-panel {
    min-height: 0;
    padding: 18px 14px 22px;
    border-radius: 18px;
    height: 100%;
}

.trend-keyword-panel,
.trend-distribution-panel {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.trend-summary-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    min-height: 0;
}

.trend-summary-top {
    padding: 18px 16px 0;
}

.trend-insight-caption {
    margin-top: 2px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.45;
    color: #334155;
}

.trend-insight-meta {
    margin-top: 8px;
    font-size: 0.81rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.trend-comment-empty {
    padding: 16px;
    border-radius: 16px;
    border: 1px dashed #cbd5e1;
    background: rgba(255, 255, 255, 0.8);
    color: #64748b;
    text-align: center;
}

.trend-keyword-panel .panel-head,
.trend-summary-panel .panel-head,
.trend-distribution-panel .panel-head {
    margin-bottom: 6px;
    width: 100%;
}

.trend-keyword-panel .panel-head h3,
.trend-summary-panel .panel-head h3,
.trend-distribution-panel .panel-head h3 {
    font-size: 1.06rem;
    line-height: 1.25;
}

.trend-keyword-panel .panel-head p,
.trend-summary-panel .panel-head p,
.trend-distribution-panel .panel-head p {
    font-size: 0.84rem;
    line-height: 1.36;
    margin-top: 5px;
    overflow-wrap: anywhere;
}

.trend-keyword-chart-wrap {
    flex: 1 1 auto;
    min-height: 104px;
}

.trend-distribution-panel .donut-wrap {
    flex: 1 1 auto;
    min-height: 62px;
    max-height: 72px;
    margin-top: 6px;
}

.trend-distribution-panel {
    padding-bottom: 28px;
}

.trend-comments-panel {
    margin-top: 0;
}

.trend-comment-card {
    display: flex;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, rgba(255, 255, 255, 0.98) 100%);
    border: 1px solid #e2e8f0;
    padding: 0;
    overflow: hidden;
    height: 100%;
}

.trend-comment-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.trend-comment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.trend-comment-like {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
}

.batch-comment-grid .trend-stat-comment-item {
    height: 100%;
}

.score-hero {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.05;
    margin-top: 0;
    margin-bottom: 2px;
    width: 100%;
}

.score-hero-positive {
    color: #16a34a;
}

.score-hero-negative {
    color: #dc2626;
}

.score-hero-neutral {
    color: #475569;
}

@media (max-width: 1180px) {
    .trend-top-grid {
        grid-template-columns: 1fr;
        height: auto;
    }

    .trend-side-top,
    .trend-comment-grid {
        grid-template-columns: 1fr;
    }

    .batch-comment-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .hero-chart-wrap {
        height: 340px;
        min-height: 340px;
    }

    .trend-side-stack {
        height: auto;
        min-height: 0;
        grid-template-rows: auto auto;
    }

    .trend-keyword-panel,
    .trend-distribution-panel {
        height: auto;
        min-height: 182px;
    }
}

.score-caption {
    margin-top: 4px;
    font-weight: 700;
    color: #0f172a;
    font-size: 1rem;
    width: 100%;
    line-height: 1.4;
}

.plain-summary-box {
    margin: 10px 14px 14px;
    padding: 12px 13px;
    border-radius: 16px 16px 18px 18px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border: 1px solid #e2e8f0;
    color: #334155;
    line-height: 1.5;
    font-size: 0.9rem;
    width: auto;
    flex: 1 1 auto;
    min-height: 0;
    box-sizing: border-box;
    align-self: stretch;
    margin-bottom: 0;
    overflow: auto;
    overflow-wrap: anywhere;
}

.keyword-chart-wrap,
.donut-wrap {
    height: 150px;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.event-table-wrap {
    overflow-x: auto;
}

.dashboard-event-table th {
    font-size: 0.85rem;
    color: #475569;
}

.dashboard-event-table td {
    font-size: 0.9rem;
    color: #1e293b;
}

.source-distribution-total-row,
.source-risk-total-row {
    background: #f8fafc;
}

.analysis-summary-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.analysis-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.recommendation-card {
    padding: 14px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
    border: 1px solid #dbeafe;
}

.recommendation-card p {
    margin: 8px 0 0;
    color: #334155;
    line-height: 1.55;
}

.plain-recommendation-title {
    font-weight: 700;
    color: #0f172a;
}

.dashboard-rec-list {
    margin-top: 12px;
}

.simple-rec-item {
    margin-bottom: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.table-panel {
    padding: 18px;
    min-height: 84vh;
    display: flex;
    flex-direction: column;
    margin-top: -6px;
}

.table-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.table-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-right: auto;
    flex: 1;
}

.table-heading .form-select {
    min-width: 170px;
    width: auto;
    margin-left: 0;
}

.table-tools {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.toolbar-inline-form {
    display: inline-flex;
    margin: 0;
}

.dashboard-inline-alert {
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
}

.selected-batch-indicator {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid #dbe4ee;
    background: #f8fafc;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 700;
}

.sentiment-distribution-legend {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 18px;
    padding-bottom: 16px;
    justify-content: center;
    align-content: flex-start;
}

.distribution-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    line-height: 1.25;
    color: #334155;
    font-weight: 700;
    white-space: nowrap;
}

.distribution-swatch {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    flex: 0 0 11px;
}

.distribution-legend-item.positive .distribution-swatch {
    background: #22c55e;
}

.distribution-legend-item.neutral .distribution-swatch {
    background: #94a3b8;
}

.distribution-legend-item.negative .distribution-swatch {
    background: #ef4444;
}

.segment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.table-row-selected-batch {
    background: rgba(219, 234, 254, 0.45);
}

.table-row-selected-batch td {
    box-shadow: inset 0 1px 0 rgba(191, 219, 254, 0.7), inset 0 -1px 0 rgba(191, 219, 254, 0.7);
}

.dashboard-table-wrap {
    flex: 1;
    min-height: 68vh;
    max-height: 68vh;
    width: 100%;
}

.table-panel.table-panel-compact {
    min-height: auto;
}

.dashboard-table-wrap.dashboard-table-wrap-compact {
    flex: 0 0 auto;
    min-height: auto;
    max-height: none;
}

.empty-card-note {
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
    color: #64748b;
    border: 1px dashed #cbd5e1;
}

.sentiment-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
}

.sentiment-positif {
    color: #166534;
    background: #dcfce7;
}

.sentiment-negatif {
    color: #991b1b;
    background: #fee2e2;
}

.sentiment-netral {
    color: #475569;
    background: #e2e8f0;
}

.dashboard-hidden {
    display: none !important;
}

@media (max-width: 1400px) {
    .kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        padding-bottom: 12px;
        position: static;
        height: auto;
        overflow: visible;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .trend-top-grid,
    .trend-comment-grid,
    .report-grid,
    .source-preview-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
        background-position: top center;
    }

    .form-container {
        margin: 26px 14px;
        padding: 18px 16px 20px;
        border-radius: 18px;
        max-width: none;
        background: linear-gradient(180deg, rgba(7, 59, 119, 0.94) 0%, rgba(25, 98, 171, 0.9) 53%, rgba(244, 246, 250, 0.95) 53%);
        box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
    }

    .hero-title {
        font-size: clamp(2.15rem, 9vw, 2.85rem);
        letter-spacing: 0.035em;
        line-height: 1;
    }

    .hero-subtitle {
        width: 100%;
        max-width: 100%;
        padding: 7px 12px;
        font-size: 0.7rem;
        line-height: 1.35;
        white-space: normal;
        transform: translateY(-5px);
        border-radius: 999px;
    }

    .lead-text {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 16px;
        color: #f8fbff;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    }

    .mode-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        align-items: stretch;
    }

    .mode-card {
        width: 100%;
        min-height: 220px;
        border-radius: 14px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.18);
    }

    .mode-head {
        padding: 12px 10px 10px;
    }

    .mode-body {
        min-height: 116px;
    }

    .mode-icon {
        font-size: 4rem;
        gap: 6px;
    }

    .data-file {
        font-size: 2.5rem;
        margin-top: 14px;
    }

    .mode-title {
        font-size: 0.96rem;
    }

    .mode-foot {
        padding: 10px 10px 12px;
    }

    .mode-desc {
        font-size: 0.84rem;
        line-height: 1.3;
    }

    .input-panel {
        padding: 14px 12px;
        margin-top: 12px;
        margin-bottom: 10px;
        border-radius: 14px;
    }

    .input-panel .form-label {
        font-size: 0.9rem;
        font-weight: 700;
        margin-bottom: 6px;
    }

    .input-panel .form-control {
        min-height: 44px;
        border-radius: 12px;
        font-size: 0.94rem;
    }

    .auth-form-container,
    .auth-register-container {
        max-width: 520px;
        padding: 16px 14px 18px;
        background: linear-gradient(180deg, rgba(7, 59, 119, 0.94) 0%, rgba(25, 98, 171, 0.9) 54%, rgba(244, 246, 250, 0.95) 54%);
    }

    .auth-form-container {
        background: linear-gradient(180deg, rgba(7, 59, 119, 0.94) 0%, rgba(25, 98, 171, 0.9) 45.5%, rgba(244, 246, 250, 0.95) 45.5%);
    }

    .auth-register-container {
        background: linear-gradient(180deg, rgba(7, 59, 119, 0.94) 0%, rgba(25, 98, 171, 0.9) 40%, rgba(244, 246, 250, 0.95) 40%);
    }

    .auth-logo {
        max-height: 92px !important;
    }

    .auth-form-container .hero-title {
        font-size: clamp(1.85rem, 7vw, 2.55rem);
    }

    .auth-form-container .hero-subtitle {
        font-size: 0.64rem;
    }

    .auth-mini-badge {
        width: 100%;
        justify-content: center;
        padding: 8px 12px;
        font-size: 0.76rem;
        line-height: 1.4;
    }

    .auth-panel {
        padding: 14px 12px 12px;
    }

    .auth-panel-head h2 {
        font-size: 1.3rem;
    }

    .auth-panel-head p,
    .auth-helper,
    .auth-check {
        font-size: 0.88rem;
    }

    .auth-control {
        min-height: 44px;
    }

    .auth-register-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }


    .auth-meta-row {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 16px;
    }

    .auth-meta-row-login {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .auth-side-link-wrap {
        width: 100%;
        justify-content: space-between;
        text-align: left;
    }

    .auth-action-row {
        gap: 10px;
        justify-content: space-between;
    }

    .auth-action-row .btn {
        width: calc(50% - 5px);
        min-width: 0;
    }

    .auth-bottom-link {
        margin-top: 14px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .auth-forgot-link {
        margin-left: auto;
    }

    .auth-guide-link {
        font-size: 0.88rem;
    }

    .auth-developer-copy {
        font-size: 0.75rem;
    }

    .auth-developer-row-outside {
        width: fit-content;
        max-width: calc(100% - 28px);
        margin-bottom: 14px;
        padding: 4px 8px 6px;
    }

    .auth-guide-container {
        max-width: 620px;
    }

    .auth-guide-panel {
        max-width: none;
    }

    .auth-panel-single {
        max-width: none;
    }

    .auth-login-panel {
        margin-top: 8px;
    }

    .auth-panel-head {
        text-align: center;
    }

    .developer-shell {
        padding: 28px 14px 40px;
    }

    .developer-card {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .developer-photo-panel {
        min-height: 340px;
    }

    .developer-content {
        padding: 24px 18px 24px;
    }

    .developer-meta-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .developer-hero-logo {
        width: 96px;
        height: 96px;
    }

    .developer-hero-logo-frame {
        width: 128px;
        height: 128px;
        padding: 12px;
        border-radius: 32px;
    }

    .developer-hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.35rem);
    }

    #urlInputBlock,
    #fileInputBlock {
        min-height: auto;
    }

    .action-row {
        gap: 10px;
        justify-content: space-between;
    }

    .action-row .btn {
        width: calc(50% - 5px);
        min-width: 0;
        height: 44px;
        padding-left: 10px;
        padding-right: 10px;
    }

    #modeChooser {
        padding-top: 8px;
    }

    .auth-topbar {
        padding-right: 48px;
        margin-bottom: 12px;
    }

    .auth-topbar-bottom {
        padding-right: 0;
        justify-content: center;
        margin-top: 4px;
        align-items: center;
    }

    .auth-user-pill {
        width: 100%;
        min-width: 0;
        justify-content: center;
        font-size: 0.84rem;
        text-align: center;
    }

    .auth-logout-btn,
    .auth-refresh-btn {
        min-width: 0;
        flex: 1 1 0;
    }

    .auth-logout-row {
        width: 100%;
        gap: 8px;
    }

    .form-container > img.img-fluid {
        max-height: 124px !important;
        margin-bottom: 2px;
    }

    .dashboard-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .dashboard-sidebar {
        height: auto;
        padding: 14px 12px 12px;
        border-bottom-left-radius: 18px;
        border-bottom-right-radius: 18px;
    }

    .sidebar-brand {
        gap: 12px;
        padding: 0;
        margin-bottom: 2px;
    }

    .sidebar-logo {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }

    .sidebar-app {
        font-size: 1rem;
        white-space: normal;
    }

    .sidebar-sub {
        max-width: none;
        font-size: 0.82rem;
        line-height: 1.35;
    }

    .sidebar-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 8px;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .sidebar-link {
        flex: 0 0 auto;
        padding: 10px 14px;
        border-radius: 999px;
        font-size: 0.9rem;
    }

    .sidebar-footer {
        margin-top: 8px;
        padding-top: 4px;
        font-size: 0.8rem;
    }

    .sidebar-user-card {
        margin-top: 4px;
    }

    .dashboard-main-area {
        padding: 10px;
    }

    .dashboard-topbar,
    .table-panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-topbar,
    .panel-card,
    .kpi-card {
        border-radius: 16px;
    }

    .dashboard-topbar {
        padding: 14px;
        gap: 12px;
    }

    .dashboard-title {
        font-size: 1.32rem;
        line-height: 1.2;
    }

    .dashboard-subtitle {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .dashboard-toolbar {
        width: 100%;
        justify-content: stretch;
        gap: 8px;
    }

    .toolbar-pill,
    .toolbar-btn {
        width: 100%;
        min-width: 0;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .kpi-card {
        padding: 14px;
        align-items: flex-start;
    }

    .kpi-icon {
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
    }

    .kpi-value {
        font-size: 1.6rem;
    }

    .trend-top-grid,
    .trend-side-top,
    .trend-comment-grid,
    .batch-comment-grid,
    .report-grid {
        grid-template-columns: 1fr;
    }

    .trend-layout {
        gap: 12px;
    }

    .sentiment-trend-chart {
        height: auto;
    }

    .hero-chart-wrap,
    .keyword-chart-wrap,
    .donut-wrap {
        height: 220px;
        min-height: 220px;
    }

    .hero-chart-wrap {
        flex-basis: auto;
    }

    .trend-chart-help,
    .trend-grouping-note {
        font-size: 0.82rem;
    }

    .trend-side-stack {
        grid-template-rows: auto;
        height: auto;
        min-height: 0;
        overflow: visible;
    }

    .trend-keyword-panel,
    .trend-distribution-panel,
    .trend-summary-panel {
        min-height: 0;
        height: auto;
    }

    .trend-summary-top {
        padding: 12px 12px 0;
    }

    .trend-insight-caption {
        font-size: 0.84rem;
    }

    .plain-summary-box {
        margin: 10px 12px 12px;
        font-size: 0.88rem;
        line-height: 1.55;
    }

    .score-hero {
        font-size: 1.8rem;
    }

    .sentiment-distribution-legend {
        gap: 8px;
        padding-bottom: 8px;
    }

    .distribution-legend-item {
        font-size: 0.74rem;
    }

    .source-preview-wrap {
        min-height: auto;
        padding: 8px 0 0;
    }

    .source-preview-stage {
        flex-direction: column;
        gap: 16px;
        padding: 14px;
    }

    .source-preview-visual,
    .source-preview-copy {
        flex: 1 1 auto;
        width: 100%;
    }

    .source-preview-visual {
        justify-content: center;
    }

    .source-preview-media,
    .source-preview-phone {
        width: min(100%, 320px);
    }

    .source-preview-stage {
        min-height: auto;
        padding: 6px 0;
    }

    .source-preview-media {
        width: min(100%, 320px);
        border-radius: 18px;
    }

    .source-narrative-panel {
        padding: 14px;
    }

    .source-narrative-title {
        font-size: 0.98rem;
        line-height: 1.55;
    }

    .source-narrative-text {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .source-detail-panel {
        padding: 13px;
        align-items: center;
    }

    .source-detail-icon {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        flex: 0 0 42px;
    }

    .table-panel {
        padding: 14px 12px;
        min-height: auto;
        margin-top: 0;
    }

    .table-heading,
    .table-tools {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .table-heading .form-select,
    .selected-batch-indicator {
        width: 100%;
        min-width: 0;
    }

    .dashboard-table-wrap {
        min-height: auto;
        max-height: none;
    }

    .dashboard-event-table {
        min-width: 620px;
    }
}

@media (max-width: 576px) {
    .form-container {
        margin: 18px 10px;
        padding: 16px 12px 18px;
        background: linear-gradient(180deg, rgba(7, 59, 119, 0.94) 0%, rgba(25, 98, 171, 0.9) 57%, rgba(244, 246, 250, 0.95) 57%);
    }

    .hero-title {
        font-size: clamp(1.95rem, 10.2vw, 2.45rem);
    }

    .hero-subtitle {
        padding: 7px 10px;
        font-size: 0.64rem;
    }

    .mode-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .auth-topbar {
        padding-right: 44px;
        align-items: stretch;
    }

    .auth-topbar-bottom {
        padding-right: 0;
        align-items: center;
    }

    .auth-user-pill,
    .auth-logout-btn,
    .auth-refresh-btn {
        width: 100%;
    }

    .auth-panel-head h2,
    .auth-panel-head p {
        text-align: center;
    }

    .auth-logout-row {
        flex-direction: column;
        gap: 8px;
    }

    .mode-card {
        min-height: 188px;
    }

    .mode-head {
        padding: 11px 8px 9px;
    }

    .mode-title {
        font-size: 0.88rem;
    }

    .mode-body {
        min-height: 106px;
    }

    .mode-icon {
        font-size: 3.7rem;
    }

    .mode-desc {
        font-size: 0.77rem;
    }

    .action-row .btn {
        width: calc(50% - 4px);
        font-size: 0.92rem;
    }

    .auth-form-container,
    .auth-register-container {
        background: linear-gradient(180deg, rgba(7, 59, 119, 0.94) 0%, rgba(25, 98, 171, 0.9) 56%, rgba(244, 246, 250, 0.95) 56%);
    }

    .auth-form-container {
        background: linear-gradient(180deg, rgba(7, 59, 119, 0.94) 0%, rgba(25, 98, 171, 0.9) 47.5%, rgba(244, 246, 250, 0.95) 47.5%);
    }

    .auth-register-container {
        background: linear-gradient(180deg, rgba(7, 59, 119, 0.94) 0%, rgba(25, 98, 171, 0.9) 46%, rgba(244, 246, 250, 0.95) 46%);
    }

    .auth-logo {
        max-height: 84px !important;
    }

    .auth-form-container .hero-title {
        font-size: clamp(1.62rem, 8vw, 2.1rem);
        letter-spacing: 0.01em;
    }

    .auth-form-container .hero-subtitle {
        font-size: 0.58rem;
        padding: 6px 10px;
    }

    .auth-mini-badge {
        font-size: 0.78rem;
    }

    .auth-action-row .btn {
        width: 100%;
    }

    .dashboard-main-area {
        padding: 8px;
    }

    .dashboard-topbar,
    .panel-card,
    .kpi-card,
    .table-panel {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero-chart-wrap,
    .keyword-chart-wrap,
    .donut-wrap {
        height: 200px;
        min-height: 200px;
    }

    .panel-head h3 {
        font-size: 1.02rem;
    }

    .panel-head p,
    .trend-keyword-panel .panel-head p,
    .trend-summary-panel .panel-head p,
    .trend-distribution-panel .panel-head p {
        font-size: 0.82rem;
    }

    .trend-comment-card,
    .trend-stat-comment-item,
    .simple-rec-item,
    .empty-card-note {
        border-radius: 14px;
    }

    .source-preview-stage {
        gap: 14px;
    }

    .source-preview-phone,
    .source-preview-media {
        width: 100%;
    }
}
