/* ============================================
   HEPHIO TOOL STYLES
   Shared styles for all 25 tool pages
   ============================================ */

/* ============================================
   BODY & LAYOUT
   ============================================ */

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.tool-main {
  background: linear-gradient(180deg, #e3eaf2 0%, #d9e2ec 100%);
  padding: 2rem 1rem;
  min-height: calc(100vh - 20px);
  transition: padding-bottom 0.3s ease;
}

.tool-main.has-extra-space {
  min-height: calc(100vh - 20px);
}

.tool-container {
  max-width: 800px;
  margin: 0 auto;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.tool-page-header {
  text-align: center;
  margin-bottom: 2rem;
}

.tool-page-title {
  font-size: 2rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0;
  transition: margin-bottom 0.3s ease;
}

.tool-page-title.with-subtitle {
  margin-bottom: 0.5rem;
}

.tool-page-subtitle {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
  transition: opacity 0.3s ease, max-height 0.3s ease;
  max-height: 50px;
  opacity: 1;
}

.tool-page-subtitle.hidden {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

/* ============================================
   CARD
   ============================================ */

.tool-card {
  background: white;
  border: 1px solid #d6dee8;
  border-radius: 0.75rem;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

/* ============================================
   UPLOAD ZONE
   ============================================ */

.tool-upload-zone {
  border: 2px dashed #b8c5d6;
  border-radius: 0.5rem;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0;
  background: #fbfdff;
}

.tool-upload-zone.has-file {
  padding: 1.5rem;
  text-align: left;
  margin-bottom: 1.5rem;
}

.tool-upload-zone:hover {
  border-color: #2563eb;
  background: #eef5ff;
}

.tool-upload-zone.drag-over {
  border-color: #2563eb;
  background: #eef5ff;
}

.upload-prompt {
  color: #64748b;
}

.upload-icon {
  margin: 0 auto 1rem;
  display: block;
  width: 28px;
  height: 28px;
}

.upload-text {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #334155;
}

.upload-hint {
  font-size: 0.875rem;
  color: #64748b;
}

/* Hide upload icon when files are present to save space */
.tool-upload-zone.has-file .upload-icon {
  display: none;
}

/* Center text when files are present */
.tool-upload-zone.has-file .upload-prompt {
  text-align: center;
}

/* ============================================
   FILE PREVIEW (COMPACT)
   ============================================ */

.tool-file-preview {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.tool-file-thumb {
  width: 80px;
  height: 80px;
  border-radius: 0.5rem;
  overflow: hidden;
  flex-shrink: 0;
  background: #eef3f8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-file-thumb-icon {
  width: 32px;
  height: 32px;
  color: #94a3b8;
}

.tool-file-info {
  flex: 1;
  min-width: 0;
}

.tool-file-name {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-file-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.tool-file-meta-label {
  color: #64748b;
}

.tool-file-meta-value {
  font-weight: 500;
  color: #334155;
}

.tool-choose-different {
  font-size: 0.8125rem;
  color: #2563eb;
  text-decoration: none;
  font-weight: 500;
}

.tool-choose-different:hover {
  text-decoration: underline;
}

/* ============================================
   SETTINGS SECTION
   ============================================ */

.tool-settings {
  margin-top: 1.5rem;
}

.tool-form-group {
  margin-bottom: 1.5rem;
}

.tool-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #334155;
}

.tool-form-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #bcc9d8;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #334155;
  background: white;
}

.tool-form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

.tool-form-input:disabled {
  background: #f3f6fa;
  color: #94a3b8;
  cursor: not-allowed;
}

.tool-form-select {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #bcc9d8;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #334155;
  background: white;
}

.tool-form-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

/* ============================================
   SLIDER / RANGE INPUT
   ============================================ */

.tool-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.tool-slider-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin: 0;
}

.tool-slider-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #2563eb;
}

.tool-slider {
  width: 100%;
  accent-color: #2563eb;
  margin-bottom: 0.25rem;
}

.tool-slider-hint {
  font-size: 0.75rem;
  color: #64748b;
}

/* ============================================
   BUTTONS
   ============================================ */

.tool-btn-primary {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 1rem;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.20);
}

.tool-btn-primary:hover {
  background: #1d4ed8;
}

.tool-btn-primary:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

/* Button Stack - for vertically stacked buttons */
.tool-button-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.tool-button-stack .tool-btn-primary,
.tool-button-stack .tool-btn-secondary {
  margin-bottom: 0;
}

/* ============================================
   RESULT SECTION
   ============================================ */

.tool-result-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #d6dee8;
}

