/* ============================================================================
   Home Canvas — Styles
   Sharp corners everywhere. border-radius: 0 on all elements.
   ============================================================================ */

/* Global sharp-corner override for all Home Canvas elements */
.home-canvas button,
.home-canvas input,
.home-canvas select,
.home-canvas textarea,
.widget-card,
.picker-panel,
.add-zone,
.portal-tag,
.widget-portal-tag,
.size-btn,
.metric,
.mode-banner {
    border-radius: 0 !important;
}

/* ---- Canvas Header ---- */

.home-canvas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 8px 16px;
}

.home-canvas-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text-primary, #1a1a1a);
    margin: 0;
}

.home-canvas-header-right {
    display: flex;
    gap: 8px;
    align-items: center;
}

.home-edit-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    background: var(--teal-500, #14b8a6);
    color: #fff;
    border: none;
    cursor: pointer;
}
.home-edit-btn:hover {
    background: var(--teal-600, #0d9488);
}
.home-edit-btn.active {
    background: var(--gray-600, #4b5563);
}

.home-reset-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    background: transparent;
    color: var(--color-text-secondary, #6b7280);
    border: 0.5px solid var(--color-border-secondary, #d1d5db);
    cursor: pointer;
}
.home-reset-btn:hover {
    background: var(--gray-50, #f9fafb);
}

/* ---- Edit Mode Banner ---- */

.home-edit-banner {
    background: #0f766e;
    color: #fff;
    padding: 8px 16px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-edit-banner-text {
    opacity: 0.9;
}

.home-edit-banner-add {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 0.5px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
}
.home-edit-banner-add:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ---- Announcement Bar ---- */

.home-announcement-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 13px;
    line-height: 1.5;
    transition: opacity 0.3s ease, max-height 0.3s ease;
    overflow: hidden;
}
.home-announcement-bar a {
    color: inherit;
    text-decoration: underline;
}
.home-announcement-bar a:hover {
    opacity: 0.85;
}
.home-announcement-content {
    flex: 1;
}
.home-announcement-content p {
    margin: 0;
}
.home-announcement-dismiss {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 0 0 16px;
    flex-shrink: 0;
    line-height: 1;
}
.home-announcement-dismiss:hover {
    opacity: 1;
}
.home-announcement-bar.dismissing {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* ---- Widget Grid ---- */

.widget-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    align-items: start;
    padding: 16px;
}

/* Span classes */
.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

/* ---- Widget Card ---- */

.widget-card {
    background: #fff;
    border: 0.5px solid var(--color-border-secondary, #e5e7eb);
    min-height: 120px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.widget-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 0.5px solid var(--color-border-secondary, #e5e7eb);
    min-height: 36px;
}

.home-canvas .widget-drag-handle {
    display: none;
    position: static;
    transform: none;
    left: auto;
    top: auto;
    cursor: grab;
    color: var(--gray-500, #6b7280);
    font-size: 16px;
    user-select: none;
    flex-shrink: 0;
    min-width: 16px;
    text-align: center;
    line-height: 1;
}
.home-canvas.edit-mode .widget-drag-handle {
    display: inline-flex;
    align-items: center;
}

/* Portal tag */
.widget-portal-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 2px 6px;
    flex-shrink: 0;
    white-space: nowrap;
    border-radius: 0 !important;
}

.widget-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary, #1a1a1a);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Size buttons (edit mode only) */
.widget-size-controls {
    display: none;
    gap: 2px;
    flex-shrink: 0;
    align-items: center;
}
.home-canvas.edit-mode .widget-size-controls {
    display: flex;
}

.size-btn {
    width: 20px;
    height: 20px;
    border: 0.5px solid var(--color-border-secondary, #d1d5db);
    background: transparent;
    font-size: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary, #6b7280);
}
.size-btn.active {
    background: #E1F5EE;
    color: #0F6E56;
    border-color: #0F6E56;
}
.size-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Remove button (edit mode only) — scoped to override portal-shell.css absolute positioning */
.home-canvas .widget-remove-btn {
    display: none;
    position: static;
    width: 24px;
    height: 24px;
    border: 1px solid #d1d5db;
    background: white;
    color: #ef4444;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1;
    margin-left: 4px;
    border-radius: 0 !important;
}
.home-canvas .widget-remove-btn:hover {
    background: #fef2f2;
    border-color: #ef4444;
}
.home-canvas.edit-mode .widget-remove-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Widget body */
.widget-card-body {
    flex: 1;
    padding: 12px;
    font-size: 13px;
    color: var(--color-text-secondary, #6b7280);
    min-width: 0;
    overflow: hidden;
}

/* Add widget zone (edit mode only) */
.add-widget-zone {
    display: none;
    min-height: 120px;
    border: 1.5px dashed var(--color-border-secondary, #d1d5db);
    background: var(--gray-50, #f9fafb);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    color: var(--color-text-secondary, #6b7280);
    font-size: 13px;
    transition: border-color 0.15s, background 0.15s;
}
.add-widget-zone:hover {
    border-color: #14b8a6;
    background: rgba(20, 184, 166, 0.05);
    color: #14b8a6;
}
.home-canvas.edit-mode .add-widget-zone {
    display: flex;
}

.add-widget-zone-icon {
    font-size: 24px;
    font-weight: 300;
}

/* ---- Widget appearance animation (reverse of removal) ---- */

.widget-card.appearing {
    opacity: 0;
    transform: scale(0.95);
}
.widget-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ---- Widget removal animation ---- */

.widget-card.removing {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* ---- Picker Panel ---- */

.picker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
    z-index: 900;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.picker-overlay.open {
    opacity: 1;
}

.picker-panel {
    position: fixed;
    top: 0;
    right: -272px;
    width: 272px;
    height: 100%;
    background: #fff;
    z-index: 901;
    display: flex;
    flex-direction: column;
    border-left: 0.5px solid var(--color-border-secondary, #e5e7eb);
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.08);
    transition: right 0.2s ease;
}
.picker-panel.open {
    right: 0;
}

.picker-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 0.5px solid var(--color-border-secondary, #e5e7eb);
    flex-shrink: 0;
}

.picker-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-primary, #1a1a1a);
}

.picker-panel-close {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    font-size: 18px;
    color: var(--gray-400, #9ca3af);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.picker-panel-close:hover {
    color: var(--color-text-primary, #1a1a1a);
}

.picker-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.picker-loading {
    padding: 24px 16px;
    text-align: center;
    color: var(--color-text-secondary, #6b7280);
    font-size: 13px;
}

/* Picker section labels (portal group headers) */
.picker-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px 4px 16px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-400, #9ca3af);
}

.picker-section-dot {
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    display: inline-block;
}

/* Picker widget items */
.picker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.1s;
}
.picker-item:hover {
    background: var(--gray-50, #f9fafb);
}
.picker-item.added {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.picker-item-info {
    flex: 1;
    min-width: 0;
}

.picker-item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picker-item-icon {
    font-size: 13px;
    margin-right: 2px;
    color: var(--gray-400, #9ca3af);
}

.picker-item-desc {
    font-size: 11px;
    color: var(--color-text-secondary, #6b7280);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picker-item-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    flex-shrink: 0;
    margin-left: 8px;
    color: var(--teal-700, #0f766e);
    background: var(--teal-50, #f0fdfa);
    border: 0.5px solid var(--teal-200, #99f6e4);
}
.picker-item.added .picker-item-badge {
    color: var(--gray-400, #9ca3af);
    background: var(--gray-50, #f9fafb);
    border-color: var(--gray-200, #e5e7eb);
}

/* ---- Drag states ---- */

.widget-card.dragging {
    opacity: 0.4;
    cursor: grabbing;
}

.widget-card.touch-dragging {
    opacity: 0.9;
    z-index: 2000;
    pointer-events: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
}

.drag-placeholder {
    background: rgba(20, 184, 166, 0.10);
    border: 1.5px dashed #14b8a6;
    border-radius: 0 !important;
}

/* Smooth sliding for grid items during drag */
.home-canvas.edit-mode .widget-card {
    transition: transform 0.15s ease;
}
/* Disable transition on the card being dragged to prevent jank */
.home-canvas.edit-mode .widget-card.dragging,
.home-canvas.edit-mode .widget-card.touch-dragging {
    transition: none;
}

/* Drag handle cursor */
.widget-drag-handle {
    cursor: grab;
}
.widget-drag-handle:active {
    cursor: grabbing;
}

/* ---- Loading state ---- */

.home-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--color-text-secondary, #6b7280);
    font-size: 13px;
    grid-column: span 3;
}

/* ---- Empty state ---- */

.home-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--color-text-secondary, #6b7280);
    font-size: 14px;
    grid-column: span 3;
    gap: 8px;
}

.home-empty-icon {
    font-size: 32px;
    opacity: 0.4;
}

/* ---- Home Nav Item Styling ---- */

.home-nav-item {
    padding: 2px 0;
}

.home-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--color-text-secondary, #64748b);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.1s, color 0.1s;
}
.home-nav-link:hover {
    background: var(--gray-50, #f1f5f9);
    color: var(--color-text-primary, #1e293b);
}
.home-nav-link.active {
    background: var(--teal-50, #f0fdfa);
    color: var(--teal-700, #0f766e);
    font-weight: 600;
}

.home-nav-link .menu-icon {
    font-size: 16px;
}

.home-divider {
    margin: 4px 0;
}

/* ---- Responsive: single column on narrow screens ---- */

@media (max-width: 768px) {
    .widget-grid {
        grid-template-columns: 1fr;
        padding: 4px;
        gap: 6px;
        overflow-x: hidden;
        margin: 0 auto;
    }
    .span-1, .span-2, .span-3 {
        grid-column: span 1;
    }
    .widget-card {
        max-width: 100%;
        overflow: hidden;
    }
    .widget-card-body {
        overflow-x: hidden;
        padding: 8px;
    }
    .home-canvas {
        overflow-x: hidden;
        max-width: 100vw;
    }
    /* Widget header tighter on mobile */
    .widget-card-header {
        padding: 8px;
    }
}

/* ============================================================================
   Widget Template Styles (wt- prefix)
   ============================================================================ */

/* ── List template ── */
.wt-list { display: flex; flex-direction: column; gap: 2px; }
.wt-list-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #f3f4f6; }
.wt-list-item:last-child { border-bottom: none; }
.wt-avatar { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0; border-radius: 0; }
.wt-list-content { flex: 1; min-width: 0; }
.wt-list-primary { font-size: 13px; font-weight: 500; color: #1f2937; display: flex; align-items: center; gap: 6px; }
.wt-list-sub { font-size: 11px; color: #9ca3af; margin-top: 1px; }
.wt-status-dot { width: 7px; height: 7px; flex-shrink: 0; display: inline-block; border-radius: 50%; }

/* ── Stat template ── */
.wt-stat { text-align: center; padding: 12px 8px; }
.wt-stat-value { font-size: 32px; font-weight: 700; color: #1f2937; line-height: 1.1; }
.wt-stat-label { font-size: 12px; color: #6b7280; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.wt-stat-trend { font-size: 14px; font-weight: 600; margin-top: 6px; }
.wt-trend-up { color: #10b981; }
.wt-trend-down { color: #ef4444; }

/* ── Metric grid template ── */
.wt-metric-grid { display: flex; gap: 0; }
.wt-metric { flex: 1; text-align: center; padding: 10px 8px; border-right: 1px solid #f3f4f6; }
.wt-metric:last-child { border-right: none; }
.wt-metric-value { font-size: 22px; font-weight: 700; color: #1f2937; }
.wt-metric-label { font-size: 10px; color: #6b7280; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ── Countdown template ── */
.wt-countdown { text-align: center; padding: 16px 8px; }
.wt-countdown-number { font-size: 48px; font-weight: 800; color: #14b8a6; line-height: 1; }
.wt-countdown-label { font-size: 12px; color: #6b7280; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.wt-countdown-event { font-size: 13px; color: #374151; margin-top: 8px; font-weight: 500; }

/* ── Bar chart template ── */
.wt-bar-chart { display: flex; flex-direction: column; gap: 6px; }
.wt-bar-row { display: flex; align-items: center; gap: 8px; }
.wt-bar-label { width: 40px; min-width: 40px; font-size: 11px; color: #6b7280; text-align: right; }
.wt-bar-track { flex: 1; height: 16px; background: #f3f4f6; overflow: hidden; border-radius: 0; }
.wt-bar-fill { height: 100%; background: #14b8a6; transition: width 0.3s ease; border-radius: 0; }
.wt-bar-value { width: 36px; min-width: 36px; font-size: 11px; color: #374151; font-weight: 600; text-align: right; }

/* ── Alert feed template ── */
.wt-alert-feed { display: flex; flex-direction: column; gap: 2px; }
.wt-alert-item { display: flex; align-items: flex-start; gap: 8px; padding: 6px 4px; border-bottom: 1px solid #f3f4f6; }
.wt-alert-item:last-child { border-bottom: none; }
.wt-alert-dot { width: 8px; height: 8px; flex-shrink: 0; margin-top: 4px; border-radius: 50%; }
.wt-alert-content { flex: 1; }
.wt-alert-msg { font-size: 12px; color: #1f2937; }
.wt-alert-ts { font-size: 10px; color: #9ca3af; margin-top: 2px; }

/* ── Notes template ── */
.wt-notes { padding: 0; }
.wt-notes-textarea { width: 100%; min-height: 80px; border: none; padding: 8px 12px; font-size: 13px; font-family: inherit; color: #374151; resize: vertical; background: transparent; box-sizing: border-box; border-radius: 0; }
.wt-notes-textarea:focus { outline: none; background: #f9fafb; }
.wt-notes-textarea::placeholder { color: #9ca3af; }

/* ── World Clock template ── */
.wt-clock-list { display: flex; flex-direction: column; gap: 0; }
.wt-clock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1px; background: #f3f4f6; }
.wt-clock-city { padding: 10px 12px; background: white; }
.wt-clock-grid .wt-clock-city { text-align: center; padding: 12px 8px; }
.wt-clock-list .wt-clock-city { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #f3f4f6; }
.wt-clock-list .wt-clock-city:last-child { border-bottom: none; }
.wt-clock-name { font-size: 12px; color: #6b7280; min-width: 80px; }
.wt-clock-time { font-size: 18px; font-weight: 700; color: #1f2937; font-variant-numeric: tabular-nums; }
.wt-clock-grid .wt-clock-time { font-size: 22px; }
.wt-clock-date { font-size: 10px; color: #9ca3af; margin-left: auto; }
.wt-clock-grid .wt-clock-date { margin-left: 0; margin-top: 2px; }
.wt-clock-offset { font-size: 10px; color: #14b8a6; font-weight: 500; }
.wt-clock-list .wt-clock-offset { margin-left: 8px; }
.wt-clock-grid .wt-clock-offset { margin-top: 2px; }
.wt-clock-toggle-bar { display: flex; gap: 0; padding: 4px 12px; border-bottom: 1px solid #f3f4f6; }
.wt-clock-toggle { background: none; border: 1px solid #d1d5db; padding: 3px 10px; font-size: 10px; cursor: pointer; color: #6b7280; }
.wt-clock-toggle.active { background: #14b8a6; color: white; border-color: #14b8a6; }
.wt-clock-toggle:first-child { border-right: none; }
.wt-clock-empty { padding: 20px; text-align: center; color: #9ca3af; font-size: 12px; }
.wt-clock-manage-bar, .wt-weather-manage-bar { padding: 6px 12px; border-top: 1px solid #f3f4f6; text-align: right; }
.wt-manage-btn { background: none; border: none; color: #14b8a6; font-size: 11px; cursor: pointer; padding: 4px 8px; }
.wt-manage-btn:hover { text-decoration: underline; }

/* ── Weather Forecast template ── */
.wt-weather-list { display: flex; flex-direction: column; gap: 0; overflow: hidden; max-width: 100%; }
.wt-weather-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1px; background: #f3f4f6; }
.wt-weather-city { padding: 10px 12px; background: white; overflow: hidden; min-width: 0; max-width: 100%; box-sizing: border-box; }
.wt-weather-city-header { display: flex; align-items: center; gap: 8px; }
.wt-weather-icon { width: 40px; height: 40px; flex-shrink: 0; }
.wt-weather-city-info { flex: 1; min-width: 0; }
.wt-weather-city-name { font-size: 13px; font-weight: 600; color: #1f2937; }
.wt-weather-desc { font-size: 11px; color: #6b7280; text-transform: capitalize; }
.wt-weather-temp { font-size: 24px; font-weight: 700; color: #1f2937; flex-shrink: 0; }
.wt-weather-details { display: flex; gap: 12px; font-size: 10px; color: #9ca3af; margin-top: 4px; padding-top: 4px; border-top: 1px solid #f3f4f6; }
.wt-weather-loading { padding: 20px; text-align: center; color: #9ca3af; font-size: 12px; }
.wt-weather-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 6px 12px; border-bottom: 1px solid #f3f4f6; }
.wt-weather-pager-btn { background: none; border: 1px solid #d1d5db; padding: 2px 10px; cursor: pointer; font-size: 14px; color: #374151; }
.wt-weather-pager-btn:hover:not(:disabled) { background: #f9fafb; }
.wt-weather-pager-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.wt-weather-pager-label { font-size: 11px; color: #6b7280; }
.wt-weather-empty { padding: 20px; text-align: center; color: #9ca3af; font-size: 12px; }

/* ── Weather forecast sections ── */
.wt-forecast-section { margin-top: 6px; padding-top: 6px; border-top: 1px solid #f3f4f6; overflow: hidden; min-width: 0; }
.wt-forecast-label { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #9ca3af; margin-bottom: 4px; }
.wt-forecast-hours { display: flex; gap: 2px; overflow-x: scroll; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; }
.wt-forecast-hour { text-align: center; min-width: 44px; max-width: 44px; padding: 2px 4px; flex-shrink: 0; }
.wt-forecast-time { font-size: 9px; color: #9ca3af; }
.wt-forecast-icon { width: 24px; height: 24px; }
.wt-forecast-temp { font-size: 11px; font-weight: 600; color: #374151; }
.wt-forecast-days { display: flex; gap: 2px; }
.wt-forecast-day { text-align: center; flex: 1; min-width: 0; padding: 2px 0; }
.wt-forecast-dayname { font-size: 9px; font-weight: 600; color: #6b7280; }
.wt-forecast-low { font-size: 10px; color: #9ca3af; }
.wt-weather-temp-block { text-align: right; flex-shrink: 0; }
.wt-weather-highlow { display: flex; gap: 6px; font-size: 11px; justify-content: flex-end; }
.wt-hl-high { color: #ef4444; font-weight: 500; }
.wt-hl-low { color: #3b82f6; font-weight: 500; }
.wt-weather-sunrow { display: flex; gap: 12px; font-size: 10px; color: #9ca3af; margin-top: 2px; }
.wt-weather-sunrow i { color: #f59e0b; margin-right: 2px; }
.wt-forecast-day-marker { display: flex; align-items: center; justify-content: center; min-width: 32px; font-size: 9px; font-weight: 700; color: var(--teal, #14b8a6); border-left: 2px solid var(--teal, #14b8a6); padding-left: 4px; align-self: stretch; flex-shrink: 0; }

/* ── Manage cities panel (shared by clock + weather) ── */
.wt-manage-panel { position: absolute; top: 0; right: 0; width: 280px; min-height: 100%; max-height: 400px; background: white; border-left: 1px solid #e5e7eb; z-index: 20; display: flex; flex-direction: column; box-shadow: -2px 0 8px rgba(0,0,0,0.08); overflow: hidden; }
.wt-manage-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid #e5e7eb; }
.wt-manage-title { font-size: 14px; font-weight: 600; color: #1f2937; }
.wt-manage-close { background: none; border: none; font-size: 18px; cursor: pointer; color: #6b7280; padding: 2px 6px; }
.wt-manage-close:hover { color: #1f2937; }
.wt-manage-search { padding: 8px 14px; border-bottom: 1px solid #f3f4f6; }
.wt-manage-search input { width: 100%; padding: 6px 10px; border: 1px solid #d1d5db; font-size: 12px; box-sizing: border-box; }
.wt-manage-search input:focus { border-color: #14b8a6; outline: none; }
.wt-manage-list { flex: 1; overflow-y: auto; }
.wt-manage-item { display: flex; align-items: center; padding: 8px 14px; border-bottom: 1px solid #f3f4f6; cursor: pointer; font-size: 12px; color: #374151; }
.wt-manage-item:hover { background: #f9fafb; }
.wt-manage-item.added { color: #9ca3af; }
.wt-manage-item .wt-manage-tz { font-size: 10px; color: #9ca3af; margin-left: auto; }
.wt-manage-item .wt-manage-remove { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 14px; margin-left: 8px; padding: 0 4px; }
.wt-manage-current { padding: 8px 14px; border-bottom: 1px solid #e5e7eb; }
.wt-manage-current-label { font-size: 10px; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.wt-manage-current-item { display: flex; align-items: center; padding: 4px 0; font-size: 12px; color: #1f2937; }
.wt-manage-current-item .wt-manage-remove { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 12px; margin-left: auto; padding: 0 4px; }
.wt-manage-current-item .wt-manage-drag { cursor: grab; color: #9ca3af; margin-right: 6px; font-size: 12px; }
.wt-manage-current-item.dragging { opacity: 0.4; }
.wt-manage-current-item.drag-over { border-top: 2px solid #14b8a6; }

/* ── Unknown/fallback template ── */
.wt-unknown { padding: 12px; }
