/* ========================================
   Schedule Module Styles
   ======================================== */

/* === Calendar === */
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-title { font-size: 15px; font-weight: 600; min-width: 120px; text-align: center; }
.calendar-grid { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.cal-header { display: grid; grid-template-columns: repeat(7, 1fr); background: #F8FAFB; }
.cal-header-cell { padding: 10px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.cal-body { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 90px; border: 1px solid var(--border-light); padding: 4px; cursor: pointer; transition: background .15s; position: relative; }
.cal-cell:hover { background: var(--bg-hover); }
.cal-cell.today { background: var(--primary-light); }
.cal-cell.other-month { background: var(--bg); color: var(--text-tertiary); }
.cal-day { font-size: 12px; font-weight: 600; padding: 2px 4px; }
.cal-dot { display: inline-block; width: 100%; padding: 2px 4px; margin-top: 1px; font-size: 11px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-dot.p0 { background: #dcfce7; color: #166534; }
.cal-dot.p1 { background: #dbeafe; color: #1e40af; }
.cal-dot.p2 { background: #fee2e2; color: #991b1b; }

/* === Schedule list item === */
.sch-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.sch-item:last-child { border-bottom: none; }
.sch-priority { width: 4px; height: 32px; border-radius: 2px; flex-shrink: 0; }
.sch-priority.p0 { background: var(--success); }
.sch-priority.p1 { background: var(--primary); }
.sch-priority.p2 { background: var(--error); }
.sch-info { flex: 1; min-width: 0; }
.sch-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.sch-meta { font-size: 12px; color: var(--text-secondary); }
.sch-actions { display: flex; gap: 4px; }
.sch-badge { display: inline-block; padding: 2px 6px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 500; }
.sch-badge.sent { background: #dcfce7; color: #166534; }
.sch-badge.pending { background: #fef9c3; color: #854d0e; }

/* === Webhook grid === */
.webhook-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.wh-card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 20px; position: relative; }
.wh-card:hover { box-shadow: var(--shadow-md); }
.wh-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.wh-name { font-weight: 600; font-size: 14px; }
.wh-type { display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; }
.wh-type.wechat { background: #dcfce7; color: #166534; }
.wh-type.feishu { background: #dbeafe; color: #1e40af; }
.wh-type.dingtalk { background: #fef3c7; color: #92400e; }
.wh-url { font-size: 12px; color: var(--text-secondary); word-break: break-all; margin-bottom: 12px; max-height: 36px; overflow: hidden; }
.wh-status { font-size: 12px; }
.wh-status.on { color: var(--success); }
.wh-status.off { color: var(--error); }
.wh-public { display: inline-block; padding: 2px 8px; background: var(--primary-light); color: var(--primary); border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; margin-left: 8px; }
.wh-actions { display: flex; gap: 6px; margin-top: 12px; }

/* === Responsive (schedule-specific) === */
@media (max-width: 768px) {
    .webhook-grid { grid-template-columns: 1fr; }
    .cal-cell { min-height: 60px; }
    .cal-dot { font-size: 10px; }
}