.tool-result-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin: 0 0 1rem 0;
}

/* ============================================
   NOTES & METADATA
   ============================================ */

.tool-metadata-note {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

/* ============================================
   METADATA DISPLAY (for metadata viewer tool)
   ============================================ */

.tool-metadata-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.tool-metadata-section {
  background: white;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.tool-section-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin: 0 0 1rem 0;
}

.tool-info-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-meta-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid #edf2f7;
}

.tool-meta-row:last-child {
  border-bottom: none;
}

.tool-meta-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
}

.tool-meta-value {
  font-size: 0.875rem;
  color: #0f172a;
  word-break: break-word;
}

.tool-info-empty {
  font-size: 0.875rem;
  color: #94a3b8;
  text-align: center;
  padding: 1rem 0;
  margin: 0;
}

.tool-status-message {
  font-size: 0.875rem;
  color: #64748b;
  margin: 1rem 0;
  text-align: center;
}

.tool-status-message.error {
  color: #dc2626;
}

.tool-action-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.tool-action-group .tool-btn-primary,
.tool-action-group .tool-btn-secondary {
  flex: 1;
  margin-bottom: 0;
  height: 2.75rem;
  padding: 0.5rem 1rem;
}

.tool-btn-secondary.full-width {
  width: 100%;
  height: auto;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ============================================
   PDF MERGE LIST (for merge PDF tool)
   ============================================ */

.pdf-merge-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pdf-merge-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.pdf-merge-item:hover {
  background: #edf3f8;
}

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

.pdf-merge-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-merge-item-meta {
  font-size: 0.75rem;
  color: #64748b;
}

.pdf-merge-item-controls {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
  align-items: center;
}

.tool-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #bcc9d8;
  border-radius: 0.375rem;
  background: white;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  font-weight: 600;
}

.tool-btn-icon:hover:not(:disabled) {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.tool-btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tool-alert-warning {
  background: #fffbeb;
  border: 1px solid #f4d48a;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  color: #78350f;
  font-size: 0.875rem;
  line-height: 1.5;
}

.tool-alert-info {
  background: #eff6ff;
  border: 1px solid #bfd4f5;
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  color: #1e40af;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
}

/* Status messages */
.tool-status-info {
  font-size: 0.875rem;
  color: #2563eb;
  text-align: center;
}

.tool-status-success {
  font-size: 0.875rem;
  color: #16a34a;
  text-align: center;
  font-weight: 500;
}

.tool-status-error {
  font-size: 0.875rem;
  color: #dc2626;
  text-align: center;
  font-weight: 500;
}

/* Periodic Table Icon (for file bar) */
.tool-file-icon-pt {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fff7ed 0%, #fed7aa 100%);
  border: 2px solid #f97316;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(249, 115, 22, 0.12);
}

.tool-file-icon-pt .pt-symbol {
  font-weight: 700;
  font-size: 16px;
  color: #ea580c;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
  display: none !important;
}

/* ============================================
   TWO-COLUMN WORKSPACE LAYOUT (for crop/rotate etc.)
   ============================================ */

.tool-container-wide {
  max-width: 1200px;
}

.tool-file-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.tool-file-bar-left {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
}

.tool-file-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  border: 1px solid #d6dee8;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 1.25rem;
}

.tool-file-bar .tool-file-info {
  min-width: 0;
}

.tool-file-bar .tool-file-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 52vw;
  margin: 0 0 0.25rem 0;
}

.tool-file-bar .tool-file-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
}

.tool-btn-ghost {
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s;
}

.tool-btn-ghost:hover {
  background: #edf3f8;
}

/* Small ghost buttons for utility actions */
.tool-btn-ghost-small {
  padding: 0.375rem 0.75rem;
  background: white;
  border: 1px solid #bcc9d8;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tool-btn-ghost-small:hover:not(:disabled) {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #334155;
}

