/* ePaper Designer Stylesheet */
/* Premium design tokens & aesthetics */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=Courier+Prime:wght@400;700&family=Baloo+Bhai+2:wght@400;600;700&family=Mukta:wght@300;400;600;700&display=swap');

:root {
    /* Color Palette */
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --primary-glow: rgba(79, 70, 229, 0.15);
    
    --secondary: #0f172a;
    --secondary-light: #1e293b;
    --secondary-dark: #020617;
    
    --accent: #f59e0b;
    --accent-hover: #d97706;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    
    /* Neutral colors */
    --light-bg: #f8fafc;
    --light-card: #ffffff;
    --light-border: #e2e8f0;
    --light-text: #334155;
    --light-text-muted: #64748b;
    
    --dark-bg: #0b0f19;
    --dark-card: #151b2d;
    --dark-border: #222f47;
    --dark-text: #f1f5f9;
    --dark-text-muted: #94a3b8;
    
    /* Default: Dark UI Theme (Premium look) */
    --bg-app: var(--dark-bg);
    --bg-panel: var(--dark-card);
    --border-color: var(--dark-border);
    --text-color: var(--dark-text);
    --text-muted: var(--dark-text-muted);
    
    /* Paper Canvas specific (always mimics real newspaper) */
    --canvas-bg: #ffffff;
    --canvas-text: #1a1a1a;
    --canvas-border: #cbd5e1;
    --canvas-text-muted: #475569;
    --canvas-line: #334155;
    
    /* Fonts */
    --font-ui: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
    --font-news-title: 'Playfair Display', serif;
    --font-news-mono: 'Courier Prime', monospace;
    --font-news-devanagari: 'Noto Sans Devanagari', 'Mukta', 'Baloo Bhai 2', sans-serif;
    --font-news-gujarati: 'Noto Sans Gujarati', 'Mukta', sans-serif;
    --font-news-bengali: 'Noto Serif Bengali', 'Noto Sans Bengali', serif;
    --font-news-tamil: 'Noto Serif Tamil', 'Noto Sans Tamil', serif;
    --font-news-telugu: 'Noto Serif Telugu', 'Noto Sans Telugu', serif;
    --font-news-kannada: 'Noto Serif Kannada', 'Noto Sans Kannada', serif;
    --font-news-malayalam: 'Noto Serif Malayalam', 'Noto Sans Malayalam', serif;
    --font-news-urdu: 'Noto Nastaliq Urdu', serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.25);
    
    /* Border Radii */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transition times */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Dimensions */
    --sidebar-w: 280px;
    --inspector-w: 320px;
    --header-h: 70px;
}

/* Light UI Theme Overrides */
body.light-theme {
    --bg-app: var(--light-bg);
    --bg-panel: var(--light-card);
    --border-color: var(--light-border);
    --text-color: var(--light-text);
    --text-muted: var(--light-text-muted);
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-app);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-ui);
}

body {
    background-color: var(--bg-app);
    color: var(--text-color);
    transition: background-color var(--transition-normal), color var(--transition-normal);
    overflow-x: hidden;
    min-height: 100vh;
}

body.editor-mode {
    height: 100vh;
    overflow: hidden;
}

body.editor-mode #app {
    height: 100vh;
    overflow: hidden;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-color);
}

/* App Wrapper */
#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navigation & Views */
.app-view {
    display: none;
    flex: 1;
    width: 100%;
}

.app-view.active {
    display: flex;
    flex-direction: column;
    animation: fadeIn var(--transition-normal);
}

#editorView.app-view.active {
    height: 100vh;
    overflow: hidden;
    min-height: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   1. LANDING PAGE STYLES
   ========================================================================== */
.landing-view {
    background: radial-gradient(circle at 10% 20%, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 1) 90%);
    color: var(--dark-text);
    overflow-y: auto;
    height: 100vh;
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 24px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #a5b4fc 0%, var(--primary-light) 50%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    color: white;
    font-weight: bold;
    -webkit-text-fill-color: white !important;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    color: var(--dark-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--dark-text);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--secondary-dark);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 100px 8% 60px 8%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-tag {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 58px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
    max-width: 900px;
    color: white;
}

.hero h1 span {
    background: linear-gradient(135deg, #a5b4fc 0%, #818cf8 50%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 20px;
    color: var(--dark-text-muted);
    max-width: 700px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

/* Features Grid */
.features {
    padding: 80px 8%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
    color: white;
}

.section-title p {
    color: var(--dark-text-muted);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 30px;
    transition: all var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(30, 41, 59, 0.6);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-light);
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    font-size: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: white;
}

.feature-card p {
    color: var(--dark-text-muted);
    line-height: 1.5;
    font-size: 15px;
}

/* Landing App Preview Mockup */
.app-mockup {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), var(--shadow-glow);
    background: var(--dark-card);
    position: relative;
}

.mockup-header {
    height: 40px;
    background: #1e293b;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
}

