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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.comments-container {
    background-color: #ffffff;
    border-radius: 8px;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #e4e6eb;
    background-color: #f7f8fa;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1877f2;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.user-name {
    font-weight: 600;
    font-size: 16px;
    color: #050505;
    line-height: 1.33;
    letter-spacing: 0;
    font-family: inherit;
}

.user-role {
    font-size: 13px;
    color: #65676b;
}

.logout-btn {
    border: none;
    background-color: #e4e6eb;
    color: #050505;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.logout-btn:hover {
    background-color: #d8dadf;
}

/* Tabs */
.tabs-container {
    display: flex;
    border-bottom: 1px solid #e4e6eb;
    background-color: #ffffff;
}

.tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 15px;
    font-weight: 600;
    color: #65676b;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn:hover {
    background-color: #f0f2f5;
}

.tab-btn.active {
    color: #1877f2;
    border-bottom-color: #1877f2;
}

.tab-content {
    display: none;
    flex: 1;
    flex-direction: column;
    overflow: hidden;
}

.tab-content.active {
    display: flex;
}

.tab-btn.hidden {
    display: none !important;
}
/* Templates */
.templates-container {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

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

.templates-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #050505;
    margin-bottom: 8px;
}

.templates-description {
    font-size: 14px;
    color: #65676b;
    margin: 0;
}

.templates-search-container {
    margin-bottom: 20px;
}

.templates-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ccd0d5;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background-color: #f0f2f5;
    transition: all 0.2s;
    box-sizing: border-box;
}

.templates-search-input:focus {
    outline: none;
    border-color: #1877f2;
    background-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.1);
}

.templates-search-input::placeholder {
    color: #8a8d91;
}

.templates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-item {
    background-color: #f0f2f5;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.template-item:hover {
    background-color: #e4e6eb;
}

.template-info {
    flex: 1;
}

.template-name {
    font-size: 16px;
    font-weight: 600;
    color: #050505;
    margin-bottom: 4px;
}

.template-meta {
    font-size: 13px;
    color: #65676b;
}

.template-actions {
    display: flex;
    gap: 8px;
}

.template-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.template-load-btn {
    background-color: #1877f2;
    color: white;
}

.template-load-btn:hover {
    background-color: #166fe5;
}

.template-delete-btn {
    background-color: #f02849;
    color: white;
}

.template-delete-btn:hover {
    background-color: #d91e3d;
}

.empty-templates {
    text-align: center;
    padding: 40px 20px;
    color: #65676b;
}

.empty-templates-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8a8d91;
}

.empty-templates-icon svg {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

/* Orders */
.orders-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    overflow: hidden;
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.orders-header h2 {
    margin-bottom: 4px;
}

.orders-header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.orders-refresh-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background-color: #1877f2;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.orders-refresh-btn:hover {
    background-color: #166fe5;
}

.orders-export-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background-color: #42b72a;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.orders-export-btn:hover {
    background-color: #36a420;
}

.orders-period-filter {
    padding: 6px 12px;
    border-bottom: 1px solid #e4e6eb;
    background-color: #f7f8fa;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.period-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #050505;
    white-space: nowrap;
    margin-right: 2px;
}

