/* Card */
.card { background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); padding: var(--sf-space-4); box-shadow: var(--sf-shadow); }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--sf-radius-pill); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.badge-draft, .status-badge.status-draft { background: rgba(110,106,133,.15); color: var(--sf-text-muted); }
.badge-scheduled, .status-badge.status-scheduled { background: rgba(245,165,36,.15); color: var(--sf-warning); }
.badge-published, .status-badge.status-published { background: rgba(47,191,113,.15); color: var(--sf-success); }
.badge-failed, .status-badge.status-failed { background: rgba(229,72,77,.15); color: var(--sf-danger); }
.badge-publishing, .status-badge.status-publishing { background: rgba(76,111,255,.15); color: #4C6FFF; }
.status-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 9999px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; }

/* Table */
.table-wrap { overflow-x: auto; }
table.sf-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.sf-table th { text-align: left; padding: 10px 14px; color: var(--sf-text-muted); font-weight: 600; border-bottom: 1px solid var(--sf-border); white-space: nowrap; }
table.sf-table td { padding: 12px 14px; border-bottom: 1px solid var(--sf-border); }
table.sf-table tr:hover td { background: var(--sf-surface-2); }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,11,30,.55); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--sf-surface); border-radius: var(--sf-radius-lg); padding: var(--sf-space-4); width: 100%; max-width: 480px; box-shadow: var(--sf-shadow-lg); max-height: 86vh; overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sf-space-3); }

/* Generic Modal */
.modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1100; }
.modal[hidden] { display: none; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 11, 30, 0.6); backdrop-filter: blur(2px); }
.modal-dialog { position: relative; z-index: 1101; background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); width: 90%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--sf-shadow-lg); display: flex; flex-direction: column; }
.modal-dialog.modal-sm { max-width: 400px; }
.modal-dialog.modal-lg { max-width: 800px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--sf-border); }
.modal-header h3 { margin: 0; font-size: 16px; font-weight: 700; }
.modal-body { padding: 20px; flex: 1; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--sf-border); background: var(--sf-surface-2); }

/* Notifications Dropdown */
.notif-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 340px; background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); box-shadow: var(--sf-shadow-lg); z-index: 1000; overflow: hidden; animation: sf-toast-in 0.15s ease; }
.notif-dropdown[hidden] { display: none; }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--sf-border); background: var(--sf-surface-2); }
.notif-head h4 { margin: 0; font-size: 14px; font-weight: 700; }
.notif-head .btn-text { background: none; border: none; color: var(--sf-primary); font-size: 12px; font-weight: 600; cursor: pointer; padding: 0; }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--sf-border); transition: background 0.15s ease; }
.notif-item:hover { background: var(--sf-surface-2); }
.notif-item.unread { background: rgba(110, 86, 207, 0.05); }
.notif-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.notif-desc { font-size: 12px; color: var(--sf-text-muted); line-height: 1.4; }
.notif-time { font-size: 11px; margin-top: 4px; }
.notif-empty { padding: 32px 16px; text-align: center; color: var(--sf-text-muted); font-size: 13px; }
.notif-empty i { font-size: 28px; margin-bottom: 8px; opacity: 0.5; }

/* Global Search Modal */
.search-modal { position: fixed; inset: 0; z-index: 1200; display: flex; justify-content: center; padding-top: 10vh; }
.search-modal[hidden] { display: none; }
.search-backdrop { position: fixed; inset: 0; background: rgba(15, 11, 30, 0.6); backdrop-filter: blur(3px); }
.search-dialog { position: relative; z-index: 1201; width: 90%; max-width: 620px; background: var(--sf-surface); border: 1px solid var(--sf-border); border-radius: var(--sf-radius-lg); box-shadow: var(--sf-shadow-lg); overflow: hidden; max-height: 75vh; display: flex; flex-direction: column; }
.search-header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--sf-border); }
.search-header i { font-size: 18px; color: var(--sf-text-muted); }
.search-header input { flex: 1; background: transparent; border: none; outline: none; font-size: 15px; color: var(--sf-text); }
.search-results { padding: 16px; overflow-y: auto; flex: 1; }
.search-tip { text-align: center; color: var(--sf-text-muted); font-size: 13px; padding: 24px 0; }
.search-section { margin-bottom: 16px; }
.search-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--sf-text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.search-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--sf-radius-sm); text-decoration: none; color: var(--sf-text); transition: background 0.15s ease; }
.search-item:hover { background: var(--sf-surface-2); }
.search-item-title { font-weight: 600; font-size: 13.5px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Toasts */
.toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 2000; }
.toast { padding: 12px 18px; border-radius: var(--sf-radius-sm); color: #fff; font-size: 13.5px; box-shadow: var(--sf-shadow-lg); min-width: 220px; animation: sf-toast-in .2s ease; }
.toast-success { background: var(--sf-success); } .toast-error { background: var(--sf-danger); } .toast-info { background: var(--sf-primary); }
@keyframes sf-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--sf-border); margin-bottom: var(--sf-space-3); }
.tab-btn { padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--sf-text-muted); border-bottom: 2px solid transparent; cursor: pointer; background: none; border-top: none; border-left: none; border-right: none; }
.tab-btn.active { color: var(--sf-primary); border-bottom-color: var(--sf-primary); }

/* Skeleton loader */
.skeleton { background: linear-gradient(90deg, var(--sf-surface-2) 25%, var(--sf-border) 37%, var(--sf-surface-2) 63%); background-size: 400% 100%; animation: sf-skeleton 1.4s ease infinite; border-radius: var(--sf-radius-sm); }
@keyframes sf-skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Empty state */
.empty-state { text-align: center; padding: var(--sf-space-6) var(--sf-space-3); color: var(--sf-text-muted); }
.empty-state i { font-size: 32px; margin-bottom: var(--sf-space-2); opacity: .5; }

/* Upload box */
.upload-box { border: 2px dashed var(--sf-border); border-radius: var(--sf-radius-lg); padding: var(--sf-space-5); text-align: center; color: var(--sf-text-muted); cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.upload-box.dragover { border-color: var(--sf-primary); background: rgba(110,86,207,.06); }
