/* no margins or padding */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
        
/* app full height and width */
html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
}
        
/* app full viewport */
#app {
  width: 100vw;
  height: 100vh;
}

/* panel header class */
.header-panel {
  height: 30px; 
  background-color: #f8f9fa; 
  border-bottom: 1px solid #dee2e6; 
  display: flex; 
  justify-content: space-between; 
  align-items: center;
}

.header-panel-text {
  font-size: 11px;
  color: #666; 
  text-transform: uppercase; 
  font-weight: 600; 
  padding-left: 4px !important;
}

.header-panel-flex {
  display: flex;
  gap: 2px;
  padding-right: 4px !important;
}

/* panel header icon buttons */
.button-icon {
  padding: 5px 6px;
  height: 24px;
  width: 24px;
  border: 1px solid #ccc; 
  background: white;
  cursor: pointer;
  border-radius: 3px; 
  display: flex; 
  align-items: center; 
  justify-content: center;
}

.button-icon:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.button-icon:focus {
  outline: none;
}

.button-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 3px 12px 2px;
  margin: 0 2px 0 0;
  cursor: pointer;
  font-size: 12px;
  color: #333;
  height: 30px;
  width: 90px;
  transition: border-color 0.2s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.button-tab:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.button-tab.active {
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom-color: #2c3e50;
  font-weight: 500;
}

.button-tab:focus {
  outline: none;
}

.container {
  height: 100%; 
  width: 100%; 
  position: relative;
}

/* .container-hidden {
  height: 100%; 
  width: 100%; 
  display: none;
}

.container-placeholder-icon {
  font-size: 48px; 
  margin-bottom: 16px; 
  color: #ccc;
}

.container-visible {
  height: 100%; 
  width: 100%; 
  display: block;
}

.container-placeholder {
  text-align: center; 
  color: #666; 
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
} */

/* ===========================================
   Unified Placeholder System
   =========================================== */

.placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 20px;
  text-align: center;
  color: #666;
}

.placeholder-icon {
  font-size: 48px;
  margin-bottom: 16px;
  color: #ccc;
}

.placeholder-text {
  font-size: 13px;
  line-height: 1.4;
}

/* Header Bar */
.header-bar {
    height: 36px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    user-select: none;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 2px;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* Divider between button groups */
.header-divider {
    width: 1px;
    height: 18px;
    background-color: #dee2e6;
    margin: 0 6px;
}

/* Base button styles - minimal/ghost */
.header-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: background-color 0.15s ease;
}

.header-btn:focus {
    outline: none;
}

/* Icon buttons */
.header-btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 13px;
}

.header-btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: #333;
}

.header-btn-icon:active {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Logo in header */
.header-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 4px 0 2px;
}

.header-logo {
    height: 26px;
    width: 26px;
}

.header-logo-text {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 13px;
    font-weight: 600;
    color: #1a1c22;
    letter-spacing: 0.03em;
}

.header-logo-text span {
    color: #2f6ef5;
}

/* Mode toggle container */
.header-mode-toggle {
    display: flex;
    align-items: center;
    background-color: #e9ecef;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

/* Mode toggle buttons - Editor/Chat */
.header-mode-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 4px 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    transition: all 0.15s ease;
    width: 75px;
}

.header-mode-btn:hover:not(.active) {
    color: #333;
    background-color: rgba(255, 255, 255, 0.5);
}

.header-mode-btn:focus {
    outline: none;
}

.header-mode-btn.active {
    background-color: #fff;
    border-color: #ccc;
    color: #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Optional: Text buttons (if you want labeled buttons later) */
.header-btn-text {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #555;
    min-width: 80px;
}

.header-btn-text:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: #333;
}

/* Action buttons with icon + text (Deploy, Share) */
.header-btn-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #555;
    min-width: 80px;
}

.header-btn-action:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: #333;
}

.header-btn-action i {
    font-size: 12px;
}

