:root {
    --widget-primary: #2563eb;
    --widget-primary-dark: #1d4ed8;
    --widget-soft: #eff6ff;
    --widget-border: #e2e8f0;
    --widget-text: #0f172a;
    --widget-muted: #64748b;
    --widget-bg: #f8fafc;
    --widget-white: #ffffff;
    --widget-success: #15803d;
    --widget-danger: #b91c1c;
}

.widget-page {
    background: var(--widget-bg);
    min-height: 100vh;
}

.widget-container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.widget-hero {
    background:
        linear-gradient(
            135deg,
            #eff6ff 0%,
            #ffffff 55%,
            #eef2ff 100%
        );
    border-bottom: 1px solid var(--widget-border);
    padding: 54px 0 50px;
    text-align: center;
}

.widget-badge,
.panel-label {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--widget-primary);
}

.widget-badge {
    background: #dbeafe;
    padding: 7px 12px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.widget-hero h1 {
    margin: 0;
    color: var(--widget-text);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
}

.widget-hero p {
    max-width: 720px;
    margin: 16px auto 0;
    color: var(--widget-muted);
    line-height: 1.7;
    font-size: 16px;
}

.widget-content {
    padding: 46px 0 70px;
}

.widget-section-heading {
    margin-bottom: 22px;
}

.widget-section-heading h2 {
    margin: 0 0 7px;
    color: var(--widget-text);
    font-size: 24px;
}

.widget-section-heading p {
    margin: 0;
    color: var(--widget-muted);
}

.widget-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

.widget-type-card {
    appearance: none;
    width: 100%;
    text-align: left;
    border: 1px solid var(--widget-border);
    background: var(--widget-white);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: .2s ease;
}

.widget-type-card:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
}

.widget-type-card.active {
    border-color: var(--widget-primary);
    background: var(--widget-soft);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .08);
}

.widget-type-card.development {
    opacity: .72;
}

.widget-type-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: #dbeafe;
    color: var(--widget-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-bottom: 13px;
}

.widget-type-card h3 {
    margin: 0 0 6px;
    font-size: 16px;
    color: var(--widget-text);
}

.widget-type-card p {
    margin: 0;
    color: var(--widget-muted);
    line-height: 1.5;
    font-size: 13px;
}

.widget-status {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.widget-loading {
    grid-column: 1 / -1;
    background: var(--widget-white);
    border: 1px solid var(--widget-border);
    padding: 25px;
    text-align: center;
    border-radius: 14px;
    color: var(--widget-muted);
}

.widget-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.widget-panel,
.widget-result {
    background: var(--widget-white);
    border: 1px solid var(--widget-border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .04);
}

.widget-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 24px;
}

.widget-panel-header h2,
.widget-result h2 {
    margin: 5px 0 0;
    color: var(--widget-text);
    font-size: 21px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 11px 12px;
    background: #fff;
    color: var(--widget-text);
    font: inherit;
    outline: none;
    transition: .15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--widget-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--widget-muted);
    line-height: 1.4;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.widget-primary-button,
.copy-button {
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: .15s ease;
}

.widget-primary-button {
    width: 100%;
    padding: 13px 18px;
    background: var(--widget-primary);
    color: #fff;
}

.widget-primary-button:hover:not(:disabled) {
    background: var(--widget-primary-dark);
}

.widget-primary-button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.preview-panel {
    position: sticky;
    top: 20px;
}

