/* Global Styles */
:root {
    --primary-color: #3f51b5;
    --primary-light: #757de8;
    --primary-dark: #002984;
    --secondary-color: #f50057;
    --secondary-light: #ff5983;
    --secondary-dark: #bb002f;
    --success-color: #4caf50;
    --error-color: #f44336;
    --info-color: #2196f3;
    --text-color: #333333;
    --text-secondary: #666666;
    --card-color: #ffffff;
    --background-color: #f5f5f5;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    background-color: var(--card-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

header h1 {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.main-nav {
    margin-left: auto;
    margin-right: 20px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    transition: all 0.3s;
}

.main-nav a:hover {
    background-color: rgba(74, 111, 165, 0.1);
}

.main-nav a.active {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
}

#user-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

#user-email {
    font-weight: 500;
}

/* Form Styles - Enhanced */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.2s;
}

input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    background-color: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.2);
}

.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: var(--error-color);
}

.form-group.has-error label {
    color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

.form-group.has-error .error-message {
    display: block;
}

/* Floating label effect */
.form-group.floating {
    margin-top: 24px;
}

.form-group.floating label {
    position: absolute;
    top: 12px;
    left: 16px;
    background-color: transparent;
    transition: all 0.2s ease;
    pointer-events: none;
    color: #999;
    padding: 0 5px;
}

.form-group.floating input:focus ~ label,
.form-group.floating input:not(:placeholder-shown) ~ label,
.form-group.floating select:focus ~ label,
.form-group.floating textarea:focus ~ label {
    top: -10px;
    left: 10px;
    font-size: 12px;
    color: var(--primary-color);
    background-color: white;
}

.form-group.floating input,
.form-group.floating select,
.form-group.floating textarea {
    padding: 16px;
}

/* Checkbox and Radio Styles */
.checkbox-wrapper, .radio-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"],
.radio-wrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-custom, .radio-custom {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    border: 2px solid #ddd;
    border-radius: 3px;
    background-color: white;
    transition: all 0.2s;
}

.radio-custom {
    border-radius: 50%;
}

.checkbox-wrapper:hover .checkbox-custom,
.radio-wrapper:hover .radio-custom {
    border-color: var(--primary-color);
}

.checkbox-wrapper input:checked ~ .checkbox-custom,
.radio-wrapper input:checked ~ .radio-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-custom:after,
.radio-custom:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-wrapper input:checked ~ .checkbox-custom:after,
.radio-wrapper input:checked ~ .radio-custom:after {
    display: block;
}

.checkbox-wrapper .checkbox-custom:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.radio-wrapper .radio-custom:after {
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: white;
}

/* Button Styles - Enhanced */
button, .button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all var(--transition-speed);
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

button:hover, .button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

button:active, .button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button::after, .button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, #fff 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

button:active::after, .button:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Button with icon */
button.icon-button, .button.icon-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

button.icon-button i, .button.icon-button i {
    font-size: 18px;
}

/* Outline button */
button.outline, .button.outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

button.outline:hover, .button.outline:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Button Micro-interactions */
.button {
    position: relative;
    overflow: hidden;
}

.button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%, -50%);
    transform-origin: 50% 50%;
}

.button:focus:not(:active)::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    20% {
        transform: scale(25, 25);
        opacity: 0.3;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

/* Loading States */
.button.loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.button.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: button-loading-spinner 0.8s linear infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Image Upload Styles - Enhanced */
.image-upload-area {
    border: 2px dashed #ddd;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    background-color: #f9f9f9;
    margin-bottom: 20px;
}

.image-upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(63, 81, 181, 0.05);
}

.image-upload-area.active {
    border-color: var(--primary-color);
    background-color: rgba(63, 81, 181, 0.1);
}

.image-upload-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.image-upload-area:hover .image-upload-icon {
    color: var(--primary-color);
}

.image-upload-text {
    color: #666;
    margin-bottom: 10px;
}

.image-upload-subtext {
    font-size: 14px;
    color: #999;
}

/* Image preview */
.image-preview {
    margin-top: 20px;
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.image-preview img {
    display: block;
    max-width: 100%;
    max-height: 300px;
    margin: 0 auto;
}

.image-preview-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
}

.image-preview-actions button {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.8);
    color: #666;
}

