/* Blog Management Styles - Enhanced for Author Content Creation */

:root {
    --admin-primary: #2C5282;
    --admin-secondary: #FFAB02;
    --admin-success: #48BB78;
    --admin-warning: #ED8936;
    --admin-error: #E53E3E;
    --admin-bg: #F7FAFC;
    --admin-card: #FFFFFF;
    --admin-border: #E2E8F0;
    --admin-text: #2D3748;
    --admin-text-light: #718096;
    --admin-shadow: rgba(0, 0, 0, 0.1);
    --admin-shadow-hover: rgba(0, 0, 0, 0.15);
    
    /* Blog-specific colors */
    --blog-accent: #805AD5;
    --blog-gradient: linear-gradient(135deg, var(--admin-primary), var(--blog-accent));
    --status-published: #48BB78;
    --status-draft: #ED8936;
    --status-scheduled: #4299E1;
}

/* Base Styles */
body {
    background: var(--admin-bg);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

/* Navigation - ensure proper sizing */
.nav {
    background: var(--admin-card);
    border-bottom: 1px solid var(--admin-border);
    box-shadow: 0 2px 10px var(--admin-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-title {
    color: var(--admin-primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link {
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--admin-text);
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: var(--admin-border);
    color: var(--admin-primary);
}

.nav-link.active {
    background: var(--admin-primary);
    color: white;
}

.back-to-site {
    background: var(--admin-secondary);
    color: white !important;
    font-weight: 600;
}

.back-to-site:hover {
    background: #E69500;
}

.auth-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--admin-error);
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.auth-nav-link:hover {
    background: rgba(229, 62, 62, 0.1);
}

/* Mobile Toggle - Hidden by default, shown on mobile or with 5+ features */
.mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* Show hamburger when customer has 5+ features (even on desktop) */
.nav-container.has-many-features .mobile-toggle {
    display: flex;
}

/* Show hamburger when customer has 5+ features, hide some nav links on desktop */
.nav-container.has-many-features .nav-links {
    display: flex;
}

@media (min-width: 769px) {
    .nav-container.has-many-features .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--admin-card);
        border-top: 1px solid var(--admin-border);
        box-shadow: 0 2px 10px var(--admin-shadow);
        flex-direction: column;
        padding: 1rem 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-container.has-many-features .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-container.has-many-features .nav-link {
        width: 100%;
        text-align: center;
        padding: 1rem;
        border-radius: 0;
    }
}

.mobile-toggle span {
    width: 100%;
    height: 3px;
    background: var(--admin-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Blog Main Container */
.blog-main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 70px);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--admin-border);
    border-top: 4px solid var(--admin-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* No Access State */
.no-access-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.access-prompt {
    text-align: center;
    background: var(--admin-card);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px var(--admin-shadow);
    max-width: 600px;
}

.access-prompt h2 {
    color: var(--admin-primary);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.feature-benefits {
    display: grid;
    gap: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--admin-bg);
    border-radius: 12px;
}

.benefit-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.benefit h4 {
    margin: 0 0 0.5rem 0;
    color: var(--admin-primary);
}

.benefit p {
    margin: 0;
    color: var(--admin-text-light);
}

.upgrade-btn {
    background: var(--blog-gradient);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(128, 90, 213, 0.3);
}

/* Blog Panel */
.blog-panel {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Blog Header */
.blog-header {
    background: var(--admin-card);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--admin-shadow);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-content h1 {
    color: var(--admin-primary);
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.header-content p {
    color: var(--admin-text-light);
    margin: 0;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.primary-btn {
    background: var(--blog-gradient);
    color: white;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(128, 90, 213, 0.3);
}

.secondary-btn {
    background: white;
    color: var(--admin-primary);
    border: 2px solid var(--admin-border);
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    border-color: var(--admin-primary);
    background: rgba(44, 82, 130, 0.05);
    transform: translateY(-1px);
}

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

.stat-item {
    background: var(--admin-card);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--admin-shadow);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--admin-shadow-hover);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--admin-text-light);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

/* Search and Filter Bar */
.search-filter-bar {
    background: var(--admin-card);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--admin-shadow);
    margin-bottom: 2rem;
}

.search-container {
    position: relative;
    margin-bottom: 1rem;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    border: 2px solid var(--admin-border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-text-light);
    font-size: 1.2rem;
}

.filter-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--admin-primary);
}

.clear-filters {
    background: var(--admin-error);
    color: white;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters:hover {
    background: #C53030;
}

/* Posts Container */
.posts-container {
    min-height: 400px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Post Card */
.post-card {
    background: var(--admin-card);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--admin-shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px var(--admin-shadow-hover);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid var(--admin-border);
}

.post-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.published {
    background: var(--status-published);
}

.status-indicator.draft {
    background: var(--status-draft);
}

.status-indicator.scheduled {
    background: var(--status-scheduled);
}

.status-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--admin-text-light);
    text-transform: capitalize;
}

.post-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.edit-btn {
    background: rgba(72, 187, 120, 0.1);
    color: var(--admin-success);
}

.edit-btn:hover {
    background: var(--admin-success);
    color: white;
}

.duplicate-btn {
    background: rgba(66, 153, 225, 0.1);
    color: #4299E1;
}

.duplicate-btn:hover {
    background: #4299E1;
    color: white;
}

.delete-btn {
    background: rgba(229, 62, 62, 0.1);
    color: var(--admin-error);
}

.delete-btn:hover {
    background: var(--admin-error);
    color: white;
}

.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.25rem;
}