.preview-area {
    min-height: 330px;
    border-radius: 14px;
    padding: 30px;
    background:
        linear-gradient(45deg, #f1f5f9 25%, transparent 25%),
        linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f1f5f9 75%),
        linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
    background-size: 20px 20px;
    background-position:
        0 0,
        0 10px,
        10px -10px,
        -10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ojshub-preview {
    width: 100%;
    max-width: 440px;
    box-sizing: border-box;
    border-radius: 14px;
    padding: 20px;
    transition: .2s ease;
}

.ojshub-preview.theme-light {
    background: #fff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.ojshub-preview.theme-blue {
    background: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

.ojshub-preview.theme-dark {
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid #334155;
}

.ojshub-preview.theme-minimal {
    background: #fff;
    color: #0f172a;
    border-left: 4px solid #2563eb;
    border-radius: 3px;
}

.ojshub-preview.layout-compact {
    max-width: 300px;
    padding: 15px;
}

.ojshub-preview.layout-standard {
    max-width: 440px;
}

.ojshub-preview.layout-wide {
    max-width: 100%;
}

.preview-brand {
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 9px;
}

.ojshub-preview h3 {
    margin: 0 0 13px;
    font-size: 19px;
}

.preview-body {
    font-size: 14px;
    line-height: 1.6;
}

.preview-body strong {
    display: block;
    margin-bottom: 4px;
}

.preview-note {
    margin-top: 14px;
    color: var(--widget-muted);
    font-size: 12px;
    line-height: 1.5;
}

.widget-message {
    padding: 11px 13px;
    margin-bottom: 16px;
    border-radius: 9px;
    font-size: 13px;
}

.widget-message.success {
    background: #f0fdf4;
    color: var(--widget-success);
    border: 1px solid #bbf7d0;
}

.widget-message.error {
    background: #fef2f2;
    color: var(--widget-danger);
    border: 1px solid #fecaca;
}

.widget-result {
    margin-top: 22px;
}

.result-header p {
    margin: 8px 0 20px;
    color: var(--widget-muted);
}

.embed-code-wrapper {
    position: relative;
}

.embed-code-wrapper textarea {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    border: 1px solid #cbd5e1;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    padding-right: 120px;
    font-family: Consolas, Monaco, monospace;
    line-height: 1.5;
}

.copy-button {
    position: absolute;
    right: 10px;
    top: 10px;
    background: #fff;
    color: #1e40af;
    padding: 8px 11px;
}

.result-meta {
    margin-top: 13px;
    color: var(--widget-muted);
    font-size: 13px;
}

.result-meta code {
    color: var(--widget-primary);
}

@media (max-width: 960px) {
    .widget-types {
        grid-template-columns: repeat(2, 1fr);
    }

    .widget-workspace {
        grid-template-columns: 1fr;
    }

    .preview-panel {
        position: static;
    }
}

@media (max-width: 600px) {
    .widget-container {
        width: min(100% - 22px, 1180px);
    }

    .widget-hero {
        padding: 38px 0;
    }

    .widget-types {
        grid-template-columns: 1fr;
    }

    .widget-panel,
    .widget-result {
        padding: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .preview-area {
        min-height: 260px;
        padding: 18px;
    }
}

/* ============================================================
   SINTA LOOKUP
============================================================ */

.sinta-lookup-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.sinta-lookup-button {
    border: 0;
    border-radius: 10px;
    padding: 0 16px;

    background: #2563eb;
    color: #fff;

    font-weight: 700;
    font-size: 13px;

    cursor: pointer;
}

.sinta-lookup-button:hover {
    background: #1d4ed8;
}

.sinta-lookup-button:disabled {
    opacity: .65;
    cursor: wait;
}

.sinta-lookup-status {
    margin: -5px 0 18px;
    padding: 10px 12px;

    border-radius: 9px;

    font-size: 13px;
}

.sinta-lookup-status.loading {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
}

.sinta-lookup-status.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.sinta-lookup-status.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}


/* ============================================================
   SINTA LOOKUP RESULT
============================================================ */

.sinta-data-result {
    margin-bottom: 20px;

    padding: 15px;

    border: 1px solid #dbeafe;
    border-radius: 12px;

    background: #f8fbff;
}

.sinta-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;

    margin-bottom: 14px;
}

.sinta-result-head strong {
    display: block;

    color: #0f172a;

    font-size: 14px;
    line-height: 1.4;
}

.sinta-found-label {
    display: block;

    margin-bottom: 4px;

    color: #2563eb;

    font-size: 10px;
    font-weight: 800;

    text-transform: uppercase;
    letter-spacing: .05em;
}

.sinta-rank-chip {
    flex: 0 0 auto;

    padding: 6px 10px;

    border-radius: 8px;

    background: #2563eb;
    color: #fff;

    font-size: 12px;
    font-weight: 800;
}

.sinta-result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 8px;
}

.sinta-result-grid > div {
    padding: 9px 10px;

    border: 1px solid #e2e8f0;
    border-radius: 8px;

    background: #fff;
}

.sinta-result-grid span {
    display: block;

    margin-bottom: 3px;

    color: #64748b;

    font-size: 10px;
}

.sinta-result-grid strong {
    color: #0f172a;

    font-size: 13px;
}

.sinta-result-publisher {
    margin-top: 11px;

    color: #64748b;

    font-size: 11px;
    line-height: 1.5;

    text-transform: uppercase;
}


/* ============================================================
   SINTA LIVE PREVIEW
============================================================ */

.ojshub-preview.sinta-live-preview {
    max-width: 440px;

    padding: 0;

    border: 0;
    border-radius: 0;

    background: transparent;
}

.sinta-preview-card {
    width: 100%;

    overflow: hidden;

    border: 1px solid #d5d9df;

    background: #fff;
}

.sinta-preview-main {
    height: 151px;

    position: relative;

    overflow: hidden;

    padding:
        14px
        145px
        12px
        18px;

    background:
        linear-gradient(
            120deg,
            #075b70 0%,
            #08677b 100%
        );
}

