/* ===========================
   AIDEN - AI Daily Editor News
   style.css
   =========================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --navy: #1a1a2e;
    --navy-light: #16213e;
    --accent: #4361ee;
    --accent-hover: #3a56d4;
    --success: #2ec4b6;
    --warning: #f9a826;
    --danger: #e63946;
    --text: #2b2d42;
    --text-light: #8d99ae;
    --bg: #ffffff;
    --bg-gray: #f8f9fa;
    --border: #e9ecef;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-sm: 4px;
    --transition: 0.2s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    line-height: 1.4;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #27b0a3;
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #cf2f3c;
    color: #fff;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

.btn-xs {
    padding: 0.25rem 0.6rem;
    font-size: 0.8rem;
}

.btn-full {
    display: block;
    width: 100%;
}

/* --- Header --- */
.site-header {
    background: var(--navy);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo-link {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    color: #fff;
}

.logo-link:hover {
    color: #fff;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.tagline {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.6);
}

/* --- Navigation --- */
.main-nav .nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.nav-subscribe {
    background: var(--accent);
    color: #fff !important;
    margin-left: 0.5rem;
}

.nav-subscribe:hover {
    background: var(--accent-hover);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle .arrow {
    font-size: 0.7em;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    min-width: 160px;
    padding: 0.5rem 0;
    list-style: none;
    z-index: 200;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text);
    font-size: 0.9rem;
}

.dropdown-menu li a:hover {
    background: var(--bg-gray);
    color: var(--accent);
}

/* Hamburger */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: all var(--transition);
}

.hamburger {
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

/* --- Flash Messages --- */
.flash-messages {
    margin-bottom: 1rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    animation: flashIn 0.3s ease;
}

.flash-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error, .flash-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.flash-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.flash-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

@keyframes flashIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: #fff;
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.8);
}

/* --- Section Title --- */
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
}

/* --- Article Grid --- */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.article-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.card-link {
    display: block;
    color: inherit;
}

.card-link:hover {
    color: inherit;
}

.card-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-gray);
}

.card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.article-card:hover .card-thumbnail img {
    transform: scale(1.03);
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: rgba(255,255,255,0.3);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 3px;
}

.card-body {
    padding: 1rem 1.25rem 1.25rem;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-summary {
    font-size: 0.88rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-light);
}

/* --- Category Badge --- */
.category-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
}

.badge-sm {
    padding: 0.15rem 0.45rem;
    font-size: 0.7rem;
}