/* Run button */
.header-btn-run {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background-color: #28a745;
    border: none;
    transition: background-color 0.15s ease;
}

.header-btn-run:hover {
    background-color: #218838;
}

.header-btn-run:active {
    background-color: #1e7e34;
}

.header-btn-run i {
    font-size: 10px;
}

/* ===== OpenRouter Button + Popover ===== */
.or-popover-wrap {
    position: relative;
}

.header-openrouter-btn {
    color: #6b5ce7;
    min-width: auto;
}

.header-openrouter-btn:hover {
    background-color: rgba(107, 92, 231, 0.08);
    color: #5a4bd6;
}

.header-openrouter-btn.openrouter-connected {
    color: #2ea043;
}

.header-openrouter-btn.openrouter-connected:hover {
    background-color: rgba(46, 160, 67, 0.08);
    color: #238636;
}

.or-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: background 0.2s;
}

.or-dot.on {
    background: #1aab6d;
    box-shadow: 0 0 5px rgba(26,171,109,0.5);
    animation: or-blink 2.4s infinite;
}

.or-dot.off {
    background: #868c9e;
}

@keyframes or-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.or-popover {
    position: fixed;
    width: 210px;
    background: #fff;
    border: 1px solid #e2e4ea;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.02);
    opacity: 0;
    transform: translateY(-5px) scale(0.98);
    transform-origin: top left;
    pointer-events: none;
    transition: all 0.18s cubic-bezier(0.16,1,0.3,1);
    z-index: 200;
}

.or-popover.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.op-header {
    padding: 11px 13px 9px;
    border-bottom: 1px solid #e2e4ea;
    display: flex;
    align-items: center;
    gap: 7px;
}

.op-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #1a1c22;
}

.op-body {
    padding: 10px 13px;
    border-bottom: 1px solid #e2e4ea;
}

.op-row {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.1s;
}

.op-row:hover {
    background: #f3f4f7;
}

.op-radio {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1.5px solid #c8cad4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.13s;
}

.op-radio.sel {
    border-color: #2f6ef5;
}

.op-radio.sel::after {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #2f6ef5;
}

.op-radio-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11px;
    color: #1a1c22;
}

.op-radio-hint {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 10px;
    color: #868c9e;
    margin-left: auto;
}

.op-radio-hint.ok {
    color: #1aab6d;
}

.op-byok-detail {
    margin-top: 7px;
    padding: 7px 9px;
    background: #f3f4f7;
    border: 1px solid #e2e4ea;
    border-radius: 5px;
    display: none;
}

.op-byok-detail.show {
    display: block;
}

.op-byok-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.op-byok-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 10px;
    color: #868c9e;
}

.op-byok-label b {
    color: #1a1c22;
    font-weight: 600;
}

.op-byok-btn {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #e2e4ea;
    background: #fff;
    color: #868c9e;
    cursor: pointer;
    transition: all 0.12s;
}

.op-byok-btn:hover {
    border-color: #c8cad4;
    color: #1a1c22;
}

.op-byok-btn.dc {
    border-color: rgba(220,38,38,0.2);
    color: #dc2626;
}

.op-byok-btn.dc:hover {
    border-color: #dc2626;
    background: rgba(220,38,38,0.06);
}

.op-upgrade {
    padding: 9px 13px;
    background: rgba(47,110,245,0.03);
}

.op-upgrade-copy {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 10px;
    color: #868c9e;
    line-height: 1.5;
    margin-bottom: 7px;
}

.op-upgrade-copy strong {
    color: #2f6ef5;
    font-weight: 600;
}

.op-upgrade-btn {
    width: 100%;
    padding: 5px 0;
    background: rgba(47,110,245,0.08);
    border: 1px solid rgba(47,110,245,0.2);
    border-radius: 5px;
    color: #2f6ef5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.13s;
}