.custom-period-inputs {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.period-date-input {
    padding: 3px 6px;
    border: 1px solid #ccd0d5;
    border-radius: 4px;
    font-size: 12px;
    background-color: #fff;
    color: #050505;
    height: 24px;
}

.period-date-input:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.period-date-separator {
    color: #65676b;
    font-weight: 600;
    font-size: 12px;
}

.period-apply-btn {
    padding: 3px 10px;
    border: none;
    border-radius: 4px;
    background-color: #1877f2;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    height: 24px;
    white-space: nowrap;
}

.period-apply-btn:hover {
    background-color: #166fe5;
}

.orders-search-wrapper {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.orders-search-input {
    padding: 3px 8px;
    border: 1px solid #ccd0d5;
    border-radius: 4px;
    font-size: 12px;
    background-color: #fff;
    color: #050505;
    height: 24px;
    width: 180px;
    min-width: 120px;
}

.orders-search-input:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.orders-search-input::placeholder {
    color: #8a8d91;
}

.orders-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background-color: #fff;
    min-width: 0;
    transition: box-shadow 0.2s;
}

.order-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.order-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.order-post-link {
    word-break: break-all;
}

.order-post-link a {
    color: #1877f2;
    text-decoration: none;
}

.order-post-link a:hover {
    text-decoration: underline;
}

.order-info h3 {
    margin-bottom: 4px;
    font-size: 16px;
    color: #050505;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-info h3 .order-manager-name {
    color: #00cc00 !important; /* Темно-зеленый цвет */
    font-weight: 600;
    font-size: 14px;
}

.order-meta {
    font-size: 13px;
    color: #65676b;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.order-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-status {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.order-status-badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

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

.order-status-in-progress {
    background-color: #d1ecf1;
    color: #0c5460;
}

.order-status-completed {
    background-color: #d4edda;
    color: #155724;
}

.order-status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
}

.order-status-draft,
.order-status-черновик {
    background-color: #e9ecef;
    color: #495057;
}

/* Select для статуса в панели информации о заказе */
.order-info-status-select {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid #e4e6eb;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 160px;
    max-width: 200px;
    width: auto;
    flex: 0 0 auto;
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%2365676b' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
    line-height: 1.4;
}

.order-info-status-select:hover {
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.order-info-status-select:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Стили статусов с повышенной специфичностью */
.order-info-status-select.order-status-pending,
select.order-info-status-select.order-status-pending {
    background-color: #fff3cd !important;
    color: #856404 !important;
    border-color: #ffc107 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23856404' d='M7 10L2 5h10z'/%3E%3C/svg%3E") !important;
}

.order-info-status-select.order-status-in-progress,
select.order-info-status-select.order-status-in-progress {
    background-color: #d1ecf1 !important;
    color: #0c5460 !important;
    border-color: #17a2b8 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%230c5460' d='M7 10L2 5h10z'/%3E%3C/svg%3E") !important;
}

.order-info-status-select.order-status-completed,
select.order-info-status-select.order-status-completed {
    background-color: #d4edda !important;
    color: #155724 !important;
    border-color: #28a745 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23155724' d='M7 10L2 5h10z'/%3E%3C/svg%3E") !important;
}

.order-info-status-select.order-status-cancelled,
select.order-info-status-select.order-status-cancelled {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border-color: #dc3545 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23721c24' d='M7 10L2 5h10z'/%3E%3C/svg%3E") !important;
}

.order-info-status-select.order-status-draft,
select.order-info-status-select.order-status-draft,
.order-info-status-select.order-status-черновик,
select.order-info-status-select.order-status-черновик {
    background-color: #e9ecef !important;
    color: #495057 !important;
    border-color: #6c757d !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23495057' d='M7 10L2 5h10z'/%3E%3C/svg%3E") !important;
}

.order-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.order-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background-color: #1877f2;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    width: 100%;
    min-width: 120px;
}

.order-actions button:hover {
    background-color: #166fe5;
}

.order-open-btn-disabled,
.order-actions button:disabled {
    background-color: #8a8d91 !important;
    color: #fff !important;
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
}

.order-open-btn-disabled:hover,
.order-actions button:disabled:hover {
    background-color: #8a8d91 !important;
    opacity: 0.6;
}

/* Стили для неактивной кнопки "Открыть" когда заказ назначен другому менеджеру */
.order-open-btn-disabled {
    background-color: #e4e6eb !important;
    color: #8a8d91 !important;
    border-color: #e4e6eb !important;
}

/* Стили для кнопки "Удалить" */
.delete-order-btn {
    background-color: #f02849 !important;
    color: #fff !important;
}

.delete-order-btn:hover {
    background-color: #d91e3a !important;
}

.delete-order-btn:active {
    background-color: #c01a33 !important;
}

.empty-orders {
    text-align: center;
    color: #65676b;
    padding: 40px 20px;
    background-color: #f7f8fa;
    border-radius: 8px;
}

/* Users */
.users-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    overflow: hidden;
}