.mockup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
}
.mockup-dot:nth-child(2) { background: #f59e0b; }
.mockup-dot:nth-child(3) { background: #10b981; }

.mockup-bar {
    width: 150px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    margin-left: 20px;
}

.mockup-content {
    background: #0f172a;
    padding: 20px;
    height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Beautiful Interactive Grid Canvas Drawing inside landing mockup */
.mockup-newspaper-preview {
    width: 280px;
    height: 380px;
    background: white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: rotate(-3deg) translateY(20px) translateX(-30px);
    transition: var(--transition-normal);
}

.mockup-newspaper-preview-2 {
    width: 280px;
    height: 380px;
    background: white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: rotate(3deg) translateY(20px) translateX(30px);
    position: absolute;
    z-index: 2;
    transition: var(--transition-normal);
}

.mockup-newspaper-preview:hover, .mockup-newspaper-preview-2:hover {
    transform: scale(1.05) rotate(0deg) translateY(0px);
    z-index: 10;
}

.mock-news-hdr {
    border-bottom: 2px double #1a1a1a;
    padding-bottom: 6px;
    text-align: center;
}
.mock-news-hdr .title {
    font-family: var(--font-news-title);
    font-size: 20px;
    font-weight: 900;
    color: #1a1a1a;
}
.mock-news-hdr .subtitle {
    font-size: 8px;
    color: #475569;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.mock-news-row {
    display: flex;
    gap: 8px;
    flex: 1;
}

.mock-news-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mock-news-pic {
    width: 100%;
    height: 70px;
    background: #e2e8f0;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.mock-news-pic::after {
    content: "Image Block";
    position: absolute;
    font-size: 8px;
    color: #94a3b8;
    bottom: 4px;
    left: 4px;
}

.mock-news-head {
    font-family: var(--font-news-title);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
}

.mock-news-txt {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mock-news-line {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    width: 100%;
}
.mock-news-line.w80 { width: 80%; }
.mock-news-line.w60 { width: 60%; }

/* ==========================================================================
   2. AUTHENTICATION VIEW STYLES
   ========================================================================== */
.auth-view {
    background: radial-gradient(circle at 10% 20%, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 1) 90%);
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-container {
    width: 100%;
    max-width: 480px;
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-weight: 600;
    font-size: 16px;
    color: var(--dark-text-muted);
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
}

.auth-tab.active {
    color: var(--primary-light);
    border-color: var(--primary-light);
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.auth-form.active {
    display: flex;
    animation: fadeIn var(--transition-normal);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-color);
    transition: all var(--transition-fast);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ==========================================================================
   3. ONBOARDING (NEW USER WIZARD) STYLES
   ========================================================================== */
.onboarding-view {
    background: radial-gradient(circle at 10% 20%, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 23, 1) 90%);
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.onboarding-container {
    width: 100%;
    max-width: 650px;
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.wizard-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.wizard-steps::before {
    content: "";
    position: absolute;
    top: 15px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.wizard-step-progress {
    position: absolute;
    top: 15px;
    left: 10%;
    width: 0%;
    height: 2px;
    background: var(--primary-light);
    z-index: 1;
    transition: width var(--transition-normal);
}

.wizard-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e293b;
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--dark-text-muted);
    display: grid;
    place-items: center;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 2;
    transition: all var(--transition-normal);
}

.wizard-step.active {
    background: var(--primary);
    border-color: var(--primary-light);
    color: white;
    box-shadow: 0 0 15px var(--primary-glow);
}

.wizard-step.completed {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.wizard-panel {
    display: none;
    flex-direction: column;
    gap: 24px;
}

.wizard-panel.active {
    display: flex;
    animation: fadeIn var(--transition-normal);
}

.theme-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.theme-card {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.4);
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theme-card:hover {
    border-color: var(--primary-light);
    background: rgba(15, 23, 42, 0.6);
}

.theme-card.selected {
    border-color: var(--primary-light);
    background: var(--primary-glow);
}

.theme-card-img {
    height: 120px;
    background: #ffffff;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 6px;
    overflow: hidden;
}

.theme-card-img .mock-header {
    border-bottom: 1px solid #1a1a1a;
    text-align: center;
    font-weight: bold;
    font-size: 8px;
    color: #1a1a1a;
}

.theme-card h4 {
    font-size: 16px;
    font-weight: 600;
}

.theme-card p {
    font-size: 13px;
    color: var(--text-muted);
}

.wizard-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   4. DASHBOARD VIEW STYLES
   ========================================================================== */
.dashboard-view {
    height: 100vh;
}

.dashboard-header {
    height: var(--header-h);
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-panel);
}

.dash-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: white;
    font-weight: 700;
    display: grid;
    place-items: center;
    font-size: 16px;
    border: 2px solid var(--border-color);
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-glow);
    color: var(--primary-light);
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    font-size: 20px;
}

.stat-info h4 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-info .value {
    font-size: 24px;
    font-weight: 700;
}

.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.drafts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.draft-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.draft-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
}

.draft-preview {
    height: 180px;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    padding: 10px;
    overflow: hidden;
    position: relative;
}

.draft-paper-mock {
    width: 110px;
    height: 150px;
    background: white;
    border: 1px solid var(--light-border);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 2px;
    display: flex;
    flex-direction: column;
    padding: 6px;
    gap: 4px;
}

.draft-info {
    padding: 16px;
}

.draft-info h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.draft-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.panel-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.panel-card h3 {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.team-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    font-weight: bold;
    display: grid;
    place-items: center;
}

.member-details h5 {
    font-size: 13px;
    font-weight: 600;
}

.member-details p {
    font-size: 11px;
    color: var(--text-muted);
}

.role-badge {
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-admin { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.role-editor { background: rgba(79, 70, 229, 0.1); color: var(--primary-light); }
.role-designer { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.role-reporter { background: rgba(16, 185, 129, 0.1); color: var(--success); }

.activity-log {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 4px;
}

.activity-item {
    font-size: 12px;
    line-height: 1.4;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-item span {
    color: var(--text-muted);
}

/* ==========================================================================
   5. EDITOR WORKSPACE STYLES
   ========================================================================== */
.editor-view {
    height: 100vh;
}

.editor-header {
    height: var(--header-h);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-panel);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-back {
    color: var(--text-muted);
    padding: 8px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    transition: var(--transition-fast);
}

.btn-back:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-color);
}

.document-title-area {
    display: flex;
    flex-direction: column;
}

.document-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
    outline: none;
    border-bottom: 1px dashed transparent;
    padding-bottom: 2px;
}

.document-title:focus {
    border-color: var(--primary-light);
}

.document-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.editor-collaborators {
    display: flex;
    align-items: center;
    margin-left: 20px;
    gap: 4px;
}

.collab-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--bg-panel);
    display: grid;
    place-items: center;
    font-size: 10px;
    color: white;
    font-weight: bold;
    margin-left: -8px;
    position: relative;
    cursor: pointer;
}

.collab-avatar:first-child {
    margin-left: 0;
}

.collab-avatar:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #000000;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    z-index: 100;
}

.collab-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    border: 1px solid var(--bg-panel);
    margin-left: 5px;
}

.editor-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Main Workspace Grid Layout */
.editor-layout {
    display: flex;
    flex: 1;
    height: calc(100vh - var(--header-h));
    overflow: hidden;
    min-height: 0;
}

/* Left Sidebar: Blocks Library */
.editor-sidebar-left {
    width: var(--sidebar-w);
    background: var(--bg-panel);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: width var(--transition-normal), border var(--transition-normal);
}

.sidebar-tab-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-tab {
    flex: 1;
    text-align: center;
    padding: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
}

.sidebar-tab.active {
    color: var(--primary-light);
    border-color: var(--primary-light);
}

.blocks-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.block-category-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.block-item {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: grab;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 12px;
}

.block-item:hover {
    border-color: var(--primary-light);
    background: rgba(15, 23, 42, 0.7);
    transform: translateY(-2px);
}

.block-item-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-glow);
    color: var(--primary-light);
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-size: 14px;
}

.block-item-info h5 {
    font-size: 13px;
    font-weight: 600;
}

.block-item-info p {
    font-size: 11px;
    color: var(--text-muted);
}

/* Center Canvas: Newspaper Render Area */
.editor-canvas-area {
    flex: 1;
    background: var(--bg-app);
    overflow: auto;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    position: relative;
}

.page-navigator {
    display: flex;
    align-items: center;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 100px;
    padding: 6px 16px;
    gap: 16px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 10;
    margin-left: auto;
    margin-right: auto;
}

.page-nav-btn {
    color: var(--text-color);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: var(--transition-fast);
}

.page-nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.page-indicator {
    font-weight: 600;
    font-size: 14px;
}

/* Canvas Page Wrapper */
.canvas-wrapper {
    margin-left: auto;
    margin-right: auto;
    position: relative;
    box-sizing: border-box;
}