.badge-model { background: #6c5ce7; }
.badge-research { background: #00b894; }
.badge-product { background: #0984e3; }
.badge-business { background: #e17055; }
.badge-policy { background: #636e72; }
.badge-tutorial { background: #fdcb6e; color: #2d3436; }
.badge-opinion { background: #a29bfe; }

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    padding: 2rem 0;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.page-link:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.page-current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.page-ellipsis {
    padding: 0 0.3rem;
    color: var(--text-light);
}

.page-prev, .page-next {
    padding: 0 0.75rem;
}

/* --- Article Detail --- */
.article-detail {
    max-width: 800px;
    margin: 2rem auto;
}

.article-header {
    margin-bottom: 1.5rem;
}

.article-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0.75rem 0;
}

.article-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-light);
}

.meta-separator {
    color: var(--border);
}

.meta-importance {
    color: var(--warning);
}

.article-thumbnail {
    margin-bottom: 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
}

.article-thumbnail img {
    width: 100%;
    display: block;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.article-body h2 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
}

.article-body h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
}

.article-body p {
    margin-bottom: 1rem;
}

.article-body ul, .article-body ol {
    margin: 1rem 0 1rem 1.5rem;
}

.article-body blockquote {
    border-left: 4px solid var(--accent);
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    background: var(--bg-gray);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-body pre {
    background: var(--navy);
    color: #e0e0e0;
    padding: 1rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 1rem 0;
}

.article-body code {
    background: var(--bg-gray);
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.article-body pre code {
    background: none;
    padding: 0;
}

.article-body img {
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.article-source-link {
    margin-bottom: 2rem;
}

.related-sources {
    background: var(--bg-gray);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 2rem;
}

.related-sources h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.related-sources ul {
    list-style: none;
}

.related-sources li {
    padding: 0.3rem 0;
}

.related-sources li::before {
    content: '>';
    margin-right: 0.5rem;
    color: var(--accent);
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
}

.share-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
}

.share-btn {
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    transition: all var(--transition);
}

.share-btn:hover {
    color: #fff;
}

.share-twitter {
    color: #1DA1F2;
    border-color: #1DA1F2;
}

.share-twitter:hover {
    background: #1DA1F2;
    border-color: #1DA1F2;
}

.share-linkedin {
    color: #0077B5;
    border-color: #0077B5;
}

.share-linkedin:hover {
    background: #0077B5;
    border-color: #0077B5;
}

.share-facebook {
    color: #4267B2;
    border-color: #4267B2;
}

.share-facebook:hover {
    background: #4267B2;
    border-color: #4267B2;
}

.share-copy {
    color: var(--text-light);
    border-color: var(--border);
}

.share-copy:hover {
    background: #6c757d;
    border-color: #6c757d;
}

.share-copy.copied {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}

/* --- Category Page --- */
.category-header {
    margin: 1.5rem 0;
}

.category-page-title {
    font-size: 1.6rem;
    font-weight: 700;
}

/* --- Archive --- */
.archive-header {
    margin: 1.5rem 0;
}

.archive-header h1 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
}

.archive-header p {
    color: var(--text-light);
}

.archive-date-group {
    margin-bottom: 2rem;
}

.archive-date {
    font-size: 1.15rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.75rem;
    color: var(--navy);
}

.archive-articles {
    list-style: none;
}

.archive-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-gray);
}

.archive-link {
    font-weight: 500;
    flex: 1;
}

.archive-source {
    font-size: 0.8rem;
    color: var(--text-light);
    white-space: nowrap;
}

/* --- Subscribe --- */
.subscribe-page {
    padding: 2rem 0;
}

.subscribe-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
    align-items: start;
}

.subscribe-info h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.subscribe-desc {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.subscribe-benefits {
    list-style: none;
}

.subscribe-benefits li {
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.subscribe-benefits li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
}

.subscribe-form-area {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.subscribe-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.msg-success {
    background: #d4edda;
    color: #155724;
}

.msg-error {
    background: #f8d7da;
    color: #721c24;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

.required {
    color: var(--danger);
}

.optional {
    color: var(--text-light);
    font-weight: 400;
    font-size: 0.8rem;
}

.form-note {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.75rem;
    text-align: center;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* --- Error Page --- */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
}

.error-code {
    font-size: 5rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.error-message {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* --- Empty State --- */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-text {
    color: var(--text-light);
    text-align: center;
    padding: 1rem;
}

/* --- Footer --- */
.site-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.6);
    margin-top: 3rem;
    padding: 1.5rem 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-nav a {
    color: rgba(255,255,255,0.6);
}

.footer-nav a:hover {
    color: #fff;
}

/* ===========================
   ADMIN STYLES
   =========================== */

/* Admin Login */
.admin-login-page {
    background: var(--bg-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.admin-login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
}

.admin-login-box {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-hover);
    text-align: center;
}

.admin-login-brand {
    margin-bottom: 2rem;
}

.admin-login-brand .logo-text {
    color: var(--navy);
    font-size: 2rem;
}

.admin-login-brand p {
    color: var(--text-light);
    margin-top: 0.25rem;
}

.login-error {
    background: #f8d7da;
    color: #721c24;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.login-form .form-group {
    text-align: left;
}

/* Admin Layout */
.admin-body {
    display: flex;
    min-height: 100vh;
    background: var(--bg-gray);
}

.admin-sidebar {
    width: 240px;
    background: var(--navy);
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    transition: transform var(--transition);
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.sidebar-brand .logo-text {
    font-size: 1.4rem;
}

.sidebar-subtitle {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0.5rem 0;
}

.sidebar-link {
    display: block;
    padding: 0.7rem 1.5rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: all var(--transition);
}

.sidebar-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.sidebar-link.active {
    color: #fff;
    background: rgba(67, 97, 238, 0.3);
    border-right: 3px solid var(--accent);
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0.5rem 1.5rem;
}

.sidebar-logout {
    color: rgba(255,255,255,0.4) !important;
}

/* Admin Main */
.admin-main {
    flex: 1;
    margin-left: 240px;
    min-height: 100vh;
}

.admin-topbar {
    background: #fff;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.admin-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text);
}

.admin-page-title {
    font-size: 1.15rem;
    font-weight: 600;
}

.admin-content {
    padding: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent);
}

.stat-card.stat-warning {
    border-left-color: var(--warning);
}

.stat-card.stat-success {
    border-left-color: var(--success);
}

.stat-card.stat-info {
    border-left-color: #0984e3;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Dashboard Panels */
.dashboard-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.panel {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.5rem;
}

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.panel-more {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

/* Admin Table */
.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.admin-table thead {
    background: var(--bg-gray);
}

.admin-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.admin-table td {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

.admin-table tbody tr:hover {
    background: rgba(67, 97, 238, 0.03);
}

.col-check {
    width: 40px;
}

.action-cell {
    white-space: nowrap;
    display: flex;
    gap: 0.35rem;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-success, .status-completed, .status-active {
    background: #d4edda;
    color: #155724;
}

.status-error, .status-failed, .status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-running, .status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-unsubscribed {
    background: var(--bg-gray);
    color: var(--text-light);
}

/* Admin Toolbar */
.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Edit Form */
.edit-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}

.edit-main {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.edit-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.edit-panel {
    background: #fff;
    padding: 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.edit-panel h4 {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.preview-thumb {
    width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.preview-source, .preview-date, .preview-status {
    font-size: 0.82rem;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.preview-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.edit-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.body-editor {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 1024px) {
    .dashboard-panels {
        grid-template-columns: 1fr;
    }

    .edit-layout {
        grid-template-columns: 1fr;
    }

    .subscribe-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    /* Mobile nav */
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--navy);
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

    .main-nav.open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        padding: 0.5rem 0;
    }

    .nav-link {
        display: block;
        padding: 0.75rem 1.5rem;
    }

    .nav-subscribe {
        margin: 0.5rem 1.5rem;
        text-align: center;
        border-radius: var(--radius-sm);
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(255,255,255,0.05);
        border-radius: 0;
    }

    .dropdown-menu li a {
        color: rgba(255,255,255,0.7);
        padding-left: 2.5rem;
    }

    .dropdown-menu li a:hover {
        background: rgba(255,255,255,0.08);
        color: #fff;
    }

    /* Hero */
    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    /* Grid */
    .article-grid {
        grid-template-columns: 1fr;
    }

    /* Article detail */
    .article-title {
        font-size: 1.4rem;
    }

    .article-meta-bar {
        font-size: 0.8rem;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    /* Archive */
    .archive-item {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    /* Form */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Tagline hidden on mobile */
    .tagline {
        display: none;
    }

    /* Admin */
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-menu-toggle {
        display: block;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        gap: 0.25rem;
    }

    .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* --- Print --- */
@media print {
    .site-header, .site-footer, .share-buttons,
    .pagination, .admin-sidebar, .admin-topbar {
        display: none !important;
    }

    .admin-main {
        margin-left: 0;
    }

    .article-detail {
        max-width: 100%;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* --- Search in nav bar --- */
.nav-search {
    display: flex;
    align-items: center;
}
.search-form {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}
.search-input {
    padding: 0.3rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
    width: 140px;
    background: var(--color-surface, #fff);
    color: inherit;
}
.search-input:focus {
    outline: none;
    border-color: var(--color-primary, #2563eb);
}
.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    line-height: 1;
}

/* --- Search page --- */
.search-page-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    max-width: 600px;
}
.search-page-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background: var(--color-surface, #fff);
    color: inherit;
}
.search-page-input:focus {
    outline: none;
    border-color: var(--color-primary, #2563eb);
}
.search-result-count {
    margin-bottom: 1.5rem;
    color: var(--color-muted, #666);
}
