body {
    background:
        radial-gradient(circle at 12% 10%, rgba(220, 38, 38, 0.12), transparent 30%),
        radial-gradient(circle at 88% 80%, rgba(37, 99, 235, 0.10), transparent 32%),
        var(--bg);
}

.upload-news-page {
    width: 100%;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(360px, 620px) 300px;
    justify-content: center;
    align-items: start;
    gap: 24px;
    padding: 24px;
}

.upload-news-device {
    width: 100%;
    min-height: calc(100dvh - 48px);
    background: var(--bg);
    border-radius: 36px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
    padding: 18px;
}

.upload-news-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.upload-news-icon-btn {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.upload-news-icon-btn ion-icon {
    font-size: 23px;
}

.upload-news-title-box {
    flex: 1;
    min-width: 0;
}

.upload-news-title-box h1 {
    margin: 0;
    color: var(--text);
    font-size: 24px;
    font-weight: 950;
    letter-spacing: -0.5px;
}

.upload-news-title-box p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 750;
}

.upload-news-progress-badge {
    min-width: 58px;
    min-height: 38px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.18);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 950;
}

.login-required-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 24px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.login-required-box ion-icon {
    color: #f97316;
    font-size: 28px;
}

.login-required-box div {
    flex: 1;
}

.login-required-box h3 {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    font-weight: 950;
}

.login-required-box p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 700;
}

.login-required-box a {
    background: #f97316;
    color: #ffffff;
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 950;
    font-size: 13px;
}

.upload-news-form {
    display: grid;
    gap: 16px;
}

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 18px;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
}

.form-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.form-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 17px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-card-icon ion-icon {
    font-size: 24px;
}

.form-card-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    font-weight: 950;
}

.form-card-head p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.form-label {
    display: block;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 950;
    margin: 13px 0 8px;
}

.form-label:first-child {
    margin-top: 0;
}

.no-margin {
    margin: 0;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 14px 0 8px;
}

.label-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.form-control {
    width: 100%;
    border: 1px solid var(--border);
    outline: 0;
    background: #f8fafc;
    color: var(--text);
    border-radius: 18px;
    padding: 13px 14px;
    min-height: 50px;
    font-size: 15px;
    font-weight: 750;
}

.form-control:focus {
    background: #ffffff;
    border-color: rgba(220, 38, 38, 0.55);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.headline-input {
    min-height: 82px;
    resize: vertical;
}

.content-input {
    min-height: 230px;
    resize: vertical;
    line-height: 1.6;
}

.selected-location-box {
    background: rgba(220, 38, 38, 0.05);
    border: 1px solid rgba(220, 38, 38, 0.14);
    border-radius: 22px;
    padding: 14px;
    margin-top: 14px;
}

.selected-location-box div:first-child {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--primary);
}

.selected-location-box div:first-child ion-icon {
    font-size: 18px;
}

.selected-location-box strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 950;
}

.selected-location-box p {
    margin: 8px 0 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 850;
    line-height: 1.4;
}

.location-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.location-pills span {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 7px 10px;
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
}

.current-location-btn {
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-weight: 950;
    margin-bottom: 14px;
}

.current-location-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
}

.media-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.media-picker-card {
    min-height: 132px;
    border: 1px solid var(--border);
    background: #f8fafc;
    border-radius: 24px;
    padding: 16px;
    display: grid;
    place-items: center;
    text-align: center;
    cursor: pointer;
}

.media-picker-card span {
    width: 52px;
    height: 52px;
    border-radius: 20px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.media-picker-card span ion-icon {
    font-size: 28px;
}

.media-picker-card strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 950;
}

.media-picker-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    margin-top: 4px;
}

.selected-files-list {
    width: 100%;
    max-width: 100%;
    display: block;
    margin-top: 13px;
    overflow: hidden;
}