/* Paper Page Node */
.paper-page {
    width: 500px; /* Compact ratio */
    height: 770px;
    background: var(--canvas-bg);
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0,0,0,0.1);
    color: var(--canvas-text);
    padding: 40px 40px 50px 40px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: box-shadow var(--transition-normal);
    margin: 0;
    transform-origin: top left;
}

.paper-page.active-page {
    box-shadow: 0 0 0 2px var(--primary-light), 0 20px 40px rgba(0,0,0,0.3);
}

.paper-page.lang-hi,
.paper-page.lang-mr {
    font-family: var(--font-news-devanagari);
}

.paper-page.lang-gu {
    font-family: var(--font-news-gujarati);
}

.paper-page.lang-bn {
    font-family: var(--font-news-bengali);
}

.paper-page.lang-ta {
    font-family: var(--font-news-tamil);
}

.paper-page.lang-te {
    font-family: var(--font-news-telugu);
}

.paper-page.lang-kn {
    font-family: var(--font-news-kannada);
}

.paper-page.lang-ml {
    font-family: var(--font-news-malayalam);
}

.paper-page.lang-pa {
    font-family: var(--font-news-devanagari);
}

.paper-page.lang-ur {
    direction: rtl;
    font-family: var(--font-news-urdu);
}

.premium-header {
    box-sizing: border-box;
    break-inside: avoid;
}

.premium-header * {
    box-sizing: border-box;
}

/* Paper Inner Contents */
.paper-header-rules {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0px;
}

/* Empty Canvas State */
.empty-canvas-message {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-lg);
    margin: 20px 0;
    color: #94a3b8;
    gap: 12px;
    padding: 40px;
    text-align: center;
}

.empty-canvas-message i {
    font-size: 32px;
}

/* Paper Canvas Blocks Layouts */
.canvas-block {
    position: relative;
    border: 1px dashed transparent;
    transition: border-color var(--transition-fast);
    width: 100%;
}

.canvas-block:hover {
    border-color: #3b82f6;
}

.canvas-block.selected-block {
    border: 2px solid var(--primary);
}

/* Block Actions Overlays */
.block-actions-overlay {
    position: absolute;
    top: -14px;
    right: 10px;
    background: var(--primary);
    border-radius: var(--radius-sm);
    display: none;
    align-items: center;
    gap: 2px;
    padding: 2px;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.canvas-block:hover .block-actions-overlay {
    display: flex;
}

.block-action-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    color: white;
    display: grid;
    place-items: center;
    font-size: 11px;
    transition: var(--transition-fast);
}

.block-action-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Simulated Real-Time Collaborative Cursors */
.collab-cursor {
    position: absolute;
    pointer-events: none;
    z-index: 50;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 2px;
    color: white;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: var(--shadow-sm);
    animation: cursorPulse 2s infinite;
}

.collab-highlight-outline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px dashed transparent;
    pointer-events: none;
    z-index: 49;
    transition: border-color 0.3s;
}

@keyframes cursorPulse {
    0% { transform: scale(1); opacity: 0.95; }
    50% { transform: scale(1.02); opacity: 1; }
    100% { transform: scale(1); opacity: 0.95; }
}

/* Traditional Newspaper Style Blocks */
.newspaper-block-header {
    border-bottom: 4px double var(--canvas-line);
    margin-bottom: 15px;
    padding-bottom: 10px;
    text-align: center;
    width: 100%;
}

.newspaper-title {
    font-family: var(--font-news-title);
    font-weight: 900;
    font-size: 48px;
    text-transform: capitalize;
    color: var(--canvas-text);
    line-height: 1.1;
    margin-bottom: 6px;
    outline: none;
}

.newspaper-meta-strip {
    border-top: 1px solid var(--canvas-line);
    border-bottom: 1px solid var(--canvas-line);
    display: flex;
    justify-content: space-between;
    padding: 4px 10px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--canvas-text-muted);
}

.newspaper-meta-strip span {
    outline: none;
}

/* Article Styles */
.newspaper-article {
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.newspaper-headline {
    font-family: var(--font-news-title);
    font-weight: 800;
    color: var(--canvas-text);
    line-height: 1.15;
    outline: none;
    word-break: break-word;
}

.headline-large { font-size: 28px; }
.headline-medium { font-size: 20px; }
.headline-small { font-size: 15px; }

.newspaper-subheadline {
    font-family: var(--font-news-title);
    font-weight: 500;
    font-style: italic;
    font-size: 13px;
    color: var(--canvas-text-muted);
    outline: none;
    line-height: 1.3;
}

.newspaper-author-bar {
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--canvas-text-muted);
    outline: none;
}

.newspaper-body-columns {
    display: grid;
    gap: 16px;
    margin-top: 6px;
}

.newspaper-body-columns.cols-1 { grid-template-columns: 1fr; }
.newspaper-body-columns.cols-2 { grid-template-columns: 1fr 1fr; }
.newspaper-body-columns.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.newspaper-body-col {
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--canvas-text);
    text-align: justify;
    outline: none;
    white-space: pre-wrap;
}

.newspaper-body-col::first-letter {
    /* Large initial drop cap for lead story */
    font-family: var(--font-news-title);
}

.lead-story .newspaper-body-col:first-child::first-letter {
    font-size: 40px;
    float: left;
    line-height: 0.8;
    padding-right: 6px;
    padding-top: 4px;
    font-weight: 900;
}

/* Image blocks */
.newspaper-media-container {
    width: 100%;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin: 4px 0;
    position: relative;
    cursor: pointer;
}

.newspaper-media-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    max-height: 280px;
    transition: opacity var(--transition-fast);
}

.newspaper-media-img[src=""] {
    display: none;
}

.newspaper-media-placeholder {
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    gap: 8px;
    font-size: 12px;
}

.newspaper-media-caption {
    padding: 6px 10px;
    font-size: 10px;
    font-style: italic;
    color: var(--canvas-text-muted);
    border-top: 1px solid #cbd5e1;
    background: white;
    outline: none;
}

/* Advertising / Classified Blocks */
.newspaper-ad-container {
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    padding: 15px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    min-height: 80px;
}

.newspaper-ad-tag {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    border: 1px solid #cbd5e1;
    padding: 1px 6px;
    border-radius: 2px;
    margin-bottom: 6px;
}

.newspaper-ad-content {
    font-family: var(--font-news-mono);
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    outline: none;
}