.image-preview-actions button:hover {
    background-color: white;
    color: var(--primary-color);
}

/* Tags Input */
.tags-input-container {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: var(--border-radius);
    gap: 5px;
    background-color: white;
}

.tags-input-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.2);
}

.tag-item {
    display: inline-flex;
    align-items: center;
    background-color: rgba(63, 81, 181, 0.1);
    color: var(--primary-color);
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.tag-item .close {
    margin-left: 5px;
    cursor: pointer;
    font-size: 12px;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.tag-item .close:hover {
    background-color: rgba(0, 0, 0, 0.2);
}

.tags-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 5px;
    font-size: 14px;
    min-width: 100px;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Card Styles */
.card {
    background-color: var(--card-color);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.card h3 {
    margin-bottom: 16px;
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Dashboard Styles */
.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
    margin-top: 20px;
}

#dashboard-section {
    display: block !important;
    padding: 20px 0;
}

#dashboard-section h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 24px;
}

.dashboard-header {
    margin-bottom: 20px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .draft-posts-card,
    .account-card {
        width: 100%;
    }
}

/* Make the account card smaller and draft posts card larger */
@media (min-width: 992px) {
    .account-card {
        max-width: 100%;
    }
    
    .account-card button {
        width: 100%;
    }
    
    .draft-posts-card {
        min-height: 400px;
        min-width: 600px;
    }
}

/* Make the draft posts card the primary focus */
.draft-posts-card {
    width: 100%;
    display: block !important; /* Force display */
    min-height: 200px; /* Ensure minimum height */
    border: 1px solid rgba(63, 81, 181, 0.2); /* Subtle border to highlight */
    background-color: #fff;
    padding: 20px;
}

.draft-posts-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 22px;
}

#draft-posts-list {
    display: block !important; /* Force display */
    min-height: 100px; /* Ensure minimum height */
    padding: 10px;
}

/* Make the account card smaller and less prominent */
.account-card {
    width: 100%;
    margin-bottom: 0;
}

/* Account links styling */
.account-links {
    margin-top: 15px;
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.profile-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    transition: all 0.2s;
}

.profile-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

@media (min-width: 992px) {
    .dashboard-content {
        padding-top: 20px;
    }
    
    .draft-posts-card {
        min-height: 500px;
    }
    
    .account-card {
        max-width: 300px;
        position: absolute;
        top: 0;
        right: 0;
        z-index: 10;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .account-card button {
        width: 100%;
    }
}

/* Instagram Account Item */
.account-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: var(--border-radius);
    background-color: #f9f9f9;
    margin-bottom: 10px;
    transition: transform 0.2s;
}

.account-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
}

.account-details {
    flex: 1;
}

.account-details h4 {
    margin-bottom: 5px;
    color: var(--secondary-color);
}

/* Post Item */
.post-item {
    padding: 15px;
    border-radius: var(--border-radius);
    background-color: #f9f9f9;
    margin-bottom: 10px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.post-date {
    font-size: 14px;
    color: #666;
}

.post-content {
    margin-bottom: 10px;
}

.post-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Message Container - Improved Toast Notifications */
#message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background-color: var(--success-color);
    color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    max-width: 500px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}

#message-container.visible {
    transform: translateX(0);
    opacity: 1;
}

#message-text {
    flex: 1;
    margin-right: 15px;
}

#message-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
    transition: transform 0.2s;
}

#message-close:hover {
    transform: scale(1.2);
}

#message-container.error {
    background-color: var(--error-color);
    border-left: 5px solid #b71c1c;
}

#message-container.success {
    background-color: var(--success-color);
    border-left: 5px solid #2e7d32;
}

#message-container.info {
    background-color: var(--info-color);
    border-left: 5px solid #0d47a1;
}

#message-container.warning {
    background-color: var(--warning-color);
    border-left: 5px solid #e65100;
}

/* Loading Spinner - Improved */
#loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

@keyframes spin {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 10px;
    }
    
    .main-nav {
        margin: 15px 0;
        width: 100%;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    #message-container {
        min-width: auto;
        max-width: 90%;
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-100%);
    }
    
    #message-container.visible {
        transform: translateX(-50%) translateY(0);
    }
}