.sinta-preview-decoration {
    position: absolute;

    width: 190px;
    height: 190px;

    right: -38px;
    top: -28px;

    border-radius: 50%;
    background: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.sinta-preview-decoration img {
    width: 155px;
    height: 155px;

    object-fit: contain;

    position: relative;

    left: -10px;
    top: 5px;
}

.sinta-preview-name {
    position: relative;
    z-index: 2;

    margin-bottom: 5px;

    color: #d7ff00;

    font-size: 14px;
    font-weight: 700;
    line-height: 1.15;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    white-space: normal;
    overflow: hidden;

    max-height: 33px;
}

.sinta-preview-publisher {
    position: relative;
    z-index: 2;

    height: 20px;

    color: #d7ff00;

    font-size: 8px;
    font-weight: 700;
    line-height: 1.2;

    text-transform: uppercase;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    overflow: hidden;
}

.sinta-preview-rank {
    position: relative;
    z-index: 2;

    margin-top: 2px;

    color: #d7ff00;

    font-size: 47px;
    font-weight: 700;

    line-height: .90;

    letter-spacing: -2px;
}

.sinta-preview-citations {
    position: relative;
    z-index: 2;

    color: #d7ff00;

    font-size: 23px;
    font-weight: 700;

    line-height: 1.05;

    white-space: nowrap;
}

.sinta-preview-footer {
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 17px;

    background: #f8f8f8;

    color: #707070;

    font-size: 11px;
}

.sinta-preview-footer strong {
    color: #2563eb;
}

.sinta-preview-footer span:last-child {
    color: #64748b;
    font-size: 10px;
}


/* EMPTY */

.sinta-preview-empty {
    min-height: 185px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 25px;

    border: 1px dashed #93c5fd;
    border-radius: 12px;

    background: #eff6ff;

    text-align: center;
}

.sinta-preview-empty-icon {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 10px;

    border-radius: 50%;

    background: #2563eb;
    color: #fff;

    font-size: 22px;
    font-weight: 800;
}

.sinta-preview-empty strong {
    color: #0f172a;
}

.sinta-preview-empty span {
    max-width: 260px;

    margin-top: 5px;

    color: #64748b;

    font-size: 12px;
    line-height: 1.5;
}


/* FINAL PREVIEW */

.created-widget-preview {
    margin-top: 24px;

    padding-top: 20px;

    border-top: 1px solid #e2e8f0;
}

.created-preview-title {
    margin-bottom: 12px;

    color: #0f172a;

    font-size: 14px;
    font-weight: 700;
}


/* MOBILE */

@media (max-width: 600px) {

    .sinta-lookup-row {
        grid-template-columns: 1fr;
    }

    .sinta-lookup-button {
        padding: 11px 14px;
    }

    .sinta-preview-main {
        padding-right: 105px;
    }

    .sinta-preview-decoration {
        right: -75px;
    }

    .sinta-preview-rank {
        font-size: 43px;
    }

    .sinta-preview-citations {
        font-size: 18px;
    }

    .sinta-result-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================================
   JOURNAL STATISTICS
============================================================ */

.journal-statistics-preview {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.journal-stats-widget {
    width: 100%;
    max-width: 100%;
    overflow: hidden;

    background: #ffffff;

    border-radius: 12px;

    box-shadow:
        0 5px 18px rgba(15, 23, 42, 0.10);
}


/* ============================================================
   CARDS
============================================================ */

.journal-stats-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    width: 100%;
}

.journal-stat-card {
    min-width: 0;
    height: 145px;

    padding: 14px 9px;

    box-sizing: border-box;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    overflow: hidden;

    color: #ffffff;
}


/* ============================================================
   ICON
============================================================ */

.journal-stat-brand {
    flex: 0 0 34px;

    width: 34px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.journal-stat-brand img {
    display: block;

    width: 38px;
    height: 38px;

    object-fit: contain;
}


/* Wayang sedikit lebih besar */

.stat-sinta-rank .journal-stat-brand img,
.stat-sinta-impact .journal-stat-brand img {
    width: 42px;
    height: 42px;
}


/* ============================================================
   CONTENT
============================================================ */

.journal-stat-content {
    flex: 1 1 auto;

    min-width: 0;

    text-align: right;
}

.journal-stat-content strong {
    display: block;

    margin: 0;

    font-size: 20px;
    line-height: 1.05;
    font-weight: 800;

    letter-spacing: -0.5px;

    white-space: nowrap;

    /*
     * PENTING:
     * jangan ellipsis angka statistik.
     */
    overflow: visible;
    text-overflow: clip;
}

.journal-stat-content span {
    display: block;

    margin-top: 8px;

    font-size: 10px;
    line-height: 1.15;
    font-weight: 600;

    white-space: nowrap;
}


/* ============================================================
   SCOPUS TEXT LOGO
============================================================ */

.journal-stat-text-logo {
    display: block;

    font-size: 12px;
    line-height: 1;
    font-weight: 600;

    white-space: nowrap;
}


/* ============================================================
   GOOGLE SCHOLAR TEMP ICON
============================================================ */

.journal-stat-scholar-logo {
    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.95);

    color: #24b896;

    font-size: 17px;
    font-weight: 800;
}


/* ============================================================
   COLORS
============================================================ */

.stat-scopus {
    background: #f5b914;
}

.stat-sinta-rank {
    background: #1593ad;
}

.stat-sinta-impact {
    background: #e6323b;
}

.stat-scholar {
    background: #2db99d;
}


/* ============================================================
   FOOTER
============================================================ */

.journal-stats-footer {
    width: 100%;
    min-height: 38px;

    box-sizing: border-box;

    padding: 8px 13px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    background: #ffffff;
    color: #64748b;

    font-size: 10px;
    line-height: 1.2;

    white-space: nowrap;
}

.journal-stats-footer strong {
    color: #2563eb;
    font-weight: 800;
}