/* Footer Section */
.newspaper-footer {
    border-top: 2px double var(--canvas-line);
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--canvas-text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.newspaper-footer span {
    outline: none;
}

/* Watermark styles */
.canvas-watermark {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.2);
    pointer-events: none;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Right Sidebar: Inspector/Settings Panel */
.editor-sidebar-right {
    width: var(--inspector-w);
    background: var(--bg-panel);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: width var(--transition-normal), border var(--transition-normal);
}

.inspector-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inspector-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.inspector-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Comments List Style */
.comment-composer {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.comment-composer input {
    flex: 1;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background: rgba(15,23,42,0.4);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 13px;
}

.comment-composer input:focus {
    outline: none;
    border-color: var(--primary-light);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 250px;
    overflow-y: auto;
}

.comment-bubble {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    font-size: 12px;
}

.comment-hdr {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-weight: 600;
}

.comment-hdr .author {
    color: var(--primary-light);
}

.comment-hdr .time {
    font-size: 10px;
    color: var(--text-muted);
}

.comment-body {
    color: var(--text-color);
    line-height: 1.4;
}

/* ==========================================================================
   6. PREMIUM PRESET MODALS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn var(--transition-normal);
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    color: var(--text-muted);
    font-size: 20px;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.pdf-preview-card {
    max-width: min(1180px, 96vw);
}

.pdf-preview-body {
    display: grid;
    grid-template-columns: minmax(280px, 360px) 1fr;
    gap: 20px;
    align-items: start;
}

.pdf-settings-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pdf-action-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.pdf-preview-panel {
    min-width: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.pdf-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.pdf-preview-pages {
    max-height: 70vh;
    min-height: 360px;
    overflow: auto;
    padding: 12px;
    background: #e2e8f0;
}

.pdf-preview-pages .paper-page {
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.28) !important;
    border-radius: 0;
    transition: none;
}

.pdf-preview-pages .canvas-block {
    border-color: transparent !important;
}

/* Image stock gallery in modal */
.stock-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.stock-img-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    height: 100px;
    position: relative;
    transition: var(--transition-fast);
}

.stock-img-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stock-img-item:hover {
    border-color: var(--primary-light);
    transform: scale(1.03);
}

/* Social Share Preview Card */
.social-share-card-container {
    background: #0f172a;
    padding: 20px;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.social-share-canvas-wrapper {
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-md);
    overflow: hidden;
    max-width: 100%;
}

canvas#socialShareCanvas {
    display: block;
    background: #ffffff;
    max-width: 100%;
}

.social-share-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

/* Responsive Overrides */
@media(max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .pdf-preview-body {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 768px) {
    .landing-nav {
        padding: 15px 4%;
    }
    .nav-links {
        display: none;
    }
    .hero h1 {
        font-size: 36px;
    }
    .hero p {
        font-size: 16px;
    }
    .theme-selection-grid {
        grid-template-columns: 1fr;
    }
    .pdf-action-row {
        grid-template-columns: 1fr;
    }

    .pdf-preview-pages {
        max-height: 58vh;
    }
}

/* ==========================================================================
   7. DYNAMIC PRE-FILLED HEADER AND FOOTER DESIGNS
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Rozha+One&family=Yatra+One&family=Poppins:wght@400;600;700&display=swap');

:root {
    --header-accent: #ef4444; /* Default accent for headers */
}