.tool-btn-ghost-small:active:not(:disabled) {
  background: #f1f5f9;
  border-color: #64748b;
}

.tool-btn-ghost-small:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tool-workspace-two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1rem;
  align-items: start;
}

.tool-workspace-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tool-workspace-main {
  min-height: 380px;
  padding: 1rem;
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.tool-workspace-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tool-sidebar-card {
  background: #fff;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  padding: 1rem 0.75rem 0.75rem 0.75rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.tool-sidebar-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin: 0 0 1rem 0;
}

/* Button groups for sidebar */
.tool-btn-group-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.tool-btn-secondary {
  height: 2rem;
  padding: 0.5rem 0.75rem;
  background: #f3f6fa;
  color: #0f172a;
  border: 1px solid #bcc9d8;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tool-btn-secondary:hover {
  background: #e7edf5;
}

.tool-btn-secondary-small {
  height: 2rem;
  padding: 0.5rem 0.75rem;
  background: #f3f6fa;
  color: #0f172a;
  border: 1px solid #bcc9d8;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tool-btn-secondary-small:hover {
  background: #e7edf5;
}

.tool-btn-outline-small {
  height: 2rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid #bcc9d8;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s;
}

.tool-btn-outline-small:hover {
  background: #f8fafc;
}

/* Small form inputs for sidebar */
.tool-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* Checkbox and radio labels */
.tool-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 400;
  color: #334155;
  line-height: 1.5;
}

.tool-checkbox-label input[type="checkbox"],
.tool-checkbox-label input[type="radio"] {
  margin-top: 0.125rem;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: #2563eb;
}

.tool-checkbox-label span {
  flex: 1;
}

.tool-form-label-small {
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  display: block;
  color: #334155;
}

.tool-form-input-small {
  height: 2rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.75rem;
  border: 1px solid #bcc9d8;
  border-radius: 0.25rem;
  width: 100%;
  box-sizing: border-box;
  background: #fff;
}

.tool-form-input-small:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

/* ============================================
   CROP & ROTATE SPECIFIC STYLES
   ============================================ */

.crop-canvas-wrapper {
  position: relative;
  display: inline-block;
}

.crop-canvas {
  max-width: 650px;
  max-height: 380px;
  display: block;
  border-radius: 6px;
}

.crop-overlay {
  border: 2px solid #2563eb;
  background: rgba(37, 99, 235, 0.1);
  cursor: move;
  position: absolute;
  box-sizing: border-box;
}

.crop-badge {
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}

.crop-handle {
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid #2563eb;
  border-radius: 0.125rem;
  position: absolute;
  box-sizing: border-box;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .tool-main {
    padding: 1.5rem 1rem;
  }

  .tool-card {
    padding: 1.5rem;
  }

  .tool-page-title {
    font-size: 1.5rem;
  }

  .tool-upload-zone {
    padding: 2rem 1rem;
  }

  .tool-upload-zone.has-file {
    padding: 1rem;
  }

  .tool-file-preview {
    flex-direction: column;
    align-items: flex-start;
  }

  .tool-file-thumb {
    width: 100%;
    height: 120px;
  }

  .tool-file-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .tool-workspace-two-col {
    grid-template-columns: 1fr;
  }

  .tool-file-bar .tool-file-name {
    max-width: 60vw;
  }
}

/* ============================================
   TEXT PASTE SECTION
   ============================================ */

.tool-divider {
  text-align: center;
  position: relative;
  margin: 1.5rem 0;
}

.tool-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #d6dee8;
}

.tool-divider span {
  position: relative;
  background: white;
  padding: 0 1rem;
  font-size: 0.875rem;
  color: #94a3b8;
  font-weight: 500;
}

.tool-paste-section {
  margin-bottom: 0;
}

.tool-paste-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #bcc9d8;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #334155;
  background: white;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 0.75rem;
  transition: all 0.2s;
  box-sizing: border-box;
}

.tool-paste-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

.tool-paste-input::placeholder {
  color: #94a3b8;
}

.tool-paste-section .tool-btn-primary {
  margin-bottom: 0;
}

/* ============================================
   TEXT TWO-PANE WORKSPACE (Change Case etc.)
   ============================================ */

