/* Journalist Dashboard — Glassmorphism Wedding Theme */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --accent-color: #c9a84c;
    --accent-light: #ddc77a;
    --accent-glow: rgba(201, 168, 76, 0.35);
    --accent-dim: rgba(201, 168, 76, 0.12);
    --bg-deep: #0c0e14;
    --bg-surface: #12141c;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-bg-hover: rgba(255, 255, 255, 0.10);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-hover: rgba(201, 168, 76, 0.30);
    --text-primary: #f0ece4;
    --text-secondary: rgba(240, 236, 228, 0.65);
    --text-muted: rgba(240, 236, 228, 0.40);
    --sidebar-width: 250px;
    --blur-amount: 16px;
}

body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--bg-deep);
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* Ambient background glow */
body::before {
    content: '';
    position: fixed;
    top: -30%;
    right: -10%;
    width: 60%;
    height: 70%;
    background: radial-gradient(ellipse, rgba(201, 168, 76, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    left: 10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(ellipse, rgba(180, 140, 80, 0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Headings use serif display font */
h1, h2, h3, .article-title, .sidebar-header h2 {
    font-family: 'Playfair Display', 'Georgia', serif;
}

/* ── Sidebar ── */
.dashboard-sidebar {
    width: var(--sidebar-width);
    background: rgba(12, 14, 20, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
    border-right: 1px solid var(--glass-border);
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
    position: relative;
}

/* Gold accent line under header */
.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--accent-color);
    text-transform: uppercase;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    list-style: none;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 1px;
}

.sidebar-nav a {
    display: block;
    padding: 11px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 2px solid transparent;
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.sidebar-nav a:hover {
    background: rgba(201, 168, 76, 0.06);
    color: var(--text-primary);
    border-left-color: rgba(201, 168, 76, 0.35);
}

.sidebar-nav a.active {
    background: rgba(201, 168, 76, 0.08);
    color: var(--accent-light);
    border-left-color: var(--accent-color);
    font-weight: 500;
}

.user-profile-mini {
    padding: 20px;
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
}

.user-name {
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* ── Main Content ── */
.dashboard-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 44px;
    width: calc(100% - var(--sidebar-width));
    position: relative;
    z-index: 1;
}

.dashboard-main h2 {
    color: var(--accent-light);
    font-size: 1.9rem;
    font-weight: 500;
    font-style: italic;
    margin-bottom: 32px;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 16px;
}

/* Gold rule under section headings */
.dashboard-main h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* ── Buttons ── */
.btn {
    padding: 10px 22px;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.84rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    letter-spacing: 0.4px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #b8963e);
    color: #0c0e14;
    border-color: var(--accent-color);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-color));
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-secondary,
.btn-outline {
    background: var(--glass-bg);
    color: var(--accent-light);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.btn-secondary:hover,
.btn-outline:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    box-shadow: 0 2px 12px rgba(201, 168, 76, 0.1);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent-color), #b8963e);
    color: #0c0e14;
}

.btn-sm {
    padding: 7px 16px;
    font-size: 0.8rem;
}

.btn:hover {
    opacity: 0.97;
}

/* ── Article Grid — Glassmorphism Cards ── */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.article-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 26px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

/* Subtle inner highlight at top edge */
.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

.article-card:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(201, 168, 76, 0.08);
    background: var(--glass-bg-hover);
}

.article-status {
    position: absolute;
    top: 22px;
    right: 22px;
    font-size: 0.68rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.status-new {
    background: rgba(201, 168, 76, 0.12);
    color: var(--accent-light);
    border: 1px solid rgba(201, 168, 76, 0.25);
}

.status-submitted {
    background: rgba(245, 166, 35, 0.10);
    color: #e8b960;
    border: 1px solid rgba(245, 166, 35, 0.20);
}

.status-approved,
.status-published {
    background: rgba(76, 175, 80, 0.10);
    color: #7dce82;
    border: 1px solid rgba(76, 175, 80, 0.20);
}

.status-included {
    background: rgba(156, 39, 176, 0.10);
    color: #ce93d8;
    border: 1px solid rgba(156, 39, 176, 0.20);
}

.article-title {
    margin-top: 8px;
    margin-bottom: 8px;
    font-size: 1.15rem;
    padding-right: 75px;
    color: var(--text-primary);
    font-weight: 600;
    font-style: italic;
}

.article-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 18px;
    letter-spacing: 0.3px;
}

.article-actions .btn {
    font-size: 0.8rem;
    padding: 7px 16px;
}

/* ── Editor View ── */
.editor-container {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    padding: 32px;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    max-width: 900px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.88rem;
    letter-spacing: 0.3px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

textarea.form-control {
    min-height: 150px;
    font-family: inherit;
}

.toolbar {
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.editor-content {
    min-height: 300px;
    border: 1px solid var(--glass-border);
    border-radius: 0 0 8px 8px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

/* ── Media Gallery ── */
.media-gallery {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 10px 0;
}

.media-item {
    width: 120px;
    height: 120px;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--glass-border);
}

.media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(180, 40, 40, 0.85);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 12px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ── Loading ── */
.loading {
    color: var(--text-muted);
    text-align: center;
    padding: 60px 20px;
    font-size: 1rem;
    font-style: italic;
}

/* ── Page Break Blot ── */
.ql-pagebreak {
    border: none;
    border-top: 1px dashed rgba(201, 168, 76, 0.25);
    height: 30px;
    margin: 20px 0;
    position: relative;
    cursor: default;
    background: transparent;
    display: block;
}

.ql-pagebreak::after {
    content: "PAGE BREAK";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-surface);
    padding: 2px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    letter-spacing: 1.5px;
}

/* ── Quill Dark Overrides ── */
.ql-toolbar.ql-snow {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--glass-border) !important;
}

.ql-container.ql-snow {
    border-color: var(--glass-border) !important;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}

.ql-editor {
    color: var(--text-primary);
}

.ql-snow .ql-stroke {
    stroke: var(--text-secondary);
}

.ql-snow .ql-fill {
    fill: var(--text-secondary);
}

.ql-snow .ql-picker-label {
    color: var(--text-secondary);
}

.ql-snow .ql-picker-options {
    background: var(--bg-surface);
    border-color: var(--glass-border);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.30);
}

/* ── Selection ── */
::selection {
    background: rgba(201, 168, 76, 0.25);
    color: #fff;
}

@media print {
    .ql-pagebreak {
        border: none;
        break-after: always;
        page-break-after: always;
        height: 0;
        margin: 0;
        visibility: hidden;
        display: block;
    }
}