/* Color Swatches Styles in Sidebar */
.color-swatches-container {
    display: flex;
    flex-wrap: wrap; /* Prevent scrollbar cut-offs by wrapping swatches */
    gap: 8px;
    padding: 10px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.swatch-item {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.15s;
    flex-shrink: 0;
}

.swatch-item:hover {
    transform: scale(1.2);
}

.swatch-item.active-swatch {
    border-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

/* Custom Header Layout Container */
.newspaper-header-custom {
    width: 100%;
    margin-bottom: 20px;
    background: #ffffff;
    color: #1a1a1a;
    box-sizing: border-box;
}

.newspaper-header-custom * {
    box-sizing: border-box;
}

/* Header Style 1: Vintage Circular Avatar (Nationalist) */
.newspaper-header-custom.style-1 {
    display: grid;
    grid-template-columns: 80px 1fr 180px;
    align-items: center;
    border-bottom: 4px double var(--header-accent);
    padding-bottom: 10px;
    gap: 15px;
    width: 100%;
}

.newspaper-header-custom.style-1 .hdr-side-left {
    display: flex;
    justify-content: center;
}

.newspaper-header-custom.style-1 .vintage-avatar {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 2px solid var(--header-accent);
    object-fit: cover;
    background: #cbd5e1;
}

.newspaper-header-custom.style-1 .hdr-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.newspaper-header-custom.style-1 .hdr-tagline {
    font-size: 11px;
    color: var(--header-accent);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-family: 'Poppins', sans-serif;
    outline: none;
}

.newspaper-header-custom.style-1 .hdr-title {
    font-family: 'Yatra One', 'Playfair Display', serif;
    font-size: 38px;
    font-weight: 900;
    color: var(--header-accent);
    margin: 0;
    line-height: 1.1;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.1);
    outline: none;
    text-align: center;
}

.newspaper-header-custom.style-1 .hdr-sub-slogan {
    font-size: 9px;
    color: #475569;
    letter-spacing: 1px;
    margin-top: 4px;
    outline: none;
}

.suvichar-box {
    border: 2px solid #1a1a1a;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 4px;
    font-size: 9px;
    line-height: 1.35;
    text-align: left;
    color: #1a1a1a;
}

.suvichar-title {
    display: block;
    font-weight: bold;
    border-bottom: 1px solid #1a1a1a;
    margin-bottom: 4px;
    padding-bottom: 2px;
    text-align: center;
    text-transform: uppercase;
    color: var(--header-accent);
    font-size: 9px;
    letter-spacing: 0.5px;
    outline: none;
}

.suvichar-text {
    margin: 0;
    font-style: italic;
    color: #334155;
    outline: none;
}

/* Header Style 2: Bold Landmark Strip */
.newspaper-header-custom.style-2 {
    display: grid;
    grid-template-columns: 120px 1fr 180px;
    align-items: center;
    border-bottom: 3px solid #1a1a1a;
    padding-bottom: 12px;
    gap: 15px;
    width: 100%;
}

.newspaper-header-custom.style-2 .landmark-img {
    width: 110px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #cbd5e1;
    background: #e2e8f0;
}

.newspaper-header-custom.style-2 .hdr-center {
    text-align: center;
}

.newspaper-header-custom.style-2 .hdr-title {
    font-family: 'Rozha One', 'Playfair Display', serif;
    font-size: 40px;
    color: #1a1a1a;
    font-weight: 800;
    margin: 0;
    outline: none;
}

.newspaper-header-custom.style-2 .hdr-sub-strip {
    background: var(--header-accent);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 10px;
    display: inline-block;
    margin-top: 6px;
    letter-spacing: 0.5px;
    outline: none;
}

/* Header Style 3: Balanced Double Quote Boxes */
.newspaper-header-custom.style-3 {
    display: grid;
    grid-template-columns: 160px 1fr 160px;
    align-items: center;
    border-bottom: 4px double #1a1a1a;
    padding-bottom: 10px;
    gap: 10px;
    width: 100%;
}

.newspaper-header-custom.style-3 .hdr-center {
    text-align: center;
    border-left: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    padding: 0 10px;
}

.newspaper-header-custom.style-3 .hdr-title {
    font-family: 'Yatra One', 'Playfair Display', serif;
    font-size: 44px;
    color: #1a1a1a;
    font-weight: 900;
    margin: 0;
    outline: none;
}

.newspaper-header-custom.style-3 .hdr-sub-strip {
    font-size: 10px;
    font-style: italic;
    color: #475569;
    margin-top: 4px;
    outline: none;
}

/* Header Style 4: Corporate / Regional Media Header */
.newspaper-header-custom.style-4 {
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 0px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.newspaper-header-custom.style-4 .hdr-top-row {
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    align-items: center;
    padding-bottom: 8px;
    gap: 10px;
}

.newspaper-header-custom.style-4 .logo-box {
    border: 2px dashed #94a3b8;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    background: #f8fafc;
}

.newspaper-header-custom.style-4 .hdr-center {
    text-align: center;
}

.newspaper-header-custom.style-4 .hdr-title {
    font-family: 'Poppins', 'Outfit', sans-serif;
    font-size: 42px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    letter-spacing: -1px;
    outline: none;
}

.newspaper-header-custom.style-4 .cities-strip {
    font-size: 10px;
    font-weight: 600;
    color: var(--header-accent);
    letter-spacing: 0.5px;
    margin-top: 2px;
    text-transform: uppercase;
    outline: none;
}

.newspaper-header-custom.style-4 .ad-box {
    border: 2px dashed #f59e0b;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #d97706;
    background: #fffbeb;
    text-align: center;
}

.newspaper-header-custom.style-4 .hdr-bottom-strip {
    background: #1a1a1a;
    color: white;
    display: flex;
    justify-content: space-between;
    padding: 4px 15px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
    outline: none;
}

/* Header Style 5: Detailed Gazette Header */
.newspaper-header-custom.style-5 {
    display: grid;
    grid-template-columns: 140px 1fr 180px;
    align-items: center;
    border-bottom: 3px solid var(--header-accent);
    padding-bottom: 12px;
    gap: 15px;
    width: 100%;
}

.newspaper-header-custom.style-5 .meta-box {
    border: 1px solid #1a1a1a;
    padding: 6px 10px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.4;
    background: #f8fafc;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 2px;
    outline: none;
}

.newspaper-header-custom.style-5 .hdr-center {
    text-align: center;
}

.newspaper-header-custom.style-5 .hdr-title {
    font-family: 'Rozha One', 'Playfair Display', serif;
    font-size: 38px;
    color: #1a1a1a;
    font-weight: 900;
    margin: 0;
    outline: none;
}

.newspaper-header-custom.style-5 .cities-strip {
    font-size: 10px;
    color: #475569;
    margin-top: 4px;
    outline: none;
}

/* Dynamic Footer Styles */
.newspaper-footer-custom {
    width: 100%;
    margin-top: auto;
    padding-top: 10px;
    background: white;
    color: #1a1a1a;
}

/* Footer Style 1: Double rule */
.newspaper-footer-custom.style-1 {
    border-top: 4px double #1a1a1a;
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 700;
    color: #475569;
    padding-top: 6px;
    text-transform: uppercase;
    outline: none;
}

/* Footer Style 2: Solid black strip */
.newspaper-footer-custom.style-2 {
    background: #1a1a1a;
    color: white;
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    font-weight: 600;
    padding: 6px 15px;
    margin-top: 10px;
    outline: none;
}

/* Footer Style 3: Three column boxes */
.newspaper-footer-custom.style-3 {
    border-top: 1px solid #cbd5e1;
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    font-size: 9px;
    padding-top: 8px;
    align-items: center;
    outline: none;
}

.newspaper-footer-custom.style-3 .ftr-col {
    padding: 0 8px;
}

.newspaper-footer-custom.style-3 .ftr-col.center {
    text-align: center;
    border-left: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    font-style: italic;
    color: #475569;
    outline: none;
}

.newspaper-footer-custom.style-3 .ftr-col.right {
    text-align: right;
    font-weight: bold;
    outline: none;
}

/* Visual Previews in Sidebar Styles */
.header-search-wrap {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    margin: 8px 0 12px;
    box-shadow: var(--shadow-md);
}

.header-search-wrap i {
    color: var(--text-muted);
    font-size: 12px;
}

.header-search-wrap input {
    border: 0;
    outline: none;
    background: transparent;
    color: var(--text-color);
    width: 100%;
    font-size: 12px;
}

.masthead-focus-pulse {
    animation: mastheadFocusPulse 0.9s ease;
}

@keyframes mastheadFocusPulse {
    0% { box-shadow: 0 0 0 2px var(--primary-light), 0 0 0 0 rgba(99, 102, 241, 0.45); }
    55% { box-shadow: 0 0 0 2px var(--primary-light), 0 0 0 14px rgba(99, 102, 241, 0.08); }
    100% { box-shadow: 0 0 0 2px var(--primary-light), 0 20px 40px rgba(0,0,0,0.3); }
}

.sidebar-preview-card {
    background: transparent;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.sidebar-preview-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.sidebar-preview-card.active-preview {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.05);
}

.sidebar-preview-wrapper {
    /* Scale down the headers for sidebar display */
    transform: scale(0.42);
    transform-origin: top center;
    width: 550px;
    height: auto;
    flex-shrink: 0;
    pointer-events: none; /* Disable inputs inside sidebar */
}

.sidebar-preview-container-outer {
    height: 180px; /* 3x taller box size for headers */
    overflow: hidden;
    background: white;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: flex-start; /* Align header at the top like a real newspaper */
    justify-content: center;
    padding: 12px; /* Larger padding */
}

.sidebar-preview-footer-outer {
    height: 90px; /* Taller box size for footers */
    overflow: hidden;
    background: white;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: flex-end; /* Align footer at the bottom like a real newspaper */
    justify-content: center;
    padding: 12px; /* Larger padding */
}

.sidebar-preview-footer-wrapper {
    transform: scale(0.42);
    transform-origin: bottom center;
    width: 550px;
    height: auto;
    flex-shrink: 0;
    pointer-events: none;
}

/* Premium Newspaper Name Input Card inside Sidebar */
.np-input-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.np-input-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.np-input-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.np-input-header i {
    color: var(--primary-light);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
    transition: color var(--transition-fast);
}

.input-wrapper input {
    width: 100%;
    padding: 10px 12px 10px 34px;
    font-size: 13px;
    background: rgba(10, 15, 25, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    transition: all var(--transition-fast);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-wrapper input:focus + .input-icon {
    color: var(--primary-light);
}

/* Sidebar Subtab Header Layout */
.sidebar-subtab-header {
    display: none; /* Managed dynamically by JS */
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.15);
}

.sidebar-subtab-header.active {
    display: flex;
}

.sidebar-subtab {
    flex: 1;
    padding: 10px 5px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
    outline: none;
}

.sidebar-subtab.active {
    color: var(--primary-light);
    border-bottom-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-subtab:hover {
    color: var(--text-color);
}

/* Design Layout Ratios Grid Selection Buttons */
.layout-grid-selectors {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 10px 0;
}

.layout-ratio-btn {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: all var(--transition-fast);
    cursor: pointer;
    text-align: left;
}

.layout-ratio-btn:hover {
    border-color: var(--primary-light);
    background: rgba(15, 23, 42, 0.7);
    transform: translateY(-1px);
}

.layout-ratio-btn .btn-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-color);
}

.layout-ratio-btn .btn-visual-row {
    display: flex;
    height: 18px;
    width: 100%;
    gap: 4px;
}

.layout-ratio-btn .btn-visual-col {
    background: var(--primary-glow);
    border: 1.5px solid var(--primary-light);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: 700;
    color: var(--primary-light);
    height: 100%;
}

/* Indian Newspaper Columns & Grid Rows */
.newspaper-grid-row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 15px;
    border-bottom: 1px double var(--canvas-border);
    padding: 15px 0;
    width: 100%;
    box-sizing: border-box;
}

.newspaper-grid-row:last-child {
    border-bottom: none;
}

.newspaper-grid-row .grid-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    border-right: 1px solid var(--canvas-border);
    padding-right: 15px;
    box-sizing: border-box;
}