.tool-text-workspace {
  margin-top: 1.5rem;
}

.tool-workspace-note {
  margin-top: 1rem;
}

.tool-case-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tool-text-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.tool-text-pane {
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  background: #f5f8fb;
  padding: 0.75rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.tool-text-pane-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.tool-text-pane-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
}

.tool-text-pane-meta {
  font-size: 0.75rem;
  color: #64748b;
}

.tool-textarea {
  width: 100%;
  min-height: 260px;
  max-height: 420px;
  overflow: auto;
  resize: vertical;
  padding: 0.75rem;
  border: 1px solid #bcc9d8;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #334155;
  background: white;
  font-family: inherit;
  box-sizing: border-box;
  transition: all 0.2s;
}

.tool-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

.tool-textarea[readonly] {
  background: #ffffff;
}

/* Actions row under both panes */
.tool-action-row {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.tool-action-row .tool-btn-primary,
.tool-action-row .tool-btn-secondary {
  margin-bottom: 0;
  width: 100%;
}

.tool-btn-ghost-small.is-active {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
  background: #eff6ff;
  color: #1e40af;
}

@media (max-width: 768px) {
  .tool-text-panes {
    grid-template-columns: 1fr;
  }

  .tool-action-row {
    grid-template-columns: 1fr;
  }

  .tool-textarea {
    min-height: 220px;
    max-height: 360px;
  }
}

/* ============================================
   STATS GRID + MINI COUNTER (Text Counter)
   ============================================ */

.tool-stats-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.tool-stats-column {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tool-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid #dfe7f0;
}

.tool-stat-row:last-child {
  border-bottom: none;
}

.tool-stat-row-label {
  font-size: 0.8125rem;
  color: #64748b;
  font-weight: 500;
}

.tool-stat-row-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  text-align: right;
}

.tool-text-mini-counter {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.25rem;
  text-align: right;
}