.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.users-refresh-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background-color: #1877f2;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.users-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-card {
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background-color: #fff;
}

.user-info {
    flex: 1;
}

.user-info h3 {
    margin-bottom: 4px;
    font-size: 16px;
    color: #050505;
}

.user-meta {
    font-size: 13px;
    color: #65676b;
}

.user-role-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background-color: #f0f2f5;
    color: #1877f2;
}

.user-status-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    margin-left: 8px;
}

.user-status-tag.approved {
    background-color: #d4edda;
    color: #155724;
}

.user-status-tag.pending {
    background-color: #fff3cd;
    color: #856404;
}

.user-status-tag.rejected {
    background-color: #f8d7da;
    color: #721c24;
}

.user-action-btn.approve-btn {
    background-color: #42b72a;
    color: #fff;
}

.user-action-btn.approve-btn:hover {
    background-color: #36a420;
}

.user-action-btn.reject-btn {
    background-color: #f02849;
    color: #fff;
}

.user-action-btn.reject-btn:hover {
    background-color: #d91e3a;
}

.user-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.user-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background-color: #42b72a;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-actions button.remove {
    background-color: #f02849;
}

.user-actions button:disabled {
    background-color: #ccd0d5;
    cursor: not-allowed;
}

.empty-users {
    text-align: center;
    color: #65676b;
    padding: 40px 20px;
    background-color: #f7f8fa;
    border-radius: 8px;
}

/* Header */
.comments-header {
    border-bottom: 1px solid #e4e6eb;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.header-title {
    display: flex;
    align-items: center;
    position: relative;
    flex: 1;
    min-width: 0;
}

.header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.header-action-btn {
    background-color: #1877f2;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    min-width: fit-content;
    height: 36px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-action-btn:hover {
    background-color: #166fe5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.header-action-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.header-action-btn .btn-icon {
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-action-btn .btn-icon svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.header-action-btn .btn-text {
    line-height: 1;
    white-space: nowrap;
}

/* Specific button colors */
.new-order-btn {
    background-color: #1877f2;
}

.new-order-btn:hover {
    background-color: #166fe5;
}

.save-template-btn {
    background-color: #1877f2;
}

.save-template-btn:hover {
    background-color: #166fe5;
}

.save-order-btn {
    background-color: #42b72a;
}

.save-order-btn:hover {
    background-color: #36a420;
}

.share-btn {
    background-color: #1877f2;
}

.share-btn:hover {
    background-color: #166fe5;
}

/* Disabled state */
.header-action-btn:disabled {
    background-color: #e4e6eb !important;
    color: #bcc0c4 !important;
    cursor: not-allowed;
    box-shadow: none;
}

.header-action-btn:disabled:hover {
    background-color: #e4e6eb !important;
    transform: none;
    box-shadow: none;
}

/* Order Info Panel */
.order-info-panel {
    background-color: #1877f2;
    border-radius: 0;
    padding: 15px 24px;
    margin: 0;
    border: none;
    border-bottom: 1px solid #1565c0;
}

.order-info-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 32px;
    flex-wrap: nowrap;
}

.order-info-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 0 0 auto;
    min-width: 0;
}

.order-info-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 0;
    white-space: nowrap;
}

.order-info-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.order-info-value {
    font-size: 13px;
    color: #ffffff;
    font-weight: 600;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    flex: 0 1 auto;
    min-width: fit-content;
    max-width: none;
}

.order-info-manager {
    font-size: 13px;
    color: #00cc00 !important; /* Темно-зеленый цвет */
    font-weight: 600;
    margin-left: 8px;
    display: inline;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.3); /* Легкая тень для контраста */
}

/* Специальные стили для статуса */
.order-info-item:last-child {
    flex: 0 0 auto;
    min-width: auto;
    margin-left: auto;
    align-self: flex-start;
}