.newspaper-grid-row .grid-col:last-child {
    border-right: none;
    padding-right: 0;
}

/* Column span definitions */
.span-12 { grid-column: span 12; }
.span-10 { grid-column: span 10; }
.span-9 { grid-column: span 9; }
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }
.span-5 { grid-column: span 5; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
.span-2 { grid-column: span 2; }

/* 2nd Header / SubHeader Custom Banners */
.newspaper-subheader-custom {
    width: 100%;
    margin-bottom: 13px;
    background: #ffffff;
    color: #1a1a1a;
    box-sizing: border-box;
}

/* Style 1: Solid Accent Bar */
.newspaper-subheader-custom.style-1 {
    background: var(--header-accent);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 15px;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    outline: none;
}

.newspaper-subheader-custom.style-1 .sub-title-pill {
    background: #ffffff;
    color: #1a1a1a;
    padding: 2px 12px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
    outline: none;
}

/* Style 2: Border strip with website & page box */
.newspaper-subheader-custom.style-2 {
    border-top: 3.5px solid var(--header-accent);
    border-bottom: 1.5px solid var(--header-accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    outline: none;
}

.newspaper-subheader-custom.style-2 .page-box {
    background: var(--header-accent);
    color: #ffffff;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 800;
    outline: none;
}

/* Style 4: Traditional Double Rule */
.newspaper-subheader-custom.style-4 {
    border-top: 1px double #1a1a1a;
    border-bottom: 1px double #1a1a1a;
    display: grid;
    grid-template-columns: 80px 1fr 120px;
    padding: 6px 10px;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    outline: none;
}

.newspaper-subheader-custom.style-4 .col-center {
    text-align: center;
    font-family: 'Rozha One', 'Baloo Bhai 2', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--header-accent);
    outline: none;
}

.newspaper-subheader-custom.style-4 .col-right {
    text-align: right;
    outline: none;
}

/* Style 6: Purple banner style */
.newspaper-subheader-custom.style-6 {
    background: #6b21a8;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px;
    font-size: 11px;
    outline: none;
}

.newspaper-subheader-custom.style-6 .page-box {
    background: white;
    color: #6b21a8;
    padding: 2px 8px;
    font-weight: bold;
    outline: none;
}

/* Sidebar Preview footer height override for subheaders */
.sidebar-preview-subheader-outer {
    height: 90px; /* Taller box size for subheaders */
    overflow: hidden;
    background: white;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center; /* Center-aligned for subheaders */
    justify-content: center;
    padding: 12px; /* Larger padding */
}

.sidebar-preview-subheader-wrapper {
    transform: scale(0.42);
    transform-origin: center center;
    width: 550px;
    height: auto;
    flex-shrink: 0;
    pointer-events: none;
}

/* Sidebar Previews Color and Layout Fixes */
.sidebar-preview-wrapper,
.sidebar-preview-footer-wrapper,
.sidebar-preview-subheader-wrapper {
    color: #1a1a1a !important;
    --text-color: #1a1a1a !important;
    --text-muted: #475569 !important;
}

.sidebar-preview-card .newspaper-header-custom {
    margin-bottom: 0 !important;
}

.sidebar-preview-card .newspaper-subheader-custom {
    margin-bottom: 0 !important;
}

.sidebar-preview-card .newspaper-footer-custom {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Language Typography Class Overrides on Newspaper Canvas */
.lang-hi .hdr-title, 
.lang-hi .newspaper-headline, 
.lang-hi .col-center {
    font-family: 'Yatra One', 'Rozha One', 'Playfair Display', serif;
}

.lang-gu .hdr-title, 
.lang-gu .newspaper-headline, 
.lang-gu .col-center {
    font-family: 'Baloo Bhai 2', 'Poppins', sans-serif;
}

.lang-hi .newspaper-body-col,
.lang-hi .suvichar-text,
.lang-hi .suvichar-title {
    font-family: 'Mukta', 'Inter', sans-serif;
}

.lang-gu .newspaper-body-col,
.lang-gu .suvichar-text,
.lang-gu .suvichar-title {
    font-family: 'Mukta', 'Inter', sans-serif;
}

/* CMYK Registration Alignment Markers for Newspaper Footers */
.cmyk-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    user-select: none;
}
.cmyk-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.cmyk-dot.cyan { background-color: #00aeef !important; }
.cmyk-dot.magenta { background-color: #ec008c !important; }
.cmyk-dot.yellow { background-color: #fffdf5 !important; border: 1px solid #cbd5e1; box-sizing: border-box; }
.cmyk-dot.black { background-color: #000000 !important; }

.cmyk-blocks {
    display: inline-flex;
    gap: 2px;
    align-items: center;
    user-select: none;
}
.cmyk-block {
    width: 8px;
    height: 8px;
    display: inline-block;
}
.cmyk-block.cyan { background-color: #00aeef !important; }
.cmyk-block.magenta { background-color: #ec008c !important; }
.cmyk-block.yellow { background-color: #fff200 !important; }
.cmyk-block.black { background-color: #000000 !important; }

/* Styles for calendar and news brief blocks */
.calendar-block-container {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.calendar-table th, .calendar-table td {
    border-right: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
}
.calendar-table td:last-child, .calendar-table th:last-child {
    border-right: none;
}
.calendar-table tr:last-child td {
    border-bottom: none;
}

/* Header Styles 6 to 32 */
.newspaper-header-custom.style-6 {
    text-align: center;
    border-bottom: 3px double #1a1a1a;
    padding-bottom: 12px;
    width: 100%;
}
.newspaper-header-custom.style-7 {
    width: 100%;
    border: 1px solid #991b1b;
}
.newspaper-header-custom.style-8 {
    width: 100%;
    border: 3px solid #eab308;
    background: white;
}
.newspaper-header-custom.style-9 {
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 1px 1fr;
    gap: 15px;
    align-items: center;
    border-top: 4px solid #1a1a1a;
    border-bottom: 2px solid #1a1a1a;
    padding: 10px 0;
    background: white;
}
.newspaper-header-custom.style-10 {
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    border-bottom: 3px solid #15803d;
    background: #fffdf5;
    border-radius: 4px;
    overflow: hidden;
}
.newspaper-header-custom.style-11 {
    width: 100%;
    border: 3px double #d97706;
    padding: 10px;
    background: #fffbeb;
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    align-items: center;
    text-align: center;
    gap: 10px;
}
.newspaper-header-custom.style-12 {
    width: 100%;
    border-bottom: 2px solid #334155;
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.newspaper-header-custom.style-13 {
    width: 100%;
    border-top: 4px solid #1a1a1a;
    border-bottom: 4px solid #1a1a1a;
    padding: 8px 0;
    text-align: center;
}
.newspaper-header-custom.style-14 {
    width: 100%;
    border-left: 6px solid var(--header-accent);
    padding-left: 15px;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.newspaper-header-custom.style-15 {
    width: 100%;
    background: #0f172a;
    color: #f59e0b;
    padding: 15px;
    text-align: center;
    border: 2px solid #f59e0b;
}
.newspaper-header-custom.style-16 {
    width: 100%;
    border: 2px solid #06b6d4;
    background: #083344;
    color: #22d3ee;
    padding: 12px;
}
.newspaper-header-custom.style-17 {
    width: 100%;
    border-top: 1px solid #1a1a1a;
    border-bottom: 4px solid #1a1a1a;
    padding: 15px 0;
    text-align: center;
}
.newspaper-header-custom.style-18 {
    width: 100%;
    border: 1px solid #475569;
    display: grid;
    grid-template-columns: 140px 1fr 140px;
    align-items: center;
    text-align: center;
    padding: 10px;
    gap: 10px;
}
.newspaper-header-custom.style-19 {
    width: 100%;
    border-bottom: 1.5px solid #1a1a1a;
    padding-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.newspaper-header-custom.style-20 {
    width: 100%;
    border-bottom: 3px double #3b82f6;
    padding-bottom: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.newspaper-header-custom.style-21 {
    width: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #cbd5e1;
}
.newspaper-header-custom.style-22 {
    width: 100%;
    border-bottom: 2px solid #ef4444;
    padding-bottom: 8px;
}
.newspaper-header-custom.style-23 {
    width: 100%;
    display: grid;
    grid-template-columns: 150px 1fr 150px;
    align-items: center;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 10px;
    gap: 10px;
}
.newspaper-header-custom.style-24 {
    width: 100%;
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
    padding: 12px 0;
    text-align: center;
}
.newspaper-header-custom.style-25 {
    width: 100%;
    background: #fef08a;
    border-bottom: 3px solid #ca8a04;
    padding: 12px;
    text-align: center;
}
.newspaper-header-custom.style-26 {
    width: 100%;
    border-top: 2px solid #b45309;
    border-bottom: 2px solid #b45309;
    padding: 10px;
    background: #fffdf5;
}
.newspaper-header-custom.style-27 {
    width: 100%;
    background: #111827;
    border-bottom: 4px solid #b91c1c;
    padding: 12px;
    text-align: center;
}
.newspaper-header-custom.style-28 {
    width: 100%;
    border: 4px double #78350f;
    padding: 12px;
    text-align: center;
    background: #fffbeb;
}
.newspaper-header-custom.style-29 {
    width: 100%;
    border-bottom: 3px solid #1a1a1a;
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 15px;
    align-items: center;
    padding-bottom: 10px;
}
.newspaper-header-custom.style-30 {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: 15px;
    align-items: center;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 10px;
}
.newspaper-header-custom.style-31 {
    width: 100%;
    background: #020617;
    border: 2px solid #eab308;
    color: #ffffff;
    padding: 12px;
}
.newspaper-header-custom.style-32 {
    width: 100%;
    border-top: 1px dashed #ec4899;
    border-bottom: 1px dashed #ec4899;
    padding: 15px 0;
    text-align: center;
    background: #fdf2f8;
}

/* ==========================================================================
   PHASE 3: LAYOUT TEMPLATES, AD BLOCKS & INTERACTIVE MODULES
   ========================================================================== */

/* Pre-made Templates Sidebar */
.template-item-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    width: 100%;
    text-align: left;
}
.template-item-btn:hover {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.05);
}
.template-item-btn h5 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}
.template-item-btn p {
    font-size: 10px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.3;
}
.template-visual-mock {
    height: 40px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    border: 1px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px;
}
.template-visual-line {
    height: 3px;
    background: var(--border-color);
    border-radius: 1px;
}

/* Ad Spaces Manager Styles */
.ad-space-block {
    border: 1px dashed #94a3b8;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin: 10px auto;
    transition: all 0.2s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}
.ad-space-block:hover {
    border-color: var(--primary-light);
    background: #f1f5f9;
}
.ad-space-block.size-ear-panel {
    width: 180px;
    height: 70px;
    margin: 5px auto;
    display: flex;
}
.ad-space-block.size-quarter-page {
    width: 100%;
    max-width: 320px;
    height: 220px;
}
.ad-space-block.size-half-page-horiz {
    width: 100%;
    height: 320px;
}
.ad-space-block.size-half-page-vert {
    width: 100%;
    height: 450px;
}
.ad-space-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ad-space-tag {
    position: absolute;
    top: 4px;
    left: 4px;
    font-size: 7px;
    text-transform: uppercase;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 1px 4px;
    font-weight: bold;
    letter-spacing: 0.5px;
    z-index: 2;
    pointer-events: none;
}
.ad-space-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #64748b;
    text-align: center;
    padding: 8px;
}
.ad-space-placeholder i {
    font-size: 18px;
}
.ad-space-placeholder span {
    font-size: 10px;
    font-weight: 700;
}
.ad-space-placeholder .dimens {
    font-size: 8px;
    color: #94a3b8;
}

/* Horoscope Module Styles */
.horoscope-container {
    border: 2px solid #1a1a1a;
    background: #fffdf5;
    padding: 12px;
    margin: 15px 0;
    width: 100%;
    box-sizing: border-box;
}
.horoscope-header {
    border-bottom: 2px solid #1a1a1a;
    text-align: center;
    padding-bottom: 6px;
    margin-bottom: 10px;
}
.horoscope-header h3 {
    font-family: var(--font-news-title);
    font-size: 20px;
    font-weight: 900;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}
.horoscope-grid-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}
.horoscope-card {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    padding: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 105px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.horoscope-card:hover {
    border-color: #1a1a1a;
}
.horoscope-sign-header {
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid #cbd5e1;
    width: 100%;
    justify-content: center;
    padding-bottom: 4px;
    margin-bottom: 4px;
}
.horoscope-sign-icon {
    font-size: 12px;
    color: #b45309;
}
.horoscope-sign-name {
    font-size: 10px;
    font-weight: 800;
    color: #1a1a1a;
    text-transform: uppercase;
}
.horoscope-prediction-text {
    font-size: 8.5px;
    line-height: 1.3;
    color: #334155;
    text-align: justify;
    width: 100%;
    flex: 1;
    outline: none;
    overflow-wrap: break-word;
}

/* Crossword Puzzle Styles */
.crossword-block-container {
    border: 2px solid #1a1a1a;
    background: #ffffff;
    padding: 15px;
    margin: 15px 0;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 15px;
}
.crossword-grid-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}
.crossword-table-grid {
    border-collapse: collapse;
    border: 2px solid #000000;
    background: #000000;
}
.crossword-cell {
    width: 38px;
    height: 38px;
    position: relative;
    border: 1px solid #000000;
    text-align: center;
    vertical-align: middle;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.15s ease;
    background: #ffffff;
}
.crossword-cell.blocked-cell {
    background: #000000;
}
.crossword-cell.open-cell {
    background: #ffffff;
}
.crossword-cell .cell-number {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 8px;
    font-weight: 800;
    color: #000000;
    z-index: 3;
    outline: none;
    cursor: text;
}
.crossword-cell .cell-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 15px;
    font-weight: 800;
    color: #1a1a1a;
    text-transform: uppercase;
    outline: none;
    padding-top: 6px;
}
.crossword-cell.blocked-cell .cell-input,
.crossword-cell.blocked-cell .cell-number {
    display: none;
}
.crossword-clues-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-left: 1px dashed #cbd5e1;
    padding-left: 12px;
}
.crossword-clues-header {
    font-family: var(--font-news-title);
    font-size: 14px;
    font-weight: 900;
    color: #000000;
    border-bottom: 1.5px solid #000000;
    padding-bottom: 3px;
    margin-bottom: 6px;
    text-transform: uppercase;
}
.crossword-clues-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.crossword-clues-col h4 {
    font-size: 10px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 4px;
    text-transform: uppercase;
}
.crossword-clues-list {
    font-size: 9px;
    line-height: 1.35;
    color: #334155;
    padding-left: 0;
    list-style: none;
}
.crossword-clues-list li {
    margin-bottom: 3px;
}
input.crossword-cell-number-edit {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 16px;
    height: 12px;
    font-size: 8px;
    border: 1px solid var(--primary-light);
    background: white;
    z-index: 10;
    text-align: center;
    padding: 0;
}

/* =============================================
   DRAG-AND-DROP BLOCK REORDERING
   ============================================= */
.canvas-block {
    cursor: grab;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.15s;
}

.canvas-block:active {
    cursor: grabbing;
}

.canvas-block.dragging {
    opacity: 0.4;
    transform: scale(0.95);
}

.canvas-block.drag-over {
    box-shadow: 0 0 0 3px var(--primary-light, #60a5fa), 0 4px 16px rgba(59, 130, 246, 0.3);
    transform: translateY(2px);
    border-color: var(--primary-light, #60a5fa);
}

/* =============================================
   FONT CUSTOMIZATION INSPECTOR STYLES
   ============================================= */
#inspectorFontFamily {
    width: 100%;
    padding: 8px;
    font-size: 12px;
    margin-top: 4px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

#inspectorFontFamily option {
    background: #1e293b;
    color: white;
}

#inspectorFontSize {
    accent-color: var(--primary-light, #60a5fa);
    cursor: pointer;
}

#fontSizeValue {
    font-weight: 700;
    color: var(--primary-light, #60a5fa);
    font-size: 12px;
}

/* =============================================
   TEMPLATE GALLERY ON DASHBOARD
   ============================================= */
.template-gallery-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.template-gallery-overlay.active {
    display: flex;
}

.template-gallery-card {
    background: var(--bg-secondary, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 16px;
    padding: 30px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.template-gallery-card h2 {
    font-size: 22px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.template-gallery-card .subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.template-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.template-gallery-item {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.02);
    text-align: left;
}

.template-gallery-item:hover {
    border-color: var(--primary-light, #60a5fa);
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.template-gallery-item .tpl-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.template-gallery-item h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.template-gallery-item p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
}

.template-gallery-item .tpl-blocks-preview {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 10px;
}

.template-gallery-item .tpl-block-line {
    height: 4px;
    border-radius: 2px;
    background: var(--primary-light, #60a5fa);
    opacity: 0.5;
}

.tpl-layout-preview {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    min-height: 84px;
    margin-top: 12px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.22);
}

.tpl-mini-block {
    min-height: 18px;
    border-radius: 4px;
    background: rgba(99, 102, 241, 0.22);
    border: 1px solid rgba(99, 102, 241, 0.45);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 4px;
    font-size: 8px;
    font-weight: 700;
    text-align: center;
    line-height: 1.15;
}

.tpl-mini-block:first-child {
    grid-column: 1 / -1;
    background: rgba(245, 158, 11, 0.24);
    border-color: rgba(245, 158, 11, 0.55);
}

.tpl-mini-block:nth-child(2) {
    grid-column: span 4;
    min-height: 34px;
}

.tpl-mini-block:nth-child(3) {
    grid-column: span 2;
    min-height: 34px;
}

.tpl-mini-block:nth-child(4),
.tpl-mini-block:nth-child(5) {
    grid-column: span 3;
}

.tpl-section-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}

.tpl-section-chips span {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 9px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
}

.template-gallery-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.template-gallery-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Sidebar Collapse Toggle Buttons & Collapsed States */
.sidebar-toggle-btn {
    position: absolute;
    width: 20px;
    height: 50px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 11px;
    transition: var(--transition-fast);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 101;
    top: 50%;
    transform: translateY(-50%);
}

.sidebar-toggle-btn.left-toggle {
    right: -20px;
    border-left: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.sidebar-toggle-btn.right-toggle {
    left: -20px;
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.sidebar-toggle-btn:hover {
    color: var(--primary-light);
    background: var(--secondary-light);
}

.editor-sidebar-left.collapsed {
    width: 0 !important;
    border-right: none !important;
}

.editor-sidebar-left.collapsed > *:not(.sidebar-toggle-btn) {
    display: none !important;
}

.editor-sidebar-left.collapsed .sidebar-toggle-btn.left-toggle i {
    transform: rotate(180deg);
}

.editor-sidebar-right.collapsed {
    width: 0 !important;
    border-left: none !important;
}

.editor-sidebar-right.collapsed > *:not(.sidebar-toggle-btn) {
    display: none !important;
}

.editor-sidebar-right.collapsed .sidebar-toggle-btn.right-toggle i {
    transform: rotate(180deg);
}

/* Reduce main header title (masthead) size globally to prevent layout wrap and overflow */
.newspaper-header-custom .hdr-title,
.premium-header .hdr-title,
.hdr-title {
    font-size: 22px !important;
    line-height: 1.15 !important;
}
