.required-field::before {
    content: "* ";
    color: red;
}

/* ============================================================
   NEWS PREVIEW CARD — Matches Flutter (mobile) design
   ============================================================ */

/* -- Modal overrides (frameless look) -- */
#previewModal .modal-content {
    background: transparent;
    border: none;
    box-shadow: none;
}

#previewModal .modal-body {
    padding: 0;
}

#previewModal .modal-dialog {
    max-width: 420px;
}

/* -- Card shell -- */
.news-preview-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.18);
    background: #fff;
    position: relative;
}

/* -- Close button overlay -- */
.news-preview-close {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 20;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 32px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-preview-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* -- Media band (3:2 aspect ratio) -- */
.news-preview-media {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #d0d0d0;
}

.news-preview-media .carousel,
.news-preview-media .carousel-inner,
.news-preview-media .carousel-item {
    height: 100%;
}

.news-preview-media .carousel-item img,
.news-preview-media .carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradient overlay (transparent → black 30%) */
.news-preview-media .gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.3));
    pointer-events: none;
    z-index: 2;
}

/* Image courtesy chip (top-right) */
.news-preview-media .courtesy-chip {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.courtesy-chip .courtesy-text {
    background: rgba(0, 0, 0, 0.6);
    border: 0.5px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    padding: 3px 8px;
    color: #fff;
    font-size: 10px;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}

.courtesy-chip .courtesy-text.visible {
    display: inline-block;
}

.courtesy-chip .courtesy-icon {
    width: 28px;
    height: 28px;
    border-radius: 0 16px 0 16px;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Carousel dot indicators */
.news-preview-media .carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
}

.carousel-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.26);
    transition: background 0.25s ease;
}

.carousel-dots .dot.active {
    background: rgba(255, 255, 255, 0.9);
}

/* Hide default Bootstrap carousel indicators & controls styling */
#previewModal .carousel-control-prev,
#previewModal .carousel-control-next {
    z-index: 4;
    width: 15%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.news-preview-media:hover .carousel-control-prev,
.news-preview-media:hover .carousel-control-next {
    opacity: 0.7;
}

/* -- Source / Courtesy Bar -- */
.news-preview-source-bar {
    height: 36px;
    width: 100%;
    background: #E1F7FB;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

.news-preview-source-bar span {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #007bff;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* -- Content area -- */
.news-preview-content {
    background: #f8f9fa;
    padding: 14px 14px 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Title */
.news-preview-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 19px;
    line-height: 1.3;
    letter-spacing: -0.5px;
    color: rgba(0, 0, 0, 0.95);
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Summary */
.news-preview-summary {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 15px;
    line-height: 1.46;
    letter-spacing: 0.12px;
    color: rgba(0, 0, 0, 0.55);
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 12;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Published time */
.news-preview-published {
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: #757575;
    letter-spacing: 0.2px;
    margin-top: auto;
    padding-top: 6px;
}

/* ============================================================
   INSIGHT PREVIEW CARD — Matches Flutter insight_card.dart
   Full-bleed media, dark bg, dots at TOP, no text section
   ============================================================ */

.insight-preview-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.25);
    background: #000;
    position: relative;
}

.insight-preview-media {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: #111;
}

.insight-preview-media .carousel,
.insight-preview-media .carousel-inner,
.insight-preview-media .carousel-item {
    height: 100%;
}

.insight-preview-media .carousel-item img,
.insight-preview-media .carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Insight gradient — subtle bottom gradient for depth */
.insight-preview-media .gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.35));
    pointer-events: none;
    z-index: 2;
}

/* Insight carousel dots — at TOP, pill-shaped active indicator */
.insight-preview-media .carousel-dots {
    position: absolute;
    top: 16px;
    bottom: auto;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
}

.insight-preview-media .carousel-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.26);
    transition: all 0.25s ease;
}

.insight-preview-media .carousel-dots .dot.active {
    width: 16px;
    background: rgba(255, 255, 255, 1.0);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

/* Insight carousel controls */
.insight-preview-media .carousel-control-prev,
.insight-preview-media .carousel-control-next {
    z-index: 4;
    width: 15%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.insight-preview-media:hover .carousel-control-prev,
.insight-preview-media:hover .carousel-control-next {
    opacity: 0.7;
}

/* ============================================================
   AD PREVIEW CARD — Matches Flutter ad_card.dart
   Full-bleed media, dots at BOTTOM, no text section
   ============================================================ */

.ad-preview-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
    background: #fff;
    position: relative;
}

.ad-preview-media {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    background: #e0e0e0;
}

.ad-preview-media .carousel,
.ad-preview-media .carousel-inner,
.ad-preview-media .carousel-item {
    height: 100%;
}

.ad-preview-media .carousel-item img,
.ad-preview-media .carousel-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ad carousel dots — at BOTTOM, circular 8px */
.ad-preview-media .carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
    pointer-events: none;
}

.ad-preview-media .carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: background 0.25s ease;
}

.ad-preview-media .carousel-dots .dot.active {
    background: rgba(255, 255, 255, 0.9);
}

/* Ad carousel controls */
.ad-preview-media .carousel-control-prev,
.ad-preview-media .carousel-control-next {
    z-index: 4;
    width: 15%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.ad-preview-media:hover .carousel-control-prev,
.ad-preview-media:hover .carousel-control-next {
    opacity: 0.7;
}

/* ============================================================
   MEDIA UPLOAD MANAGER (Create/Edit)
   Drag & Drop, Replace, Delete styles
   ============================================================ */
.media-item {
    cursor: grab;
    transition: opacity 0.2s, transform 0.2s;
    position: relative;
}
.media-item:active {
    cursor: grabbing;
}
.media-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
    border: 2px dashed #007bff;
    z-index: 10;
}
.media-item.drag-over {
    border: 2px solid #28a745;
    border-radius: 4px;
}
.media-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
}
.media-item img, .media-item video {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Common Admin Validation & UI Elements*/

.validation-error-circle {
    width: 80px;
    height: 80px;
    border: 4px solid #f27474;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #f27474;
}

.success-done-circle {
    width: 80px;
    height: 80px;
    border: 4px solid #a5dc86;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #a5dc86;
}

.required-star {
    color: red;
    font-weight: bold;
    margin: 0 4px;
}

.custom-file-label::after {
    content: "Browse" !important;
}

.preview-card {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    background: #fff;
}

.preview-option-box {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 8px;
    background-color: #f9f9f9;
    font-weight: 500;
}

/* ============================================================
   LOGOS & BRANDING
   ============================================================ */
.login-logo-img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    margin: 10px auto;
    display: block;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 10px;
}