/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #db8a70;
    --primary-dark: #c57559;
    --primary-light: #e5a893;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --success: #48bb78;
    --warning: #ed8936;
    --danger: #f56565;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

body:not(.show-focus-outlines) :focus-visible {
    outline: none;
    box-shadow: none;
}

body.show-focus-outlines :focus-visible {
    outline: 2px solid rgba(219, 138, 112, 0.85);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(219, 138, 112, 0.18);
    transition: outline 0.15s ease, box-shadow 0.15s ease;
}

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

/* Header */
.main-header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.user-info i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.admin-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(219, 138, 112, 0.1);
    border-radius: 6px;
    border: 1px solid var(--primary-light);
}

.admin-controls label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.admin-controls label i {
    color: var(--primary-color);
}

.client-selector {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-white);
    min-width: 200px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-direction: column;
    align-items: flex-start;
}

.logo i {
    color: var(--primary-color);
}

.powered-by {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-light);
    display: block;
    margin-top: -0.25rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Open Sans', sans-serif;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

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

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-light);
    font-size: 1.2rem;
    transition: color 0.2s;
}

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

/* Trial Countdown Badge */
.trial-countdown-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border-radius: 24px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(219, 138, 112, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.trial-countdown-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(219, 138, 112, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.trial-countdown-badge i {
    font-size: 1.1rem;
}

.trial-countdown-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.trial-countdown-days {
    font-size: 1.1rem;
    font-weight: 700;
}

.trial-countdown-cta {
    font-size: 0.75rem;
    opacity: 0.95;
    font-weight: 500;
}

/* Account Button */
.btn-accent {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-accent:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Navigation Tabs */
.view-tabs {
    display: flex;
    gap: 1rem;
    margin: 2rem 0 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Open Sans', sans-serif;
}

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

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Filters */
.filters-section {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.filter-select,
.search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Open Sans', sans-serif;
    transition: border-color 0.2s;
}

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

.search-input {
    min-width: 250px;
}

/* View Containers */
.view-container {
    display: none;
}

.view-container.active {
    display: block;
}

/* Calendar View */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.calendar-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--border-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day-header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.calendar-day {
    background-color: var(--bg-white);
    min-height: 120px;
    max-height: 150px;
    padding: 0.5rem;
    position: relative;
    transition: background-color 0.2s;
    overflow: hidden;
}

.calendar-day:hover {
    background-color: #f9fafb;
}

.calendar-day.other-month {
    background-color: #fafafa;
    opacity: 0.6;
}

.calendar-day.today {
    background-color: #fef5f1;
}

.day-number {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.calendar-day-add {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(219, 138, 112, 0.35);
    background: rgba(219, 138, 112, 0.12);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.85;
    box-shadow: none;
}

.calendar-day-add:hover,
.calendar-day-add:focus-visible {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: scale(1.05);
    opacity: 1;
    outline: none;
}

.calendar-day.other-month .calendar-day-add {
    opacity: 0.6;
}

@media (hover: hover) {
    .calendar-day-add {
        opacity: 0;
    }
    .calendar-day:hover .calendar-day-add,
    .calendar-day-add:focus-visible {
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .calendar-day-add {
        width: 24px;
        height: 24px;
        top: 0.35rem;
        right: 0.35rem;
    }
}

.calendar-day.today .day-number {
    color: var(--primary-color);
    font-weight: 700;
}

.calendar-posts {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-height: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 2px;
}

/* Scrollbar styling for calendar posts */
.calendar-posts::-webkit-scrollbar {
    width: 3px;
}

.calendar-posts::-webkit-scrollbar-track {
    background: transparent;
}

.calendar-posts::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.calendar-posts::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.calendar-posts .show-more-indicator {
    font-size: 0.65rem;
    color: var(--text-light);
    font-style: italic;
    padding: 0.2rem 0.3rem;
    cursor: pointer;
    text-align: center;
    background: rgba(219, 138, 112, 0.05);
    border-radius: 3px;
}

.calendar-posts .show-more-indicator:hover {
    background: rgba(219, 138, 112, 0.15);
    color: var(--primary-color);
}

.calendar-post {
    padding: 0.3rem 0.4rem;
    border-radius: 3px;
    font-size: 0.65rem;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 2px solid;
    background-color: rgba(219, 138, 112, 0.1);
    border-left-color: var(--primary-color);
    line-height: 1.2;
}

.calendar-post:hover {
    transform: translateX(2px);
    box-shadow: var(--shadow);
}

.calendar-post.status-draft {
    background-color: rgba(113, 128, 150, 0.1);
    border-left-color: var(--text-light);
}

.calendar-post.status-scheduled {
    background-color: rgba(72, 187, 120, 0.1);
    border-left-color: var(--success);
}

.calendar-post.status-published {
    background-color: rgba(219, 138, 112, 0.1);
    border-left-color: var(--primary-color);
}

.calendar-post.status-failed {
    background-color: rgba(245, 101, 101, 0.1);
    border-left-color: var(--danger);
}

.post-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.15rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.65rem;
}

.post-platforms {
    display: flex;
    gap: 0.15rem;
    flex-wrap: wrap;
}

.platform-icon {
    font-size: 0.6rem;
}

/* Quick Action Buttons */
.post-quick-actions {
    display: flex;
    gap: 0.2rem;
    margin-top: 0.3rem;
    padding-top: 0.3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.quick-action-btn {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 0.2rem 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.65rem;
    color: var(--text-dark);
    flex: 1;
}

.quick-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.quick-action-btn.status-btn {
    color: var(--primary-color);
}

.quick-action-btn.analytics-btn {
    color: var(--success);
}

/* Status Dropdown Menu */
.status-dropdown-menu {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    z-index: 1000;
    min-width: 150px;
}

.status-option {
    padding: 0.6rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-option:hover {
    background: var(--bg-light);
}

.status-option.active {
    background: var(--primary-color);
    color: white;
}

.status-option i {
    width: 16px;
}

/* Analytics Modal */
.analytics-modal-content {
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.analytics-modal-body {
    padding: 1.5rem 2rem 2rem;
    overflow-y: auto;
    flex: 1;
}

.analytics-post-summary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.analytics-post-summary h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.analytics-post-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.95;
}

.analytics-post-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Current Analytics Section */
.current-analytics-section {
    background: #fef5f1;
    border: 2px solid #f4d0c4;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.current-analytics-section h4 {
    color: #8b5a3c;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.current-stat {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
}

.current-stat .stat-label {
    font-size: 0.85rem;
    color: #8b7355;
    margin-bottom: 0.5rem;
}

.current-stat .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #c57559;
}

/* Analytics Form */
.analytics-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.analytics-form-group {
    display: flex;
    flex-direction: column;
}

.analytics-form-group label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.analytics-form-group input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.analytics-form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Analytics Calculations */
.analytics-calculations {
    background: #f5f3f0;
    border: 2px solid #d4c5b9;
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.analytics-calculations h4 {
    color: #6b5846;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calculations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.calc-item {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calc-label {
    font-weight: 600;
    color: #64748b;
    font-size: 0.9rem;
}

.calc-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

/* List View */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-post {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.2s;
    cursor: pointer;
    border-left: 4px solid var(--primary-color);
    position: relative; /* Required for absolutely positioned checkbox */
}

.list-post:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Checkbox styling - prevent disappearing on hover */
.list-post-checkbox {
    position: absolute;
    left: 1rem;
    top: 1rem;
    z-index: 10;
    pointer-events: auto;
}

.list-post-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    position: relative;
    z-index: 10;
}

.list-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.list-post-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.list-post-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.list-post-content {
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.list-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-platforms-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-badge.draft {
    background-color: rgba(113, 128, 150, 0.15);
    color: var(--text-light);
}

.status-badge.scheduled {
    background-color: rgba(72, 187, 120, 0.15);
    color: var(--success);
}

.status-badge.published {
    background-color: rgba(219, 138, 112, 0.15);
    color: var(--primary-dark);
}

/* List Post Action Buttons */
.list-post-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.list-action-btn {
    background: white;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.list-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(219, 138, 112, 0.3);
}

.list-action-btn.list-status-btn {
    color: var(--primary-color);
}

.list-action-btn.list-analytics-btn {
    color: var(--success);
}

.list-action-btn.list-analytics-btn:hover {
    background: var(--success);
}


.status-badge.failed {
    background-color: rgba(245, 101, 101, 0.15);
    color: var(--danger);
}

/* Analytics View */
.analytics-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background-color: rgba(219, 138, 112, 0.1);
    color: var(--primary-color);
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.chart-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.chart-card canvas {
    max-height: 300px;
}

.top-post-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.top-post-item:hover {
    background-color: var(--bg-light);
}

.top-post-item:last-child {
    border-bottom: none;
}

.top-post-info h4 {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.top-post-info p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.top-post-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.top-post-stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-light);
}

.top-post-stat i {
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-white);
    border-radius: 12px;
    max-width: 900px; /* Increased from 800px */
    width: 100%;
    box-shadow: var(--shadow-lg);
    margin: 2rem auto;
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    position: relative;
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: var(--bg-white);
    border-radius: 12px 12px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

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

#postForm {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.form-group {
    margin-bottom: 2rem; /* Increased from 1.5rem */
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Open Sans', sans-serif;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.char-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.platform-selector {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.platform-checkbox {
    cursor: pointer;
}

.platform-checkbox input {
    display: none;
}

.platform-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.platform-checkbox input:checked + .platform-badge {
    border-color: var(--primary-color);
    background-color: rgba(219, 138, 112, 0.1);
    color: var(--primary-dark);
}

.platform-badge.instagram { color: #E1306C; }
.platform-badge.facebook { color: #1877F2; }
.platform-badge.twitter { color: #1DA1F2; }
.platform-badge.linkedin { color: #0A66C2; }
.platform-badge.tiktok { color: #000000; }
.platform-badge.youtube { color: #FF0000; }

.platform-checkbox input:checked + .platform-badge.instagram {
    border-color: #E1306C;
    background-color: rgba(225, 48, 108, 0.1);
}

.platform-checkbox input:checked + .platform-badge.facebook {
    border-color: #1877F2;
    background-color: rgba(24, 119, 242, 0.1);
}

.platform-checkbox input:checked + .platform-badge.twitter {
    border-color: #1DA1F2;
    background-color: rgba(29, 161, 242, 0.1);
}

.platform-checkbox input:checked + .platform-badge.linkedin {
    border-color: #0A66C2;
    background-color: rgba(10, 102, 194, 0.1);
}

.platform-checkbox input:checked + .platform-badge.tiktok {
    border-color: #000000;
    background-color: rgba(0, 0, 0, 0.05);
}

/* Multi-Photo URLs */
.media-urls-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.media-url-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.media-url-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: 'Open Sans', sans-serif;
    transition: border-color 0.2s;
}

.media-url-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-remove-url {
    background: #f56565;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-remove-url:hover {
    background: #e53e3e;
    transform: scale(1.05);
}

.btn-add-media {
    align-self: flex-start;
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
}

.btn-add-media:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Carousel Slides */
.carousel-slides-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.carousel-slide-item {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.carousel-slide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.carousel-slide-number {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.carousel-slide-number i {
    font-size: 1rem;
}

.btn-remove-slide {
    background: #f56565;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.btn-remove-slide:hover {
    background: #e53e3e;
    transform: scale(1.05);
}

.carousel-slide-content {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.carousel-slide-content:focus {
    outline: none;
    border-color: var(--primary-color);
}

.carousel-slide-content::placeholder {
    color: #a0aec0;
}

.platform-checkbox input:checked + .platform-badge.youtube {
    border-color: #FF0000;
    background-color: rgba(255, 0, 0, 0.1);
}

/* Analytics Quick Access CTA */
.analytics-quick-access {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.analytics-cta-box {
    background: linear-gradient(135deg, #fef5f1 0%, #f9ebe6 100%);
    border: 2px solid #f4d0c4;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.analytics-cta-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    flex: 1;
}

.analytics-cta-content > i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.analytics-cta-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.analytics-cta-content p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
}

.analytics-cta-box .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-shrink: 0;
    background: var(--bg-white);
    border-radius: 0 0 12px 12px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Responsive Design */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .calendar-grid {
        font-size: 0.9rem;
    }
    
    .calendar-day {
        min-height: 100px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .admin-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    /* Header Mobile Optimization */
    .main-header {
        padding: 0.75rem 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .header-left {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .logo {
        font-size: 1.3rem;
    }
    
    .logo .powered-by {
        font-size: 0.7rem;
    }
    
    .user-info {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .header-right {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start;
    }
    
    /* Trial Countdown Mobile */
    .trial-countdown-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        order: -1; /* Show first on mobile */
        width: 100%;
        justify-content: center;
    }
    
    /* Account Button Mobile */
    .btn-accent {
        flex: 1;
        min-width: auto;
    }
    
    /* Admin Controls Mobile */
    .admin-controls {
        width: 100%;
        flex-direction: column;
        padding: 0.5rem;
    }
    
    .admin-controls label {
        font-size: 0.85rem;
    }
    
    .client-selector {
        width: 100%;
        font-size: 0.9rem;
    }
    
    /* Buttons Mobile */
    .btn {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
        flex: 1;
    }
    
    .btn-primary,
    .btn-secondary {
        min-width: auto;
    }
    
    /* Navigation Tabs Mobile */
    .view-tabs {
        margin: 1rem 0 1rem;
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        padding-bottom: 0.5rem;
    }
    
    .view-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }
    
    .tab-btn {
        padding: 0.75rem 1.2rem;
        font-size: 0.9rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    /* Filters Section Mobile */
    .filters-section {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group label {
        margin-bottom: 0.3rem;
        font-size: 0.9rem;
    }
    
    .filter-select {
        width: 100%;
        padding: 0.7rem;
    }
    
    .search-input {
        width: 100%;
        min-width: 100%;
        padding: 0.7rem;
    }
    
    /* Calendar Mobile */
    .calendar-header {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .calendar-nav {
        width: 100%;
        justify-content: space-between;
    }
    
    .calendar-nav button {
        padding: 0.6rem 1rem;
    }
    
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 2px;
        font-size: 0.75rem;
    }
    
    .calendar-day {
        min-height: 70px;
        padding: 0.25rem;
    }
    
    .calendar-day-number {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }
    
    .calendar-post {
        font-size: 0.65rem;
        padding: 0.25rem;
        margin-bottom: 0.15rem;
    }
    
    .calendar-post i {
        font-size: 0.7rem;
    }
    
    /* List View Mobile */
    .list-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }
    
    .list-item-content {
        margin-bottom: 0.75rem;
    }
    
    .list-item-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    /* Analytics Mobile */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    /* Modal Mobile */
    .modal {
        padding: 0.5rem;
        align-items: flex-start;
    }
    
    .modal-content {
        margin: 0;
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 160px);
    }
    
    .modal-footer {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    /* Form Mobile */
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1rem; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }
    
    /* Platform Selector Mobile */
    .platform-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .platform-badge {
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .platform-badge i {
        font-size: 1.1rem;
    }
    
    /* Analytics Modal Mobile */
    .analytics-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .analytics-modal-body {
        padding: 1rem;
    }
    
    .analytics-post-summary {
        padding: 1rem;
    }
    
    .analytics-post-summary h3 {
        font-size: 1.1rem;
    }
    
    .analytics-post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .current-analytics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .current-stat {
        padding: 0.75rem;
    }
    
    .current-stat .stat-value {
        font-size: 1.2rem;
    }
    
    .analytics-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calculations-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .calc-item {
        padding: 0.75rem;
    }
    
    .calc-value {
        font-size: 1.2rem;
    }
    
    .analytics-modal-footer {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .analytics-modal-footer .btn {
        width: 100%;
    }
    
    /* Quick Actions Mobile */
    .post-quick-actions {
        gap: 0.2rem;
    }
    
    .quick-action-btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.4rem;
    }
    
    /* List Action Buttons Mobile */
    .list-post-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .list-action-btn {
        min-width: 36px;
        height: 36px;
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    /* Analytics CTA Box Mobile */
    .analytics-cta-box {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .analytics-cta-content {
        flex-direction: column;
        text-align: center;
    }
    
    .analytics-cta-content > i {
        font-size: 2.5rem;
    }
    
    .analytics-cta-box .btn {
        width: 100%;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    /* Extra small adjustments */
    .container {
        padding: 0 10px;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .logo i {
        font-size: 1rem;
    }
    
    .logo .powered-by {
        font-size: 0.65rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Header Compact */
    .header-right {
        flex-direction: column;
    }
    
    .header-right .btn {
        width: 100%;
    }
    
    /* Navigation Ultra Compact */
    .view-tabs {
        gap: 0.3rem;
    }
    
    .tab-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .tab-btn i {
        font-size: 0.9rem;
    }
    
    /* Calendar Ultra Compact */
    .calendar-day {
        min-height: 60px;
        padding: 0.2rem;
    }
    
    .calendar-day-number {
        font-size: 0.75rem;
    }
    
    .calendar-post {
        font-size: 0.6rem;
        padding: 0.2rem;
    }
    
    /* Stats Mobile - Single Column */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Platform Selector - Single Column */
    .platform-selector {
        grid-template-columns: 1fr;
    }
    
    /* Trial Countdown Extra Small */
    .trial-countdown-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }
    
    .trial-countdown-badge i {
        font-size: 0.85rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn {
        min-height: 44px; /* Apple recommended touch target */
    }
    
    .tab-btn {
        min-height: 44px;
    }
    
    .calendar-day {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(219, 138, 112, 0.1);
    }
    
    .calendar-post {
        -webkit-tap-highlight-color: rgba(219, 138, 112, 0.2);
    }
    
    /* Disable hover effects on touch */
    .btn:hover,
    .tab-btn:hover,
    .calendar-post:hover {
        transform: none;
    }
    
    /* Add active states for touch feedback */
    .btn:active {
        transform: scale(0.98);
    }
    
    .calendar-post:active {
        background-color: rgba(219, 138, 112, 0.15);
    }
}