/* Modal improvements */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.modal-content {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 90%;
    width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.hidden .modal-content {
    transform: scale(0.8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-body {
    padding: 20px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s, transform 0.2s;
}

.close-btn:hover {
    color: var(--error-color);
    transform: scale(1.2);
}

/* Image Management Styles */
#images-section {
    margin-top: 20px;
}
 
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-actions {
    display: flex;
    gap: 10px;
}

.filter-container {
    background-color: var(--card-color);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--box-shadow);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    margin-bottom: 0;
    min-width: 120px;
}

.filter-group select {
    flex: 1;
    max-width: 300px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.image-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s;
    cursor: pointer;
}

.image-card:hover {
    transform: translateY(-5px);
}

.image-thumbnail {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.image-info {
    padding: 15px;
}

.image-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.image-theme {
    display: inline-block;
    background-color: rgba(74, 111, 165, 0.1);
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

#page-info {
    font-size: 14px;
    color: #666;
}

/* Post Management Styles */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.posts-container {
    margin-top: 20px;
}

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

.post-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.post-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.post-title {
    margin: 0;
    color: var(--primary-color);
    font-size: 18px;
}

.post-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    background-color: #e8f5e9;
    color: #2e7d32;
}

.post-description {
    color: var(--text-color);
    font-size: 14px;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-recurrence {
    font-size: 14px;
    color: #666;
}

/* Post Form Styles */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.dates-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.caption-preview {
    background-color: #f5f7fa;
    padding: 10px;
    border-radius: var(--border-radius);
    font-family: monospace;
    white-space: pre-wrap;
    max-height: 100px;
    overflow-y: auto;
}

/* Post Details Styles */
.details-group {
    margin-bottom: 15px;
}

.details-group label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.post-details-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Button Styles */
.primary-btn {
    background-color: var(--primary-color);
    color: white;
}

.secondary-btn {
    background-color: #e0e0e0;
    color: var(--text-color);
}

.secondary-btn:hover {
    background-color: #d0d0d0;
}

.danger-btn {
    background-color: var(--error-color);
    color: white;
}

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

.primary-btn:hover {
    background-color: var(--primary-dark);
}

/* Profile Styles */
#profile-section {
    margin-top: 20px;
}

.profile-header {
    margin-bottom: 20px;
}

.profile-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .profile-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

.profile-display-section {
    padding: 15px 0;
}

.profile-form-section {
    padding: 15px 0;
    transition: all 0.3s ease;
}

.profile-info-row {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.profile-label {
    font-weight: 600;
    min-width: 120px;
    color: var(--secondary-color);
}

.profile-value {
    flex: 1;
    word-break: break-word;
}

.instructions-display {
    white-space: pre-line;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: var(--border-radius);
    border: 1px solid #eee;
    min-height: 80px;
}

.input-error {
    color: var(--error-color);
    font-size: 14px;
    margin-top: 5px;
}

.form-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: var(--border-radius);
    font-size: 14px;
}

.form-message.success {
    background-color: rgba(67, 160, 71, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(67, 160, 71, 0.3);
}

.form-message.error {
    background-color: rgba(229, 57, 53, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(229, 57, 53, 0.3);
}

.form-message.info {
    background-color: rgba(33, 150, 243, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(33, 150, 243, 0.3);
}

/* Loading Message */
.loading-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: #666;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-nav {
        margin: 10px 0;
    }
    
    #user-status {
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
    }
    
    .image-details-container {
        grid-template-columns: 1fr;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group select {
        max-width: 100%;
    }
}

/* Footer */
footer {
    margin-top: 50px;
    text-align: center;
    color: #777;
    font-size: 14px;
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

.main-nav a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--border-radius);
  transition: background-color 0.3s;
}

.main-nav a:hover {
  background-color: rgba(74, 111, 165, 0.1);
}

.main-nav a.active {
  background-color: var(--primary-color);
  color: white;
}

/* Quick actions styling */
.quick-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.quick-actions .button {
    flex: 1;
    min-width: 150px;
    text-align: center;
    margin-top: 10px;
}

/* Multiple Image Upload Styles */
.upload-preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.preview-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

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

.preview-item .remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.preview-item .remove-preview:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

/* Upload Progress Styles */
.upload-progress-container {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.progress-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: var(--border-radius);
}

.progress-item-preview {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-right: 15px;
    flex-shrink: 0;
}

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

.progress-item-details {
    flex-grow: 1;
}

.progress-item-name {
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.progress-container {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-status {
    font-size: 12px;
    color: var(--text-secondary);
}

.progress-status.error {
    color: var(--error-color);
}

.progress-status.success {
    color: var(--success-color);
}

.progress-item-actions {
    margin-left: 10px;
}

.progress-item-actions button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 16px;
}

.progress-item-actions button:hover {
    color: var(--primary-color);
}

.overall-progress-container {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin: 10px 0;
}

.upload-summary {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.modal-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* Image Details Modal Styles */
.modal-content.large-modal {
    width: 90%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    height: auto;
    max-height: 90vh;
}

.image-details-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

.image-preview-large {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: var(--border-radius);
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.image-preview-large img {
    max-width: 100%;
    max-height: 480px;
    border-radius: var(--border-radius);
    display: block;
}

.image-metadata {
    padding: 10px;
    overflow-y: auto;
    max-height: 500px;
}

@media (max-width: 768px) {
    .image-details-container {
        grid-template-columns: 1fr;
    }
    
    .image-preview-large {
        max-height: 300px;
    }
    
    .image-preview-large img {
        max-height: 300px;
    }
}

/* Post Instances Page Styles */
.tab-container {
    display: flex;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    margin-right: 5px;
}

.tab-btn.active {
    background-color: #fff;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

.tab-content {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-scheduled {
    background-color: #e3f2fd;
    color: #1976d2;
}

.status-published {
    background-color: #e8f5e9;
    color: #388e3c;
}

.status-failed {
    background-color: #ffebee;
    color: #d32f2f;
}

.status-default {
    background-color: #f5f5f5;
    color: #757575;
}

.actions-cell {
    white-space: nowrap;
    text-align: right !important;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: 5px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: #f0f0f0;
}

.icon-btn svg {
    vertical-align: middle;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.pagination-btn {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--primary-dark);
}

.pagination-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#pagination-page-info {
    margin: 0 15px;
}

/* Post Details Modal Styles */
.post-details-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.post-preview {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    text-align: center;
}

.post-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.post-info {
    flex: 2;
    min-width: 300px;
}

.post-caption {
    background-color: #f8f8f8;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
}

.error-message {
    color: var(--error-color);
    background-color: #ffebee;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
}

/* Data Table Styles */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, 
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #f8f8f8;
    font-weight: 500;
}

.data-table tr:hover {
    background-color: #f5f5f5;
}

.data-table .loading-row td,
.data-table .empty-row td,
.data-table .error-row td {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.data-table .error-row td {
    color: var(--error-color);
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    gap: 15px;
}

.pagination-btn {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--primary-dark);
}

.pagination-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Empty state styling */
.empty-state {
    padding: 20px;
    text-align: center;
    color: #666;
}

.empty-state p {
    margin: 10px 0;
}

.empty-state-subtext {
    font-size: 0.9em;
    color: #888;
    font-style: italic;
}

/* Media thumbnail styling */
.media-thumbnail {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
}

.media-thumbnail:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.no-media {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.9em;
}

/* Adjust table styling for media column */
.data-table td {
  vertical-align: middle;
  padding: 12px 16px;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
  text-align: center;
  width: 80px;
}

/* Draft posts styling */
.post-item {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

.post-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 8px;
}

.post-header h4 {
  margin: 0;
  font-size: 18px;
  color: var(--primary-color);
}

.post-status {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.post-status.draft {
  background-color: #ffe0b2;
  color: #e65100;
}

.post-content-wrapper {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.post-media {
  flex: 0 0 200px;
}

.post-media img {
  width: 100%;
  height: auto;
  max-height: 200px;
  border-radius: 4px;
  object-fit: cover;
}

.post-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-caption {
  margin-bottom: 16px;
  color: #555;
  font-size: 14px;
  line-height: 1.5;
  flex-grow: 1;
}

.post-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.post-actions .btn {
  padding: 8px 16px;
  font-size: 14px;
}

/* Responsive adjustments for post items */
@media (max-width: 768px) {
  .post-content-wrapper {
    flex-direction: column;
  }
  
  .post-media {
    flex: 0 0 auto;
    margin-bottom: 16px;
    width: 100%;
  }
}