.tool-action-row.tool-action-row-2 {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.tool-action-row.tool-action-row-2 .tool-btn-primary,
.tool-action-row.tool-action-row-2 .tool-btn-secondary {
  margin-bottom: 0;
  width: 100%;
}

@media (max-width: 768px) {
  .tool-stats-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tool-action-row.tool-action-row-2 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   JSON TOOL - ERROR MESSAGE STYLING
   ============================================ */

.tool-status-message.error {
  color: #dc2626;
  font-weight: 500;
}

/* ============================================
   EXTRACT FROM TEXT - TOOL ADDITIONS
   ============================================ */

.tool-extract-controls {
  margin-top: 1rem;
}

.tool-extract-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.tool-extract-meta {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}

.tool-result-panel {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #d6dee8;
}

.tool-result-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.tool-result-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #334155;
}

.tool-result-sub {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: #64748b;
}

.tool-result-meta {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
}

.tool-extract-controls .tool-btn-ghost-small {
  background: #eef5ff;
  border-color: #bfd4f5;
  color: #1e293b;
}

.tool-extract-controls .tool-btn-ghost-small:hover:not(:disabled) {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #0f172a;
}

.tool-extract-controls .tool-btn-ghost-small:active:not(:disabled) {
  background: #bfdbfe;
  border-color: #60a5fa;
  color: #0f172a;
}

.tool-action-row.tool-action-row-3 {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.tool-action-row.tool-action-row-3 .tool-btn-primary,
.tool-action-row.tool-action-row-3 .tool-btn-secondary {
  margin-bottom: 0;
  width: 100%;
  height: 2.75rem;
  padding: 0.5rem 1rem;
}

@media (max-width: 768px) {
  .tool-extract-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .tool-action-row.tool-action-row-3 {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   PASSWORD GENERATOR - TOOL ADDITIONS
   ============================================ */

.tool-strength {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.tool-strength-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.tool-strength-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
}

.tool-strength-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
}

.tool-strength-bars {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.35rem;
}

.tool-strength-bar {
  height: 8px;
  border-radius: 999px;
  background: #dfe7f0;
}

.tool-strength-bars.weak .tool-strength-bar.filled {
  background: #dc2626;
}

.tool-strength-bars.ok .tool-strength-bar.filled {
  background: #f59e0b;
}

.tool-strength-bars.strong .tool-strength-bar.filled {
  background: #16a34a;
}

.tool-password-list {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-password-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.tool-password-value {
  flex: 1;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #bcc9d8;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #0f172a;
  background: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.tool-password-value:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb;
}

.tool-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

/* ============================================
   SORT LINES - TOOL ADDITIONS
   ============================================ */

.tool-sort-options {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #d6dee8;
}

.tool-sort-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.tool-sort-card {
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

@media (min-width: 900px) {
  .tool-sort-grid {
    grid-template-columns: 1.2fr 1.2fr 0.9fr;
    align-items: start;
  }
}

/* ============================================
   COMPARE TEXT - TOOL ADDITIONS
   ============================================ */

.tool-compare-controls {
  margin-bottom: 1.25rem;
}

.tool-compare-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.tool-diff-summary {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.875rem 1rem;
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.tool-diff-summary-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #334155;
}

.tool-diff-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.tool-diff-dot-add {
  background: #16a34a;
}

.tool-diff-dot-remove {
  background: #dc2626;
}

.tool-diff-dot-change {
  background: #f59e0b;
}

.tool-diff-panel {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #d6dee8;
}

.tool-diff-output {
  margin-top: 0.75rem;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  background: #ffffff;
  overflow: auto;
  max-height: 520px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8125rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.tool-diff-line {
  display: grid;
  grid-template-columns: 20px 48px 48px 1fr;
  gap: 0.5rem;
  padding: 0.5rem;
  font-size: 0.75rem;
}

.tool-diff-line:last-child {
  border-bottom: none;
}

.tool-diff-line-equal {
  background: #ffffff;
}

.tool-diff-line-add {
  background: #f0fdf4;
}

.tool-diff-line-remove {
  background: #fef2f2;
}

.tool-diff-gutter {
  font-weight: 700;
  color: #64748b;
}

.tool-diff-line-add .tool-diff-gutter {
  color: #16a34a;
}

.tool-diff-line-remove .tool-diff-gutter {
  color: #dc2626;
}

.tool-diff-line-num {
  color: #94a3b8;
  white-space: nowrap;
}

.tool-diff-line-text {
  color: #0f172a;
  white-space: pre-wrap;
  word-break: break-word;
}

.tool-diff-word-add {
  background: #bbf7d0;
  color: #14532d;
  padding: 0 0.125rem;
  border-radius: 0.1875rem;
}

.tool-diff-word-del {
  background: #fecaca;
  color: #7f1d1d;
  padding: 0 0.125rem;
  border-radius: 0.1875rem;
}

.tool-diff-empty {
  padding: 1rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .tool-password-row {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .tool-compare-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .tool-diff-line {
    grid-template-columns: 20px 48px 48px 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
    font-size: 0.75rem;
  }
}

/* ============================================
   IMAGES TO PDF - TOOL ADDITIONS
   ============================================ */

.image-pdf-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.image-pdf-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  transition: all 0.2s;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.image-pdf-item:hover {
  background: #edf3f8;
}

.image-pdf-item-left {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
  flex: 1;
}

.image-pdf-thumb-wrap {
  width: 64px;
  height: 64px;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #e2e8f0;
  flex-shrink: 0;
  border: 1px solid #cbd5e1;
}

.image-pdf-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.image-pdf-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-pdf-item-meta {
  font-size: 0.75rem;
  color: #64748b;
}

.image-pdf-item-controls {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .image-pdf-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .image-pdf-item-controls {
    width: 100%;
  }
}

/* ============================================
   BASE64 ENCODE / DECODE - TOOL ADDITIONS
   ============================================ */

.tool-file-icon-b64 {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-file-icon-b64 .b64-symbol {
  font-weight: 700;
  font-size: 18px;
  color: #1d4ed8;
  line-height: 1;
}

.tool-base64-input,
.tool-base64-output {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.tool-base64-output {
  word-break: break-all;
}

/* ============================================
   FILE HASH GENERATOR - TOOL ADDITIONS
   ============================================ */

.tool-file-icon-hash {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border: 2px solid #7c3aed;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-file-icon-hash .hash-symbol {
  font-weight: 700;
  font-size: 22px;
  color: #6d28d9;
  line-height: 1;
}

.tool-hash-input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.tool-hash-grid {
  margin-bottom: 1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.tool-hash-algo-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  min-height: 5rem;
}

.tool-hash-algo-card .tool-form-label {
  margin-bottom: 0;
  white-space: nowrap;
}

.tool-hash-algo-card .tool-form-select {
  flex: 1;
  min-width: 0;
}

.tool-hash-all-card {
  padding: 1rem;
  min-height: 5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tool-hash-hint {
  margin-top: 0.5rem;
}

.tool-action-row.tool-action-row-hash {
  grid-template-columns: 1fr 1fr;
}

.tool-action-row.tool-action-row-hash .tool-btn-primary,
.tool-action-row.tool-action-row-hash .tool-btn-secondary {
  height: 2.75rem;
  padding: 0.5rem 1rem;
  margin-bottom: 0;
}

.tool-progress-wrap {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.tool-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.tool-progress-label,
.tool-progress-percent {
  font-size: 0.8125rem;
  color: #475569;
  font-weight: 600;
}

.tool-progress-track {
  width: 100%;
  height: 10px;
  background: #dfe7f0;
  border-radius: 999px;
  overflow: hidden;
}

.tool-progress-bar {
  width: 0%;
  height: 100%;
  background: #2563eb;
  border-radius: 999px;
  transition: width 0.15s ease;
}

.tool-hash-results {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-hash-result-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  background: #f5f8fb;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.tool-hash-result-main {
  flex: 1;
  min-width: 0;
}

.tool-hash-result-algorithm {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
}

.tool-hash-result-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8125rem;
  color: #0f172a;
  word-break: break-all;
  line-height: 1.5;
}

.tool-hash-result-actions {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .tool-action-row.tool-action-row-hash {
    grid-template-columns: 1fr;
  }

  .tool-hash-grid {
    grid-template-columns: 1fr;
  }

  .tool-hash-result-row {
    flex-direction: column;
  }

  .tool-hash-result-actions {
    width: 100%;
  }
}

/* ============================================
   QR CODE GENERATOR - TOOL ADDITIONS
   ============================================ */

.tool-qr-workspace {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.25rem;
  align-items: stretch;
}

.tool-qr-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.tool-qr-bottom {
  margin-top: auto;
}

.tool-qr-preview-panel {
  border: 1px solid #d6dee8;
  border-radius: 0.75rem;
  background: #f5f8fb;
  padding: 1rem;
  width: 360px;
  height: 360px;
  box-sizing: border-box;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.tool-qr-input {
  min-height: 130px;
  max-height: 200px;
}

.tool-qr-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.tool-qr-control-card {
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.tool-qr-control-card .tool-form-label {
  margin-bottom: 0.5rem;
}

.tool-qr-preview-wrap {
  min-height: 260px;
  height: calc(100% - 2rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  margin-top: 0.75rem;
  box-sizing: border-box;
}

.tool-qr-preview-empty {
  font-size: 0.9375rem;
  color: #64748b;
  text-align: center;
  max-width: 260px;
  line-height: 1.6;
}

.tool-qr-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.tool-qr-preview canvas,
.tool-qr-preview svg {
  max-width: 100%;
  max-height: 100%;
  height: auto;
  display: block;
  background: #ffffff;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.tool-action-row.tool-action-row-qr {
  margin-top: 0;
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.8fr;
  gap: 0.75rem;
}

.tool-action-row.tool-action-row-qr .tool-btn-primary,
.tool-action-row.tool-action-row-qr .tool-btn-secondary {
  width: 100%;
  margin-bottom: 0;
  height: 2.75rem;
  padding: 0.5rem 1rem;
}

.tool-qr-bottom .tool-status-message {
  margin: 0.75rem 0;
}

.tool-qr-bottom .tool-metadata-note {
  margin: 0;
}

@media (max-width: 980px) {
  .tool-qr-workspace {
    grid-template-columns: 1fr;
  }

  .tool-qr-preview-panel {
    width: 100%;
    height: auto;
    min-height: 320px;
  }

  .tool-qr-bottom {
    margin-top: 0;
  }
}

@media (max-width: 768px) {
  .tool-qr-input {
    min-height: 120px;
  }

  .tool-qr-controls {
    grid-template-columns: 1fr;
  }

  .tool-qr-preview-panel {
    min-height: 280px;
  }

  .tool-qr-preview-wrap {
    min-height: 220px;
    height: auto;
    padding: 1rem;
  }

  .tool-action-row.tool-action-row-qr {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   URL ENCODER / DECODER - TOOL ADDITIONS
   ============================================ */

.tool-url-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  padding: 0 1rem;
}

.tool-url-textarea {
  min-height: 240px;
}

.tool-action-row.tool-action-row-url {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.tool-action-row.tool-action-row-url .tool-btn-secondary {
  width: 100%;
}

@media (max-width: 768px) {
  .tool-action-row.tool-action-row-url {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   UUID GENERATOR - TOOL ADDITIONS
   ============================================ */

.tool-uuid-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
}

.tool-uuid-control-card {
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.tool-uuid-hint {
  margin: 0.5rem 0 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.tool-uuid-generate-wrap .tool-btn-primary {
  margin-bottom: 0;
  min-width: 220px;
}

.tool-uuid-empty {
  padding: 1rem;
  color: #64748b;
  border: 1px dashed #bcc9d8;
  border-radius: 0.5rem;
  background: #f5f8fb;
}

.tool-uuid-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-uuid-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  background: #f5f8fb;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.tool-uuid-main {
  flex: 1;
  min-width: 0;
}

.tool-uuid-index {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.tool-uuid-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875rem;
  color: #0f172a;
  line-height: 1.6;
  word-break: break-all;
}

.tool-uuid-actions {
  flex-shrink: 0;
}

.tool-action-row.tool-action-row-uuid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.tool-action-row.tool-action-row-uuid .tool-btn-secondary {
  width: 100%;
  margin-bottom: 0;
}

@media (max-width: 768px) {
  .tool-uuid-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .tool-uuid-generate-wrap .tool-btn-primary {
    min-width: 0;
    width: 100%;
  }

  .tool-uuid-row {
    flex-direction: column;
  }

  .tool-uuid-actions {
    width: 100%;
  }

  .tool-action-row.tool-action-row-uuid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   BATCH RENAME - TOOL ADDITIONS
   ============================================ */

.tool-file-icon-batch {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
  border: 2px solid #0891b2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tool-file-icon-batch .batch-symbol {
  font-weight: 700;
  font-size: 16px;
  color: #0e7490;
  line-height: 1;
}

.tool-batch-workspace {
  margin-top: 1.5rem;
}

.tool-batch-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1rem;
  align-items: start;
}

.tool-batch-card {
  background: #fff;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.tool-batch-numbering-card,
.tool-batch-output-card {
  margin-top: 1rem;
  padding: 1rem;
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.tool-batch-numbering-grid {
  margin-top: 0.75rem;
}

.tool-batch-radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tool-batch-hint {
  margin: 0.75rem 0 0 0;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.5;
}

.tool-batch-preview-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.tool-batch-preview-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.875rem 1rem;
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.tool-batch-preview-original,
.tool-batch-preview-renamed {
  min-width: 0;
  word-break: break-word;
  font-size: 0.875rem;
  line-height: 1.5;
}

.tool-batch-preview-original {
  color: #475569;
}

.tool-batch-preview-renamed {
  color: #0f172a;
  font-weight: 600;
}

.tool-batch-preview-arrow {
  color: #94a3b8;
  font-weight: 700;
}

.tool-batch-note {
  margin-top: 1rem;
}

@media (max-width: 980px) {
  .tool-batch-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tool-batch-preview-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .tool-batch-preview-arrow {
    display: none;
  }
}

/* ============================================
   OSS Licenses ADDITIONS
   ============================================ */

.tool-oss-item {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tool-oss-item:last-child {
  border-bottom: none;
}

/* ============================================
   LEGAL / POLICY PAGES
   ============================================ */

.tool-legal-content {
  color: #334155;
  line-height: 1.7;
}

.tool-legal-content p {
  margin: 0 0 1rem 0;
}

.tool-legal-content ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
}

.tool-legal-content li {
  margin-bottom: 0.5rem;
}

.tool-legal-content .tool-section-heading {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

/* ============================================
   IMAGE CONVERT - TOOL ADDITIONS
   ============================================ */

.tool-convert-thumb {
  width: 88px;
  height: 88px;
  border-radius: 0.875rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.tool-convert-file-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
}

.tool-convert-file-meta {
  gap: 2.5rem;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.tool-convert-choose-different {
  font-weight: 600;
}

.tool-form-select:disabled {
  background: #f1f5f9;
  cursor: not-allowed;
}

/* ============================================
   IMAGE INFO - TOOL ADDITIONS
   ============================================ */

.tool-image-info-file-meta {
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.tool-image-info-file-meta .tool-file-meta-label,
.tool-image-info-file-meta .tool-file-meta-value {
  font-weight: 600;
  color: #0f172a;
}

.tool-image-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.tool-image-info-section {
  background: #f5f8fb;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  padding: 1.25rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.tool-image-info-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.tool-image-info-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid #dfe7f0;
}

.tool-image-info-row:last-child {
  border-bottom: none;
}

.tool-image-info-label {
  font-size: 0.875rem;
  color: #64748b;
}

.tool-image-info-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  text-align: right;
}

@media (max-width: 768px) {
  .tool-image-info-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ============================================
   CROP & ROTATE - TOOL-SPECIFIC LAYOUT POLISH
   ============================================ */

.crop-tool-workspace {
  margin-top: 0.25rem;
}

.crop-tool-two-col {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 1rem;
  align-items: start;
}

.crop-tool-left {
  gap: 0.875rem;
  min-width: 0;
}

.crop-tool-file-bar {
  min-height: 88px;
}

.crop-tool-preview-panel {
  height: 432px;
  min-height: 432px;
  padding: 1rem;
  align-items: center;
  justify-content: center;
}

.crop-canvas-wrap {
  position: relative;
  display: inline-block;
}

.crop-tool-sidebar {
  min-width: 0;
}

.crop-tool-control-rail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.crop-tool-sidebar-card {
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.crop-tool-inline-actions {
  margin-top: 0.75rem;
}

.crop-tool-quality-wrap {
  margin-top: 0.875rem;
}

.crop-tool-quality-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.crop-tool-quality-label {
  margin: 0;
  font-size: 0.875rem;
}

.crop-tool-quality-value {
  color: #2563eb;
  font-weight: 600;
  font-size: 0.9375rem;
}

.crop-tool-quality-hint {
  margin-top: 0.375rem;
}

.crop-tool-action-block {
  margin-top: 0.5rem;
  padding-top: 0;
}

.crop-tool-download-btn {
  margin-bottom: 0;
}

.crop-tool-status {
  min-height: 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 980px) {
  .crop-tool-two-col {
    grid-template-columns: 1fr;
  }

  .crop-tool-preview-panel {
    height: 400px;
    min-height: 400px;
  }
}

@media (max-width: 768px) {
  .crop-tool-file-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.875rem;
  }

  .crop-tool-preview-panel {
    height: auto;
    min-height: 340px;
    padding: 0.875rem;
  }

  .crop-tool-inline-actions {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   IMAGE METADATA - PREVIEW ADDITIONS
   ============================================ */

.tool-metadata-preview-wrap {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 0.5rem;
  overflow: hidden;
}

.tool-metadata-preview-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 1px solid #d6dee8;
  border-radius: 0.5rem;
  background: #fff;
}

/* ============================================
   BATCH RENAME - SUMMARY ACTIONS
   ============================================ */

.tool-batch-summary-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

/* ============================================
   BATCH RENAME - PREVIEW ROW ACTIONS
   ============================================ */

.tool-batch-preview-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
}

.tool-batch-preview-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.tool-batch-remove-btn {
  width: 34px;
  height: 34px;
  font-size: 1.25rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .tool-batch-summary-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .tool-batch-preview-row {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .tool-batch-preview-arrow {
    display: none;
  }

  .tool-batch-preview-renamed {
    grid-column: 1 / 2;
  }

  .tool-batch-preview-actions {
    grid-column: 2 / 3;
    grid-row: 1 / 3;
    align-self: start;
  }
}