.op-upgrade-btn:hover {
    background: rgba(47,110,245,0.14);
    border-color: rgba(47,110,245,0.38);
}

/* ===== User Button + Dropdown ===== */
.header-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #e2e4ea;
    border-radius: 5px;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: #868c9e;
    cursor: pointer;
    transition: all 0.12s;
    white-space: nowrap;
}

.header-user-btn:hover,
.header-user-btn.open {
    background: #f3f4f7;
    border-color: #c8cad4;
    color: #1a1c22;
}

.header-user-btn .auth-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.tier-chip {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.07em;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
}

.tier-chip.free {
    background: rgba(134,140,158,0.13);
    color: #868c9e;
}

.tier-chip.pro {
    background: rgba(47,110,245,0.1);
    color: #2f6ef5;
}

.user-dropdown {
    position: fixed;
    width: 240px;
    background: #fff;
    border: 1px solid #e2e4ea;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.02);
    opacity: 0;
    transform: translateY(-5px) scale(0.98);
    transform-origin: top right;
    pointer-events: none;
    transition: all 0.18s cubic-bezier(0.16,1,0.3,1);
    z-index: 200;
}

.user-dropdown.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.dd-top {
    padding: 12px 14px 10px;
    border-bottom: 1px solid #e2e4ea;
}

.dd-email {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 10px;
    color: #868c9e;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dd-plan-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dd-plan-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 10px;
    color: #868c9e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dd-upgrade {
    padding: 10px 14px;
    background: rgba(47,110,245,0.03);
    border-bottom: 1px solid #e2e4ea;
}

.dd-upgrade-copy {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 10px;
    color: #868c9e;
    line-height: 1.55;
    margin-bottom: 8px;
}

.dd-upgrade-copy strong {
    color: #2f6ef5;
    font-weight: 600;
}

.dd-upgrade-cta {
    width: 100%;
    padding: 6px 0;
    background: rgba(47,110,245,0.08);
    border: 1px solid rgba(47,110,245,0.2);
    border-radius: 5px;
    color: #2f6ef5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.13s;
    letter-spacing: 0.01em;
}

.dd-upgrade-cta:hover {
    background: rgba(47,110,245,0.14);
    border-color: rgba(47,110,245,0.38);
}

.dd-footer {
    padding: 5px 6px;
}

.dd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 8px;
    border-radius: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11px;
    color: #868c9e;
    text-align: left;
    transition: all 0.1s;
}

.dd-item:hover {
    background: #f3f4f7;
    color: #1a1c22;
}

.dd-item.danger:hover {
    background: rgba(220,38,38,0.06);
    color: #dc2626;
}

.dd-item i {
    width: 12px;
    font-size: 11px;
    flex-shrink: 0;
}

.content-view {
  height: 100%; 
  width: 100%; 
  display: flex; 
  flex-direction: column;
}

.hidden {
  display: none;
}

.viewer-container {
  height: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.viewer-toolbar {
  height: 28px;
  min-height: 28px;
  background: #f8f9fa;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 8px;
}

.viewer-clear-btn {
  background: transparent;
  border: 1px solid #ccc;
  border-radius: 3px;
  width: 24px;
  height: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 11px;
}

.viewer-clear-btn:hover {
  background: #e8e8e8;
  color: #333;
}

.viewer-content-area {
  flex: 1;
  overflow: auto;
}

.viewer-item {
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: center;
}

.viewer-item:last-child {
  border-bottom: none;
}

.viewer-item iframe {
  display: block;
  border: none;
  outline: none;
  width: 100%;
}

.viewer-item img {
  display: block;
  max-width: 100%;
}

.viewer-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #999;
  font-size: 13px;
}

.viewer-placeholder i {
  font-size: 48px;
  color: #ddd;
  margin-bottom: 12px;
}

