/* GDrive Fast Editor Styles - 1Life Teal UI Theme (Blends with POD Comparator & Account Merging) */

#view-gdrive_editor {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f1f5f9;
  font-family: inherit;
}

.gdrive-view-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #f8fafc;
}

/* 1Life Signature Gradient Topbar */
.gdrive-topbar {
  min-height: 44px;
  height: 44px;
  background: linear-gradient(90deg, rgba(57, 197, 188, 1) 0%, rgba(57, 197, 188, 1) 5%, rgba(43, 174, 186, 1) 100%) !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 10px;
  color: #ffffff;
  flex-shrink: 0;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.gdrive-topbar .pod-topbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
}

.gdrive-header-badge {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  padding: 3px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gdrive-stage-body {
  display: flex;
  flex-direction: row;
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

/* Left Queue Sidebar */
.gdrive-sidebar {
  width: 290px;
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100%;
  overflow: hidden;
  transition: width 0.2s ease, opacity 0.2s ease;
}

.gdrive-sidebar.collapsed {
  display: none !important;
}

.gdrive-sidebar-header {
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.gdrive-sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 8px;
}

.gdrive-badge-count {
  background: #0d9488;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.gdrive-basedir-container {
  display: flex;
  align-items: center;
  gap: 4px;
}

.gdrive-basedir-box {
  flex: 1;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 0;
}

.gdrive-basedir-box:hover {
  border-color: #2baeba;
  background: #f0fdfa;
}

.gdrive-basedir-browse-btn {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #99f6e4;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  pointer-events: none;
  flex-shrink: 0;
}

.gdrive-basedir-explore-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 5px 7px;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.gdrive-basedir-explore-btn:hover {
  border-color: #2baeba;
  color: #0d9488;
  background: #f0fdfa;
}

.gdrive-basedir-text {
  flex: 1;
  font-size: 11px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: rtl;
  text-align: left;
}

/* Paste & Search Box */
.gdrive-paste-wrap {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.gdrive-paste-textarea {
  width: 100%;
  height: 56px;
  resize: none;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11.5px;
  font-family: inherit;
  color: #1e293b;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gdrive-paste-textarea:focus {
  border-color: #2baeba;
  box-shadow: 0 0 0 2px rgba(43, 174, 186, 0.2);
}

.gdrive-paste-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.gdrive-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #39c5bc 0%, #0d9488 100%);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: opacity 0.15s ease, transform 0.1s ease;
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.25);
}

.gdrive-btn-primary:hover {
  opacity: 0.93;
}

.gdrive-btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.15s ease;
}

.gdrive-btn-secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* Queue List */
.gdrive-queue-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gdrive-queue-item {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: #ffffff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.15s ease;
}

.gdrive-queue-item:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.gdrive-queue-item.active {
  background: #f0fdfa;
  border-color: #5eead4;
  box-shadow: 0 1px 4px rgba(43, 174, 186, 0.15);
}