.order-info-item:last-child .order-info-value {
    flex: 0 0 auto;
    min-width: 160px;
    width: auto;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 1024px) {
    .order-info-content {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .order-info-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .order-info-group {
        width: 100%;
    }
    
    .order-info-item {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        gap: 12px;
    }
    
    .order-info-item:last-child {
        margin-left: 0;
    }
    
    .order-info-item:last-child .order-info-value {
        min-width: 160px;
    }
    
    .order-info-label {
        font-size: 11px;
    }
    
    .order-info-value {
        font-size: 12px;
    }
}

/* Legacy export button (if still used) */
.export-btn {
    background-color: #42b72a;
}

.export-btn:hover {
    background-color: #36a420;
}

.header-title h2 {
    font-size: 20px;
    font-weight: 600;
    color: #050505;
    flex: 1;
    line-height: 1.2;
}

/* Comments Section */
/* Scrollable content wrapper */
.scrollable-content {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.comments-section {
    flex: 0 0 auto;
    padding: 16px;
}

/* Comment */
.comment {
    display: flex;
    margin-bottom: 4px;
    padding: 4px 0;
}

.comment.reply {
    margin-left: 48px;
    margin-bottom: 4px;
    position: relative;
}

.comment-avatar {
    flex-shrink: 0;
    margin-right: 8px;
}

.comment.reply .comment-avatar {
    margin-right: 8px;
}

.avatar-circle {
    display: inline-flex;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    overflow: hidden;
    flex-shrink: 0;
}

.avatar-circle.small {
    width: 32px;
    height: 32px;
}

.avatar-circle.medium {
    width: 40px;
    height: 40px;
}

.avatar-blue { background: #5b8dff; }
.avatar-purple { background: #c06cff; }
.avatar-teal { background: #47c1b5; }
.avatar-yellow { background: #f7c948; }
.avatar-coral { background: #ff8a80; }
.avatar-green { background: #63c174; }
.avatar-indigo { background: #6a6cff; }

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-bubble {
    position: relative;
    background-color: #f0f2f5;
    border-radius: 18px;
    padding: 8px 12px;
    font-size: 15px;
    color: #050505;
    line-height: 1.4;
    margin-bottom: 2px;
}

.comment-bubble.has-copy-btn {
    padding-right: 28px;
}

.comment-bubble p {
    word-break: break-word;
    overflow-wrap: anywhere;
    margin: 0;
}

.comment-bubble a {
    color: #216fdb;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-decoration: underline;
}

.comment.reply .comment-bubble {
    background-color: #f5f6f7;
}

.comment-bubble p + p {
    margin-top: 8px;
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
    gap: 6px;
}

.comment-author {
    font-weight: 600;
    font-size: 15px;
    color: #050505;
    margin-right: 8px;
}

.author-badge {
    font-size: 12px;
    color: #65676b;
    background-color: #e4e6eb;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.comment-text {
    font-size: 15px;
    color: #050505;
    line-height: 1.33;
    word-wrap: break-word;
    margin-bottom: 4px;
}

.reply-to {
    font-weight: 600;
    color: #216fdb;
    cursor: pointer;
    margin-right: 4px;
}

.reply-to:hover {
    text-decoration: underline;
}


.comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.comment-time {
    font-size: 13px;
    color: #65676b;
    margin-right: 4px;
}

.action-btn {
    background: none;
    border: none;
    font-size: 13px;
    color: #65676b;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.action-btn:hover {
    background-color: #f0f2f5;
}

.comment-bubble {
    position: relative;
}

.copy-comment-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    box-shadow: none;
    z-index: 10;
    padding: 0;
    margin: 0;
}

.comment-bubble:hover .copy-comment-btn {
    opacity: 1;
}

.copy-comment-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.copy-comment-btn svg {
    width: 12px;
    height: 12px;
    color: #65676b;
    transition: color 0.2s ease;
}

.copy-comment-btn:hover svg {
    color: #1877f2;
}

.copy-comment-btn.copied {
    opacity: 1;
}

.copy-comment-btn.copied svg {
    color: #42b72a;
}

/* Copy post link button (for manager) */
.copy-post-link-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    box-shadow: none;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.copy-post-link-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background-color: #f0f2f5;
}

.copy-post-link-btn svg {
    width: 16px;
    height: 16px;
    color: #65676b;
    transition: color 0.2s ease;
}

.copy-post-link-btn:hover svg {
    color: #1877f2;
}

.copy-post-link-btn.copied {
    opacity: 1;
}

.copy-post-link-btn.copied svg {
    color: #42b72a;
}

.like-btn.liked {
    color: #216fdb;
}

.like-icon {
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.like-icon svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.like-count {
    font-weight: 600;
}

/* Reply Input Container */
.reply-input-container {
    display: flex;
    margin-left: 48px;
    margin-bottom: 16px;
    padding: 8px;
    background-color: #f0f2f5;
    border-radius: 18px;
    align-items: center;
}

.reply-input-avatar {
    flex-shrink: 0;
    margin-right: 8px;
}

.reply-input-box {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border-radius: 18px;
    padding: 8px 12px;
    border: 1px solid #ccd0d5;
}

.reply-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #050505;
    background: transparent;
    font-family: inherit;
}

.reply-input::placeholder {
    color: #65676b;
}

/* Main Comment Input */
.main-comment-input {
    border-top: 1px solid #e4e6eb;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    background-color: #ffffff;
}

.comment-input-avatar {
    flex-shrink: 0;
    margin-right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-input-avatar .avatar-circle {
    border-radius: 50%;
    overflow: hidden;
}

.comment-input-box {
    flex: 1;
    display: flex;
    align-items: center;
    background-color: #f0f2f5;
    border-radius: 20px;
    padding: 8px 12px;
    border: none;
    gap: 6px;
    position: relative;
    min-width: 0;
    flex-wrap: wrap;
}

.comment-input-box.has-image {
    align-items: flex-start;
    padding: 8px;
}

.main-input-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.comment-input-box.has-image .main-input-buttons {
    align-self: flex-end;
    margin-top: auto;
}

.main-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #050505;
    background: transparent;
    font-family: inherit;
}

.main-input::placeholder {
    color: #65676b;
}

.submit-comment-btn {
    border: none;
    background-color: #1877f2;
    color: #ffffff;
    font-weight: 600;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-comment-btn:disabled {
    background-color: #9cbef5;
    cursor: not-allowed;
}

.submit-comment-btn:not(:disabled):hover {
    background-color: #166fe5;
}

.persona-select {
    border: 1px solid #ccd0d5;
    border-radius: 16px;
    padding: 6px 10px;
    font-size: 13px;
    font-family: inherit;
    color: #050505;
    background-color: #ffffff;
}

.comment-input-box .persona-select {
    min-width: 170px;
}

.reply-form-actions .persona-select {
    flex: 1;
    min-width: 160px;
}

/* Input Icons */
/* Placeholder skeletons */
.placeholder {
    display: inline-block;
    background-color: #e4e6eb;
    border-radius: 999px;
    min-height: 12px;
}

.placeholder-title {
    width: 80%;
    height: 20px;
}

.placeholder-author {
    width: 60%;
    height: 14px;
}

.placeholder-author.short {
    width: 40%;
}

.placeholder-badge {
    width: 48px;
    height: 16px;
    border-radius: 8px;
}

.placeholder-text {
    display: block;
    width: 100%;
    height: 32px;
    border-radius: 12px;
}

.placeholder-text.tall {
    height: 52px;
}

.placeholder-pill {
    height: 18px;
    width: 80px;
}

.placeholder-pill.small {
    width: 70px;
}

.placeholder-pill.xs {
    width: 50px;
}

.placeholder-actions {
    display: flex;
    gap: 6px;
}

.placeholder-input-box {
    justify-content: flex-start;
}

.placeholder-input-line {
    width: 100%;
    height: 14px;
    border-radius: 999px;
}

.placeholder-input-line.wide {
    height: 18px;
}

.post-preview {
    border-bottom: 1px solid #e4e6eb;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #fff;
}

.post-header {
    display: flex;
    gap: 10px;
    align-items: center;
}

.post-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.post-author-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.post-author {
    font-weight: 600;
    font-size: 16px;
    color: #050505;
    line-height: 1.33;
    letter-spacing: 0;
    font-family: inherit;
}

.post-subline {
    font-size: 13px;
    color: #65676b;
}

.post-body p {
    font-size: 15px;
    color: #050505;
    line-height: 1.5;
    margin-bottom: 6px;
}

.post-link-label {
    font-size: 14px;
    font-weight: 500;
    color: #65676b;
    margin-bottom: 6px;
}

.post-link-input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid #ccd0d5;
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    color: #050505;
    background-color: #f5f6f7;
}

.post-link-input:focus {
    outline: none;
    border-color: #1877f2;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

/* GEO Select styling */
.geo-select-wrapper {
    position: relative;
    width: 100%;
}

.geo-select-trigger {
    width: 100%;
    padding: 10px 40px 10px 12px;
    background-color: #f5f6f7;
    border: 1px solid #ccd0d5;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    color: #050505;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
    min-height: 42px;
}

.geo-select-trigger:hover {
    border-color: #1877f2;
    background-color: #fff;
}

.geo-select-trigger.active {
    border-color: #1877f2;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.geo-select-trigger.error {
    border-color: #f02849;
}

.geo-select-placeholder {
    color: #65676b;
    flex: 1;
    text-align: left;
}

#geo-error {
    color: #f02849;
    font-size: 13px;
    margin-top: 4px;
}

.geo-select-trigger.has-value .geo-select-placeholder {
    color: #050505;
}

.geo-select-arrow {
    color: #65676b;
    font-size: 12px;
    transition: transform 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}

.geo-select-trigger.active .geo-select-arrow {
    transform: rotate(180deg);
}

.geo-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccd0d5;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.geo-select-search {
    padding: 8px;
    border-bottom: 1px solid #e4e6eb;
    background-color: #f5f6f7;
}

.geo-select-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    color: #050505;
    background-color: #fff;
    outline: none;
}

.geo-select-search input:focus {
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.geo-select-options {
    overflow-y: auto;
    max-height: 240px;
}

.geo-option {
    padding: 10px 12px;
    cursor: pointer;
    font-size: 15px;
    color: #050505;
    transition: background-color 0.15s;
    border-bottom: 1px solid #f0f2f5;
}

.geo-option:last-child {
    border-bottom: none;
}

.geo-option:hover {
    background-color: #f0f2f5;
}

.geo-option.selected {
    background-color: #e7f3ff;
    color: #1877f2;
    font-weight: 600;
}

.geo-option.hidden {
    display: none;
}

.post-body strong {
    color: #050505;
}

.inline-reply-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    margin-left: 0;
}

.inline-reply-form.hidden {
    display: none;
}

.inline-reply-form input {
    border: 1px solid #ccd0d5;
    border-radius: 16px;
    padding: 8px 12px;
    font-size: 15px;
    font-family: inherit;
    color: #050505;
    background-color: #ffffff;
}

.inline-reply-form input:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.15);
}

.reply-form-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.reply-form-actions button {
    border: none;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, background-color 0.2s;
}

.reply-form-actions button[type="submit"] {
    background-color: #1877f2;
    color: #ffffff;
}

.reply-form-actions .cancel-reply-btn {
    background-color: #e4e6eb;
    color: #050505;
}

.reply-form-actions button:hover {
    opacity: 0.9;
}

.inline-edit-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.inline-edit-form.hidden {
    display: none;
}

.inline-edit-form textarea {
    border: 1px solid #ccd0d5;
    border-radius: 16px;
    padding: 10px 12px;
    font-size: 15px;
    font-family: inherit;
    color: #050505;
    resize: vertical;
}

.inline-edit-form textarea:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.15);
}

.edit-form-actions {
    display: flex;
    gap: 8px;
}

.edit-form-actions button {
    border: none;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, background-color 0.2s;
}

.edit-form-actions button[type="submit"] {
    background-color: #1877f2;
    color: #ffffff;
}

.edit-form-actions .cancel-edit-btn {
    background-color: #e4e6eb;
    color: #050505;
}

.edit-form-actions button:hover {
    opacity: 0.9;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #65676b;
}

.reactions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.reaction-bubble {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    position: relative;
    transition: transform 0.2s;
    overflow: hidden;
}

.reaction-bubble svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.reaction-bubble:hover {
    transform: scale(1.15);
    z-index: 10;
}

.reaction-bubble + .reaction-bubble {
    margin-left: -6px;
}

.reaction-bubble:nth-child(1) {
    z-index: 2;
}

.reaction-bubble:nth-child(2) {
    z-index: 1;
}

.reaction-count {
    font-weight: 600;
    color: #65676b;
    margin-left: 6px;
    font-size: 13px;
}

.post-stats {
    display: flex;
    gap: 12px;
}

/* Scrollbar styling */
.scrollable-content::-webkit-scrollbar {
    width: 8px;
}

.scrollable-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.scrollable-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Image upload and preview */
.file-input-hidden {
    display: none;
}

.image-upload-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.image-upload-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.image-upload-btn:hover {
    background-color: #e4e6eb;
}

.main-image-btn {
    font-size: 18px;
    padding: 2px 6px;
}

.image-preview-container {
    position: relative;
    margin-top: 8px;
    display: inline-block;
}

.image-preview-container.hidden {
    display: none;
}

.image-preview-thumbnail {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
}

.image-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #1877f2;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.main-image-preview {
    position: relative;
    margin: 0 8px 0 0;
    display: inline-block;
    flex-shrink: 0;
    align-self: flex-start;
}

.comment-input-box.has-image .main-image-preview {
    margin: 0 8px 0 0;
    order: 2;
}

.comment-input-box.has-image .main-input {
    order: 1;
    width: 100%;
    margin-bottom: 8px;
    min-width: 0;
}

.comment-input-box.has-image .main-image-preview {
    order: 2;
    margin-right: 8px;
    margin-bottom: 0;
}

.comment-input-box.has-image .main-input-buttons {
    order: 3;
    margin-left: 0;
    margin-top: 0;
    align-self: flex-end;
}

.comment-image-container {
    margin-top: 8px;
    display: inline-block;
}

.comment-image-thumbnail {
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
    transition: opacity 0.2s;
}

.comment-image-thumbnail:hover {
    opacity: 0.9;
}

/* Image modal */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.image-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-full {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background-color 0.2s;
}

.image-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Modal Styles */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: all;
}