/* Sidebar toggle button */
.header-sidebar-toggle {
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-icon {
    width: 12px;
    height: 12px;
    fill: currentColor;
    transition: transform 0.2s ease;
}

.header-sidebar-toggle.collapsed .sidebar-toggle-icon {
    transform: rotate(180deg);
}

/* ===== Dropdowns (shared) ===== */
.header-dropdown {
  position: fixed;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  min-width: 180px;
  z-index: 1600;
  overflow: hidden;
}

.header-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  font-size: 12px;
  color: #333;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.header-dropdown-item:hover {
  background-color: #f0f0f0;
}

.header-dropdown-item i {
  font-size: 13px;
  width: 16px;
  text-align: center;
  color: #555;
}

.header-dropdown-divider {
  height: 1px;
  background-color: #eee;
  margin: 4px 0;
}

/* ===== Auth Modal ===== */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.auth-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  width: 340px;
  overflow: hidden;
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.auth-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.auth-modal-close:hover {
  color: #333;
}

#auth-email-form {
  padding: 0 20px;
}

.auth-modal-input {
  display: block;
  width: 100%;
  padding: 9px 12px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}

.auth-modal-input:focus {
  outline: none;
  border-color: #4a9eff;
  box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}

.auth-modal-submit {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.auth-modal-submit:hover {
  background: #222;
}

.auth-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-modal-error {
  background: #fff0f0;
  color: #cc3333;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  border: 1px solid #ffdddd;
}

.auth-modal-footer {
  padding: 14px 20px;
  text-align: center;
  font-size: 12px;
  color: #666;
  border-top: 1px solid #eee;
  margin-top: 16px;
}

.auth-modal-toggle {
  background: none;
  border: none;
  color: #4a9eff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  padding: 0;
  margin-left: 4px;
}

.auth-modal-toggle:hover {
  text-decoration: underline;
}

/* ===== Generic Modal ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  width: 460px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #999;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.modal-close:hover {
  color: #333;
}

.modal-body {
  padding: 0 20px 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 13px;
  overflow-y: auto;
}

.modal-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #333;
}

.modal-input {
  display: block;
  width: 100%;
  padding: 9px 12px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}

.modal-input:focus {
  outline: none;
  border-color: #4a9eff;
  box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.15);
}

textarea.modal-input {
  resize: vertical;
}

.modal-error {
  background: #fff0f0;
  color: #cc3333;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 10px;
  border: 1px solid #ffdddd;
}

.modal-status {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}

.project-row {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}
.project-row:hover {
  background: #f5f5f5;
}
.project-row:last-child {
  border-bottom: none;
}
.project-title {
  flex: 1;
  font-weight: 500;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 12px;
}
.project-meta {
  color: #888;
  font-size: 12px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.project-badge {
  background: #e8f4fd;
  color: #1a73e8;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 3px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
}

.modal-btn-primary {
  padding: 9px 20px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}

.modal-btn-primary:hover {
  background: #222;
}

.modal-btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal-btn-secondary {
  padding: 9px 20px;
  background: #f0f0f0;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}

.modal-btn-secondary:hover {
  background: #e5e5e5;
}

.modal-btn-link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
  color: #4a9eff;
}

.modal-btn-link:hover {
  color: #2b7de9;
}

.auth-dropdown-divider {
  height: 1px;
  background-color: #eee;
  margin: 4px 0;
}

/* ===== Auth Wrapper ===== */
.header-auth-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

/* Legacy auth dropdown (sign-in options for unauthenticated) */
.auth-dropdown {
  position: fixed;
  background: #fff;
  border: 1px solid #e2e4ea;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  min-width: 200px;
  z-index: 1600;
  overflow: hidden;
}

.auth-dropdown-header {
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #1a1c22;
  border-bottom: 1px solid #e2e4ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  font-size: 12px;
  color: #1a1c22;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.auth-dropdown-item:hover {
  background-color: #f3f4f7;
}

.auth-dropdown-item i {
  font-size: 14px;
  width: 16px;
  text-align: center;
}

.hidden {
  display: none;
}