.gdrive-queue-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gdrive-queue-gatn {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.gdrive-queue-status {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.status-ready {
  background: #ccfbf1;
  color: #0f766e;
}

.status-done,
.status-saved {
  background: #dcfce7;
  color: #166534;
}

.status-skipped {
  background: #fef3c7;
  color: #92400e;
}

.status-notfound {
  background: #fee2e2;
  color: #991b1b;
}

.gdrive-queue-sub {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Workspace */
.gdrive-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #f8fafc;
  min-width: 0;
}

.gdrive-pill {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Document Tabs Bar */
.gdrive-docbar {
  padding: 8px 14px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gdrive-docbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  min-width: 0;
}

.gdrive-mode-toggle {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.gdrive-mode-toggle.active {
  background: #2baeba;
  color: #ffffff;
  border-color: #2baeba;
}

.gdrive-doc-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}

.gdrive-doc-tab {
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.gdrive-doc-tab:hover {
  border-color: #2baeba;
  color: #0d9488;
  background: #f0fdfa;
}

.gdrive-doc-tab.active {
  background: #2baeba;
  border-color: #2baeba;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(43, 174, 186, 0.3);
}

.gdrive-doc-tab.is-saving {
  opacity: 0.75;
  background: #f1f5f9 !important;
  border-color: #94a3b8 !important;
  color: #475569 !important;
  cursor: wait;
}

.gdrive-doc-tab.has-pending-removals {
  border-color: #fca5a5;
  background: #fff8f8;
}

.gdrive-doc-tab.has-pending-removals.active {
  background: #2baeba;
  border-color: #2baeba;
}

.gdrive-tab-unsaved-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ef4444;
  display: inline-block;
  margin-left: 3px;
  box-shadow: 0 0 0 1px #fee2e2;
}

.gdrive-tab-saved-icon {
  color: #10b981 !important;
}

.gdrive-tab-saving-text {
  font-size: 10px;
  color: #0d9488;
  font-weight: 700;
  margin-left: 2px;
}

.gdrive-tab-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid #cbd5e1;
  border-top-color: #0d9488;
  border-radius: 50%;
  display: inline-block;
  animation: gdrive-tab-spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes gdrive-tab-spin {
  to {
    transform: rotate(360deg);
  }
}

.gdrive-processing-save {
  opacity: 0.55 !important;
  filter: grayscale(70%) !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.gdrive-docbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Smart Action Bar */
.gdrive-actionbar {
  padding: 8px 14px;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gdrive-quick-remove-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gdrive-remove-input {
  width: 130px;
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease;
}

.gdrive-remove-input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15);
}

.gdrive-btn-delete-marked {
  display: none;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  background: #fee2e2;
  border: 1px solid #f87171;
  color: #b91c1c;
  cursor: pointer;
  margin-left: 4px;
  transition: all 0.15s ease;
}

.gdrive-btn-delete-marked:hover {
  background: #fecaca;
  border-color: #ef4444;
  color: #991b1b;
  transform: translateY(-1px);
}

.gdrive-actionbar-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gdrive-btn-save-next {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.25);
  transition: opacity 0.15s ease, transform 0.1s ease;
}

.gdrive-btn-save-next:hover {
  opacity: 0.93;
}

.gdrive-btn-skip {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s ease;
}

.gdrive-btn-skip:hover {
  background: #fde68a;
}

/* Page Thumbnail Grid */
.gdrive-grid-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  align-content: flex-start;
}

.gdrive-page-card {
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.18s ease;
  position: relative;
}

.gdrive-page-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.gdrive-page-card.marked-removed {
  border-color: #cbd5e1;
  background: #f1f5f9;
  filter: grayscale(85%);
  box-shadow: none;
}

.gdrive-page-card.marked-removed:hover {
  border-color: #94a3b8;
  filter: grayscale(60%);
}

.gdrive-page-header {
  padding: 6px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.gdrive-page-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.gdrive-page-checkbox {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #ef4444;
  margin: 0;
}

.gdrive-page-status-pill.remove-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #fee2e2;
  color: #b91c1c;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.gdrive-page-card.marked-removed .gdrive-page-header {
  background: #e2e8f0;
  color: #475569;
  border-bottom-color: #cbd5e1;
}

.gdrive-thumbnail-wrapper {
  position: relative;
  width: 100%;
  height: 270px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
}

.gdrive-thumbnail-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.gdrive-page-card.marked-removed .gdrive-thumbnail-img {
  opacity: 0.35;
  filter: grayscale(100%);
}

.gdrive-removed-overlay {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(30, 41, 59, 0.90);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.gdrive-page-card.marked-removed .gdrive-removed-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

#gdrive-single-viewport.page-is-removed #gdrive-single-img,
#gdrive-single-viewport.page-is-removed #gdrive-single-canvas {
  opacity: 0.40;
  filter: grayscale(100%);
}

.gdrive-page-toolbar {
  padding: 5px 8px;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.gdrive-card-tool-btn {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 3px;
  transition: all 0.12s ease;
}

.gdrive-card-tool-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.gdrive-card-tool-btn.btn-remove-active {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
}

/* Status Bar */
.gdrive-statusbar {
  padding: 5px 16px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.gdrive-credits {
  font-size: 11px;
  color: #64748b;
  letter-spacing: 0.2px;
}

.gdrive-credits strong {
  color: #0d9488;
}

/* High-Res Zoom Modal */
.gdrive-modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(2px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.gdrive-modal-backdrop.open {
  display: flex;
}

.gdrive-modal-window {
  background: #ffffff;
  width: 90vw;
  height: 90vh;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gdrive-modal-header {
  padding: 10px 16px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gdrive-modal-body {
  flex: 1;
  background: #1e293b;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
  touch-action: none;
}

.gdrive-modal-img {
  max-width: 95%;
  max-height: 95%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  pointer-events: none;
}

/* Single Page Interactive High-Res Viewer */
.gdrive-single-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0f172a;
  position: relative;
}

.gdrive-single-toolbar {
  padding: 6px 14px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  z-index: 10;
}

.gdrive-single-toolbar-left,
.gdrive-single-toolbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gdrive-toolbar-separator {
  width: 1px;
  height: 20px;
  background: #475569;
  margin: 0 4px;
}

.gdrive-page-indicator {
  font-size: 11.5px;
  font-weight: 700;
  color: #f1f5f9;
  padding: 3px 8px;
  background: #334155;
  border-radius: 4px;
  min-width: 90px;
  text-align: center;
}

.gdrive-single-zoom-cluster {
  display: flex;
  align-items: center;
  background: #334155;
  border-radius: 5px;
  overflow: hidden;
}

.gdrive-zoom-btn {
  background: transparent;
  color: #f1f5f9;
  border: none;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease;
}

.gdrive-zoom-btn:hover {
  background: #475569;
}

.gdrive-zoom-readout {
  font-size: 11px;
  font-weight: 700;
  color: #2baeba;
  padding: 3px 6px;
  cursor: pointer;
  user-select: none;
}

.gdrive-tool-btn {
  background: #334155;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 5px;
  padding: 4px 8px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.gdrive-tool-btn:hover {
  background: #475569;
  color: #ffffff;
}

.gdrive-tool-btn.btn-remove-active {
  background: #ef4444;
  border-color: #dc2626;
  color: #ffffff;
}

.gdrive-single-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle, #1e293b 0%, #0f172a 100%);
  user-select: none;
  touch-action: none;
}

.gdrive-single-viewport {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  transform-origin: center center;
  will-change: transform;
}

.gdrive-single-img {
  max-width: 90vw;
  max-height: calc(100vh - 210px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
  background: #ffffff;
  pointer-events: none;
}

.gdrive-single-removed-badge {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(220, 38, 38, 0.95);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 5;
}

/* Custom In-App Modal Dialog */
.gdrive-dialog-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gdriveFadeIn 0.15s ease-out;
}

@keyframes gdriveFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.gdrive-dialog-card {
  background: #ffffff;
  border-radius: 12px;
  width: 440px;
  max-width: 92vw;
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.25), 0 0 1px 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  animation: gdriveScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes gdriveScaleUp {
  from {
    transform: scale(0.95);
    opacity: 0.8;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.gdrive-dialog-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.gdrive-dialog-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ccfbf1;
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gdrive-dialog-icon-circle.danger {
  background: #fee2e2;
  color: #ef4444;
}

.gdrive-dialog-icon-circle.warning {
  background: #fef3c7;
  color: #d97706;
}

.gdrive-dialog-title-group {
  flex: 1;
  min-width: 0;
}

.gdrive-dialog-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.gdrive-dialog-subtitle {
  font-size: 11.5px;
  color: #64748b;
  margin: 2px 0 0 0;
}

.gdrive-dialog-body {
  padding: 18px 20px;
}

.gdrive-dialog-message {
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
  word-break: break-word;
}

.gdrive-dialog-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}

.gdrive-dialog-input:focus {
  border-color: #2baeba;
  box-shadow: 0 0 0 3px rgba(43, 174, 186, 0.18);
}

.gdrive-dialog-footer {
  padding: 12px 20px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.gdrive-dialog-btn {
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.gdrive-dialog-btn.secondary {
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.gdrive-dialog-btn.secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.gdrive-dialog-btn.primary {
  background: #2baeba;
  color: #ffffff;
}

.gdrive-dialog-btn.primary:hover {
  background: #1d8f99;
}

.gdrive-dialog-btn.danger {
  background: #ef4444;
  color: #ffffff;
}

.gdrive-dialog-btn.danger:hover {
  background: #dc2626;
}

/* GDrive Action Loading Overlay */
.gdrive-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: gdriveFadeIn 0.15s ease-out;
}

@keyframes gdriveFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.gdrive-loading-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px 32px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  text-align: center;
  min-width: 260px;
  max-width: 340px;
  border: 1px solid #e2e8f0;
}

.gdrive-loading-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

/* Google Drive Connection Pill & Folder Picker Modal */
.gdrive-auth-pill {
  gap: 6px !important;
}

.gdrive-auth-pill.connected {
  background: rgba(16, 185, 129, 0.16) !important;
  border-color: rgba(52, 211, 153, 0.45) !important;
  color: #ecfdf5 !important;
}

.gdrive-auth-pill.disconnected {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: rgba(251, 191, 36, 0.5) !important;
  color: #fef3c7 !important;
}

.gdrive-auth-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  flex-shrink: 0;
}

.gdrive-auth-pill.connected .gdrive-auth-dot {
  background: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
}

.gdrive-picker-card {
  background: #ffffff;
  border-radius: 12px;
  width: 560px;
  max-width: 94vw;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 22px 45px -10px rgba(0, 0, 0, 0.28), 0 0 1px 1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  animation: gdriveScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.gdrive-picker-paste-bar {
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.gdrive-picker-paste-bar .gdrive-dialog-input {
  flex: 1;
}

.gdrive-picker-paste-bar .gdrive-dialog-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.gdrive-picker-breadcrumbs {
  padding: 8px 16px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12px;
  background: #ffffff;
}

.gdrive-picker-crumb {
  background: none;
  border: none;
  padding: 3px 6px;
  border-radius: 4px;
  color: #0d9488;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}

.gdrive-picker-crumb:hover {
  background: #f0fdfa;
}

.gdrive-picker-crumb.active {
  color: #0f172a;
  cursor: default;
}

.gdrive-picker-crumb.active:hover {
  background: transparent;
}

.gdrive-picker-list {
  flex: 1;
  min-height: 220px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.gdrive-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.gdrive-picker-row:hover {
  background: #f1f5f9;
}

.gdrive-picker-row-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.gdrive-picker-row-name {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gdrive-picker-row-tag {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0369a1;
  flex-shrink: 0;
}

.gdrive-picker-use-btn {
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  flex-shrink: 0;
}

.gdrive-picker-use-btn:hover {
  border-color: #2baeba;
  color: #0d9488;
  background: #f0fdfa;
}

.gdrive-picker-empty {
  padding: 36px 16px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
}

/* ==========================================================================
   Medicine Pack & Delivery Modal Drawer + Drag-and-Drop Slots
   ========================================================================== */

.gdrive-medpack-toggle-btn.active {
  background: #0d9488 !important;
  color: #ffffff !important;
  border-color: #0f766e !important;
}

.gdrive-doc-tab.drag-over {
  border-color: #0d9488 !important;
  background: #ccfbf1 !important;
  color: #0f766e !important;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}

.gdrive-medpack-drawer {
  width: 390px;
  min-width: 350px;
  max-width: 440px;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: -4px 0 18px rgba(15, 23, 42, 0.06);
}

.gdrive-medpack-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}

.gdrive-medpack-close-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  border-radius: 6px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gdrive-medpack-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.gdrive-medpack-search-box {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  flex-shrink: 0;
}

.gdrive-medpack-input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  color: #0f172a;
  outline: none;
}

.gdrive-medpack-input:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}

.gdrive-medpack-arranged-info {
  font-size: 10.5px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  text-align: right;
}

.gdrive-medpack-dropbar {
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.gdrive-medpack-mode-select {
  font-size: 10.5px;
  font-weight: 600;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  padding: 2px 6px;
  outline: none;
}

.gdrive-medpack-slots {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}

.gdrive-drop-slot {
  border: 1.5px dashed #94a3b8;
  border-radius: 7px;
  padding: 5px 3px;
  text-align: center;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.14s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  user-select: none;
}

.gdrive-drop-slot:hover {
  border-color: #0d9488;
  background: #f0fdfa;
}

.gdrive-drop-slot.slot-present {
  border-style: solid;
  border-color: #86efac;
  background: #f0fdf4;
}

.gdrive-drop-slot.drag-over {
  border-style: solid;
  border-color: #0d9488;
  background: #ccfbf1;
  transform: scale(1.04);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

.gdrive-drop-slot .slot-num {
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
}

.gdrive-drop-slot .slot-lbl {
  font-size: 9.5px;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.gdrive-medpack-batchbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: #f0fdfa;
  border-bottom: 1px solid #99f6e4;
}

.gdrive-medpack-results {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f1f5f9;
}

.gdrive-medpack-results::-webkit-scrollbar {
  width: 6px;
}

.gdrive-medpack-results::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.gdrive-medpack-results::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.gdrive-medpack-results::-webkit-scrollbar-thumb:hover {
  background: #0d9488;
}

/* Scrollable Waybill Table Box for Multi-Waybill Results */
.gdrive-wb-table-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.gdrive-wb-table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.gdrive-wb-view-toggle {
  display: inline-flex;
  background: #e2e8f0;
  border-radius: 5px;
  padding: 1px;
  gap: 1px;
}

.gdrive-wb-view-btn {
  border: none;
  background: transparent;
  color: #475569;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.gdrive-wb-view-btn:hover {
  color: #0f172a;
}

.gdrive-wb-view-btn.active {
  background: #ffffff;
  color: #0d9488;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.gdrive-wb-table-wrap {
  max-height: 165px;
  min-height: 55px;
  overflow-y: auto;
  overflow-x: auto;
  background: #ffffff;
}

.gdrive-wb-table-wrap::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.gdrive-wb-table-wrap::-webkit-scrollbar-track {
  background: #f8fafc;
}

.gdrive-wb-table-wrap::-webkit-scrollbar-thumb {
  background: #0d9488;
  border-radius: 3px;
}

.gdrive-wb-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #0f766e;
}

.gdrive-wb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
}

.gdrive-wb-table thead th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  z-index: 2;
  border-bottom: 1px solid #cbd5e1;
  font-size: 9.5px;
  font-weight: 700;
  color: #475569;
  padding: 5px 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.gdrive-wb-row {
  cursor: pointer;
  transition: background 0.12s ease;
  border-bottom: 1px solid #f1f5f9;
}

.gdrive-wb-row:hover {
  background: #f0fdfa;
}

.gdrive-wb-row.active {
  background: #f0fdfa;
  border-left: 3px solid #0d9488;
}

.gdrive-wb-table tbody td {
  padding: 5px 6px;
  vertical-align: middle;
  color: #334155;
}

.gdrive-wb-row-num {
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #0f172a;
  font-size: 11px;
  white-space: nowrap;
}

.gdrive-wb-row-sub {
  font-size: 9.5px;
  color: #64748b;
  white-space: nowrap;
}

.gdrive-wb-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.gdrive-wb-card-header {
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gdrive-wb-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.gdrive-wb-number {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.gdrive-wb-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 10.5px;
  color: #475569;
}

.gdrive-wb-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: #e2e8f0;
  color: #334155;
}

.gdrive-wb-badge.badge-ok {
  background: #dcfce7;
  color: #166534;
}

.gdrive-wb-badge.badge-info {
  background: #e0f2fe;
  color: #0369a1;
}

.gdrive-wb-files-list {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gdrive-mp-file-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #ffffff;
  cursor: grab;
  flex-shrink: 0;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.gdrive-mp-file-card:hover {
  border-color: #0d9488;
  background: #f8fafc;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.gdrive-mp-file-card.selected {
  border-color: #0d9488;
  background: #f0fdfa;
}

.gdrive-mp-file-card.dragging {
  opacity: 0.55;
}

.gdrive-mp-thumb {
  width: 44px;
  height: 44px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.gdrive-mp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gdrive-mp-info {
  flex: 1;
  min-width: 0;
}

.gdrive-mp-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gdrive-mp-sub {
  font-size: 10px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gdrive-mp-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.gdrive-mp-mini-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.gdrive-mp-mini-btn:hover {
  border-color: #0d9488;
  color: #0d9488;
  background: #f0fdfa;
}

.gdrive-mp-mini-btn.primary {
  background: #0d9488;
  border-color: #0f766e;
  color: #ffffff;
}

.gdrive-mp-mini-btn.primary:hover {
  background: #0f766e;
}

/* Waybill & Category Dropdown Accordions */
.gdrive-wb-card-header.clickable {
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease;
}

.gdrive-wb-card-header.clickable:hover {
  background: #f1f5f9;
}

.gdrive-wb-chevron {
  font-size: 16px;
  color: #64748b;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.gdrive-wb-card.expanded .gdrive-wb-chevron {
  transform: rotate(90deg);
  color: #0d9488;
}

.gdrive-wb-cat-list {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #f8fafc;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
}

.gdrive-wb-cat-list::-webkit-scrollbar {
  width: 5px;
}

.gdrive-wb-cat-list::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.gdrive-wb-cat-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.gdrive-wb-cat-list::-webkit-scrollbar-thumb:hover {
  background: #0d9488;
}

.gdrive-cat-group {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
}

.gdrive-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 8px;
  cursor: pointer;
  user-select: none;
  background: #ffffff;
  transition: background 0.12s ease;
}

.gdrive-cat-header:hover {
  background: #f0fdfa;
}

.gdrive-cat-left {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.gdrive-cat-chevron {
  font-size: 15px;
  color: #64748b;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.gdrive-cat-group.open .gdrive-cat-chevron {
  transform: rotate(90deg);
  color: #0d9488;
}

.gdrive-cat-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gdrive-cat-count {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  flex-shrink: 0;
}

.gdrive-cat-group.open .gdrive-cat-count {
  background: #ccfbf1;
  color: #0f766e;
}

.gdrive-cat-body {
  padding: 6px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #fcfdfe;
  max-height: 220px;
  overflow-y: auto;
  overflow-x: hidden;
}

.gdrive-cat-body::-webkit-scrollbar {
  width: 5px;
}

.gdrive-cat-body::-webkit-scrollbar-track {
  background: #f8fafc;
}

.gdrive-cat-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.gdrive-cat-body::-webkit-scrollbar-thumb:hover {
  background: #0d9488;
}

.gdrive-mp-side-pill {
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0369a1;
  margin-left: 4px;
}