.post-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--admin-text);
    line-height: 1.4;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--admin-text-light);
}

.post-category {
    background: var(--admin-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.post-excerpt {
    color: var(--admin-text-light);
    line-height: 1.5;
    margin: 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: rgba(128, 90, 213, 0.1);
    color: var(--blog-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.schedule-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    background: rgba(66, 153, 225, 0.1);
    border-top: 1px solid var(--admin-border);
    font-size: 0.875rem;
    color: #4299E1;
    font-weight: 500;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--admin-card);
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--admin-shadow);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state h3 {
    color: var(--admin-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.empty-state p {
    color: var(--admin-text-light);
    margin-bottom: 2rem;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1rem;
}

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

.modal-content {
    background: var(--admin-card);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

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

.post-modal {
    max-width: 900px;
    width: 90vw;
}

.delete-modal {
    max-width: 500px;
    width: 90vw;
}

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

.modal-header h3 {
    margin: 0;
    color: var(--admin-primary);
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--admin-text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

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

.modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--admin-border);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Form Styles */
.post-form {
    max-width: none;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--admin-border);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section h4 {
    color: var(--admin-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--admin-text);
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: white;
    color: var(--admin-text);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
    background: white;
}

.form-group small {
    color: var(--admin-text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

/* Image Upload Area */
.image-upload-area {
    border: 2px dashed var(--admin-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.image-upload-area:hover {
    border-color: var(--admin-primary);
    background: rgba(44, 82, 130, 0.02);
}

.image-upload-area.dragover {
    border-color: var(--admin-success);
    background: rgba(72, 187, 120, 0.1);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.upload-placeholder p {
    margin: 0.5rem 0;
    color: var(--admin-text);
    font-weight: 500;
}

.upload-placeholder small {
    color: var(--admin-text-light);
}

.image-preview {
    position: relative;
}

.image-preview img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.image-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview:hover .image-actions {
    opacity: 1;
}

.image-actions button {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.image-actions button:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Content Editor */
.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.75rem;
    background: var(--admin-bg);
    border: 2px solid var(--admin-border);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.editor-toolbar button {
    background: white;
    border: 1px solid var(--admin-border);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.editor-toolbar button:hover {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
}

.toolbar-separator {
    color: var(--admin-border);
    margin: 0 0.5rem;
    display: flex;
    align-items: center;
}

.content-editor {
    min-height: 300px;
    padding: 1rem;
    border: 2px solid var(--admin-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    font-size: 1rem;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.content-editor:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.1);
}

.content-editor[contenteditable]:empty::before {
    content: attr(placeholder);
    color: var(--admin-text-light);
    font-style: italic;
}

.editor-stats {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--admin-bg);
    border: 2px solid var(--admin-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    font-size: 0.875rem;
    color: var(--admin-text-light);
}

/* SEO Section */
.seo-section {
    background: rgba(72, 187, 120, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(72, 187, 120, 0.2);
}

/* Button Variants */
.danger-btn {
    background: var(--admin-error);
    color: white;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.danger-btn:hover {
    background: #C53030;
    transform: translateY(-1px);
}

.publish-btn {
    background: linear-gradient(135deg, var(--admin-success), #38A169);
}

.schedule-btn {
    background: linear-gradient(135deg, #4299E1, #3182CE);
}

/* Warning Text */
.warning-text {
    color: var(--admin-error);
    font-weight: 500;
    font-style: italic;
}

/* Notification */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--admin-card);
    border-radius: 12px;
    box-shadow: 0 8px 30px var(--admin-shadow);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 350px;
    border-left: 4px solid var(--admin-primary);
}

.notification.success {
    border-left-color: var(--admin-success);
}

.notification.error {
    border-left-color: var(--admin-error);
}

.notification.warning {
    border-left-color: var(--admin-warning);
}

.notification.active {
    transform: translateX(0);
}

.notification-icon {
    font-size: 1.25rem;
}

.notification-message {
    color: var(--admin-text);
    font-weight: 500;
}

/* ============================================ */
/* ENHANCED 10-MINUTE SCHEDULING STYLES - NEW */
/* ============================================ */

/* Enhanced form section styling for scheduling */
.form-section.scheduling-section {
    background: rgba(66, 153, 225, 0.02);
    border: 2px solid rgba(66, 153, 225, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.form-section.scheduling-section:hover {
    border-color: rgba(66, 153, 225, 0.4);
    box-shadow: 0 4px 20px rgba(66, 153, 225, 0.1);
}

.form-section.scheduling-section h4 {
    color: #4299E1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Enhanced datetime input styling */
.form-group input[type="datetime-local"] {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, monospace;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
}

.form-group input[type="datetime-local"]:valid {
    border-color: var(--admin-success);
    background: rgba(72, 187, 120, 0.05);
}

.form-group input[type="datetime-local"]:invalid {
    border-color: var(--admin-error);
    background: rgba(229, 62, 62, 0.05);
}

/* Custom styling for datetime picker icon */
.form-group input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%234299E1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') center/contain no-repeat;
    color: transparent;
    cursor: pointer;
    padding: 4px;
}

.form-group input[type="datetime-local"]:focus::-webkit-calendar-picker-indicator {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%232C5282" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>') center/contain no-repeat;
}

/* Schedule validation feedback */
.schedule-validation {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.875rem;
    display: none;
}

.schedule-validation.valid {
    background: rgba(72, 187, 120, 0.1);
    border: 1px solid rgba(72, 187, 120, 0.3);
    color: var(--admin-success);
    display: block;
}

.schedule-validation.invalid {
    background: rgba(229, 62, 62, 0.1);
    border: 1px solid rgba(229, 62, 62, 0.3);
    color: var(--admin-error);
    display: block;
}

/* Enhanced scheduled post indicators */
.post-card.scheduled .post-header::after {
    content: "";
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: var(--status-scheduled);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(66, 153, 225, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(66, 153, 225, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(66, 153, 225, 0);
    }
}

/* Enhanced schedule info in post cards */
.schedule-info {
    background: linear-gradient(90deg, rgba(66, 153, 225, 0.1), rgba(66, 153, 225, 0.05));
    border-left: 3px solid #4299E1;
}

.schedule-info .schedule-icon {
    animation: tick 1s infinite;
}

@keyframes tick {
    0%, 50% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.1);
    }
}

/* Enhanced save button states for scheduled posts */
.primary-btn.schedule-btn {
    background: linear-gradient(135deg, #4299E1, #3182CE);
    position: relative;
    overflow: hidden;
}

.primary-btn.schedule-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.primary-btn.schedule-btn:hover::after {
    left: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Always show hamburger on mobile */
    .mobile-toggle {
        display: flex !important;
    }
    
    /* Mobile navigation menu */
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--admin-card);
        border-top: 1px solid var(--admin-border);
        box-shadow: 0 2px 10px var(--admin-shadow);
        flex-direction: column;
        padding: 1rem 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 1rem;
        border-radius: 0;
    }
    
    .blog-main {
        padding: 1rem;
    }
    
    .blog-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1.5rem;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .header-actions {
        justify-content: center;
    }
    
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .post-header {
        padding: 1rem;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
        max-height: calc(100vh - 1rem);
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .editor-toolbar {
        gap: 0.125rem;
    }
    
    .editor-toolbar button {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.active {
        transform: translateY(0);
    }
    
    /* Enhanced scheduling section mobile styles */
    .form-section.scheduling-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-header {
        padding: 1rem;
    }
    
    .header-content h1 {
        font-size: 1.75rem;
    }
    
    .stats-bar {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .search-filter-bar {
        padding: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column-reverse;
        align-items: stretch;
    }
    
    .form-section {
        padding-bottom: 1.5rem;
    }
    
    .upload-placeholder {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    /* Mobile datetime input - prevent zoom on iOS */
    .form-group input[type="datetime-local"] {
        font-size: 16px;
    }
    
    .notification {
        left: 5px;
        right: 5px;
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    .blog-main {
        padding: 0;
    }
    
    .modal-overlay,
    .notification,
    .header-actions,
    .post-actions,
    .search-filter-bar,
    .schedule-validation {
        display: none !important;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--admin-border);
    }
}