.selected-files-preview-grid {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.selected-media-preview {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
}

.selected-media-thumb {
    width: 100%;
    height: 90px;
    max-height: 90px;
    min-height: 90px;
    overflow: hidden;
    position: relative;
    background: #0f172a;
    border-radius: 14px 14px 0 0;
}

.selected-media-thumb img,
.selected-media-thumb video,
.upload-video-thumb {
    width: 100%;
    height: 90px;
    max-width: 100%;
    max-height: 90px;
    object-fit: cover;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: #0f172a;
}

.upload-video-thumb {
    pointer-events: none;
}

.selected-media-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.75);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
}

.selected-media-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 23px;
    height: 23px;
    border: 0;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    padding: 0;
    cursor: pointer;
}

.selected-media-meta {
    padding: 6px;
    min-width: 0;
    overflow: hidden;
}

.selected-media-meta span {
    display: block;
    color: #dc2626;
    font-size: 9px;
    font-weight: 950;
    margin-bottom: 2px;
}

.selected-media-meta strong {
    display: block;
    color: #0f172a;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-media-meta small {
    display: block;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
}

.selected-media-empty {
    width: 100%;
    min-height: 56px;
    border: 1px dashed #94a3b8;
    border-radius: 18px;
    background: #f8fafc;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
}

.publish-btn {
    width: 100%;
    min-height: 54px;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 15px;
    font-weight: 950;
    box-shadow: 0 16px 34px rgba(220, 38, 38, 0.28);
}

.publish-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.publish-btn ion-icon {
    font-size: 20px;
}

.upload-news-side-panel {
    position: sticky;
    top: 24px;
}

.upload-news-side-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 20px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.10);
}

.upload-news-side-card img {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.upload-news-side-card h2 {
    margin: 16px 0 8px;
    color: var(--text);
    font-size: 22px;
    line-height: 1.22;
}

.upload-news-side-card p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.55;
    font-size: 14px;
    font-weight: 700;
}

.side-action-link {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 16px;
    background: #f8fafc;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    margin-top: 9px;
    font-size: 14px;
    font-weight: 900;
}

.side-action-link:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.upload-progress-modal {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(15, 23, 42, 0.58);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.upload-progress-card {
    width: min(100%, 360px);
    background: #ffffff;
    border-radius: 30px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.upload-progress-circle {
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 950;
    margin-bottom: 16px;
}

.upload-progress-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 21px;
    font-weight: 950;
}

.upload-progress-card p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 750;
}

.upload-progress-bar {
    height: 9px;
    border-radius: 99px;
    background: #e2e8f0;
    overflow: hidden;
    margin: 16px 0 10px;
}

.upload-progress-bar span {
    height: 100%;
    width: 0;
    display: block;
    background: var(--primary);
    border-radius: 99px;
    transition: width 0.16s ease;
}

.upload-progress-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

[hidden] {
    display: none !important;
}

.upload-news-page,
.upload-news-device,
.upload-news-form,
.form-card {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 920px) {
    body {
        background: var(--bg);
    }

    .upload-news-page {
        display: block;
        padding: 0;
        min-height: 100dvh;
    }

    .upload-news-device {
        width: 100%;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px 36px;
    }

    .upload-news-side-panel {
        display: none;
    }
}

@media (max-width: 520px) {
    .form-card {
        border-radius: 24px;
        padding: 16px;
    }

    .media-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .media-picker-card {
        min-height: 122px;
        padding: 13px;
        border-radius: 22px;
    }

    .media-picker-card span {
        width: 48px;
        height: 48px;
    }

    .media-picker-card strong {
        font-size: 13px;
    }
}

@media (max-width: 390px) {
    .selected-files-preview-grid {
        gap: 6px;
    }

    .selected-media-thumb,
    .selected-media-thumb img,
    .selected-media-thumb video,
    .upload-video-thumb {
        height: 80px;
        max-height: 80px;
        min-height: 80px;
    }
}
/* ===== GLOBAL FONT FAMILY ===== */

html,
body,
button,
input,
textarea,
select,
a,
p,
span,
strong,
small,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.existing-media-preview .selected-media-thumb {
    position: relative;
}

.selected-media-existing-badge {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 3;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    border-radius: 999px;
    padding: 5px 8px;
}