.modal-show {
    opacity: 1;
}

.modal-hide {
    opacity: 0;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: #ffffff;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.2s;
    z-index: 1;
}

.modal-show .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #e4e6eb;
    font-size: 20px;
    font-weight: 600;
    color: #050505;
}

.modal-body {
    padding: 20px;
}

.modal-message {
    margin: 0;
    font-size: 15px;
    color: #050505;
    line-height: 1.5;
    white-space: pre-line;
}

.modal-input {
    width: 100%;
    padding: 10px 12px;
    margin-top: 12px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
}

.modal-input:focus {
    outline: none;
    border-color: #1877f2;
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.1);
}

.modal-footer {
    padding: 12px 20px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.modal-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.modal-btn-primary {
    background-color: #1877f2;
    color: #ffffff;
}

.modal-btn-primary:hover {
    background-color: #166fe5;
}

.modal-btn-primary:active {
    background-color: #1565d1;
}

.modal-btn-secondary {
    background-color: #e4e6eb;
    color: #050505;
}

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

.modal-btn-secondary:active {
    background-color: #ccd0d5;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid #e4e6eb;
}

.pagination-btn {
    padding: 8px 16px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    background-color: #ffffff;
    color: #050505;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #f0f2f5;
    border-color: #8a8d91;
}

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

.pagination-info {
    font-size: 14px;
    color: #65676b;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .comments-container {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .comment.reply {
        margin-left: 32px;
    }
    
    .reply-input-container {
        margin-left: 32px;
    }
    
    .pagination {
        flex-direction: column;
        gap: 12px;
    }
    
    .pagination-info {
        order: -1;
    }
}

