/* ============================================
   CultureMonkey SFTP Admin - Custom Styles
   Based on mockup designs
   ============================================ */

/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ============================================
   Hide AdminJS Welcome Box on Login Page
   ============================================ */
/* Hide the AdminJS welcome section on login page */
section.adminjs_Box[color="white"],
.adminjs_Box.hZzKCo,
section[class*="hZzKCo"],
section[class*="adminjs_Box"][color="white"] {
  display: none !important;
}

/* Target the welcome box more specifically */
[data-testid="login-illustration"],
.login-illustration,
section[class*="adminjs_Box"]:has(h2:contains("Welcome")) {
  display: none !important;
}

/* Hide the left panel containing welcome text */
body form[action*="login"] ~ section,
body [class*="styled__StyledBox"] > section.adminjs_Box:first-of-type {
  display: none !important;
}

/* ============================================
   Login Page - Centered Form with Branding
   ============================================ */
/* Center the login form container */
form[action="/admin/login"],
form[action*="/login"] {
  max-width: 420px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 40px !important;
  background: white !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Hide the default AdminJS logo heading */
form[action="/admin/login"] h5,
form[action*="/login"] h5 {
  display: none !important;
}

/* Add logo and branding before the form */
form[action="/admin/login"]::before,
form[action*="/login"]::before {
  content: "" !important;
  display: block !important;
  width: 56px !important;
  height: 56px !important;
  background-image: url('/culturemonkey.png') !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  margin: 0 auto 12px auto !important;
  border-radius: 12px !important;
}

/* Add branding text below the logo */
form[action="/admin/login"]::after,
form[action*="/login"]::after {
  content: "CultureMonkey File Dropper" !important;
  display: block !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #1a1a2e !important;
  text-align: center !important;
  order: -1 !important;
  margin-bottom: 24px !important;
}

/* Style the login button */
form[action="/admin/login"] button[type="submit"],
form[action*="/login"] button[type="submit"] {
  width: 100% !important;
  padding: 14px !important;
  background: #3b82f6 !important;
  border: none !important;
  border-radius: 8px !important;
  color: white !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
  margin-top: 8px !important;
}

form[action="/admin/login"] button[type="submit"]:hover,
form[action*="/login"] button[type="submit"]:hover {
  background: #2563eb !important;
}

/* Style form inputs */
form[action="/admin/login"] input,
form[action*="/login"] input {
  width: 100% !important;
  padding: 12px 16px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  transition: border-color 0.2s !important;
}

form[action="/admin/login"] input:focus,
form[action*="/login"] input:focus {
  border-color: #3b82f6 !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Style form labels */
form[action="/admin/login"] label,
form[action*="/login"] label {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #374151 !important;
  margin-bottom: 6px !important;
}

/* ============================================
   Global Styles & Resets
   ============================================ */
* {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  box-sizing: border-box;
}

body {
  background-color: #f5f7fa !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  padding: 0;
}

/* ============================================
   Navbar Branding - Logo and Title
   ============================================ */
/* Style the navbar container */
nav, 
[data-css="navbar"],
header nav {
  background: #ffffff !important;
  border-bottom: 1px solid #e5e7eb !important;
  padding: 0 24px !important;
  height: 60px !important;
  display: flex !important;
  align-items: center !important;
}

/* Logo link styling - the main branding container */
nav a[href="/"],
header a[href="/"],
.adminjs_Box[href="/"] {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  text-decoration: none !important;
  color: #1a1a2e !important;
  padding: 8px 0 !important;
}

/* Logo image - sized for navbar with rounded corners */
nav a[href="/"] img,
header a[href="/"] img,
.adminjs_Box[href="/"] img {
  height: 32px !important;
  width: 32px !important;
  min-height: 32px !important;
  min-width: 32px !important;
  max-height: 32px !important;
  max-width: 32px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}

/* Hide the company name text since we're using custom title */
nav a[href="/"] > span,
header a[href="/"] > span,
.adminjs_Box[href="/"] > span {
  display: none !important;
}

/* Add "File Dropper" title next to logo */
nav a[href="/"]::after,
header a[href="/"]::after,
.adminjs_Box[href="/"]::after {
  content: "File Dropper";
  font-family: Inter, serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
  letter-spacing: -0.3px !important;
  white-space: nowrap !important;
}

/* ============================================
   Hide AdminJS Default Elements
   ============================================ */
[data-css="sidebar"],
aside[data-css="sidebar"] {
  display: none !important;
  width: 0 !important;
}

/* ============================================
   Layout Adjustments
   ============================================ */
[data-css="app"],
[data-css="app-content"] {
  margin-left: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

[data-css="logged-in"] {
  padding: 0 !important;
}

.adminjs_Box {
  max-width: 100% !important;
  width: 100% !important;
}

/* ============================================
   Dashboard Container
   ============================================ */
.dashboard-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 48px;
  background: #f5f7fa;
  min-height: calc(100vh - 60px);
}

.dashboard-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

/* ============================================
   Dashboard Header
   ============================================ */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.dashboard-header-left {
  flex: 1;
}

.dashboard-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 8px 0;
}

.dashboard-subtitle {
  font-size: 15px;
  color: #6b7280;
  margin: 0;
}

.dashboard-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 16px;
  min-width: 280px;
  gap: 10px;
}

.search-box svg {
  color: #9ca3af;
}

.search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  width: 100%;
  color: #374151;
}

.search-input::placeholder {
  color: #9ca3af;
}

.btn-new-customer {
  background: #3b82f6;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-new-customer:hover {
  background: #2563eb;
}

.btn-user-management {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: #374151;
  border: 1px solid #e5e7eb;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-user-management:hover {
  border-color: #3b82f6;
  color: #3b82f6;
  background: #f0f7ff;
}

/* Green prominent User Management button */
.btn-user-management-green {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #10b981;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-user-management-green:hover {
  background: #059669;
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* ============================================
   Dashboard Filters
   ============================================ */
.dashboard-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-btn {
  padding: 10px 20px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.filter-btn.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

/* ============================================
   Dashboard Table
   ============================================ */
.dashboard-table-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table th {
  text-align: left;
  padding: 16px 24px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e5e7eb;
  background: #fafbfc;
}

.dashboard-table td {
  padding: 20px 24px;
  font-size: 14px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.dashboard-table tbody tr:last-child td {
  border-bottom: none;
}

.dashboard-table .clickable-row {
  cursor: pointer;
  transition: background 0.15s;
}

.dashboard-table .clickable-row:hover {
  background: #f9fafb;
}

.customer-name-cell .customer-name {
  font-weight: 500;
  color: #1f2937;
}

.files-cell .file-count {
  font-weight: 500;
  color: #374151;
}

.date-cell .upload-date {
  color: #6b7280;
}

.status-cell .status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.status-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-badge.active {
  background: #dcfce7;
  color: #166534;
}

.status-badge.active .status-dot {
  background: #22c55e;
}

.status-badge.inactive {
  background: #f3f4f6;
  color: #4b5563;
}

.status-badge.inactive .status-dot {
  background: #9ca3af;
}

.action-cell .edit-btn {
  background: #f3f4f6;
  border: none;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
}

.action-cell .edit-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

/* ============================================
   Dashboard Pagination
   ============================================ */
.dashboard-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid #f3f4f6;
}

.pagination-info {
  font-size: 14px;
  color: #6b7280;
}

.pagination-buttons {
  display: flex;
  gap: 8px;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
  border-color: #3b82f6;
  color: #3b82f6;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}

.empty-state svg {
  color: #d1d5db;
}

/* ============================================
   View Customer Page
   ============================================ */
.view-customer-container {
  width: 100%;
  min-height: calc(100vh - 60px);
  background: #f5f7fa;
}

.view-nav-bar {
  background: white;
  padding: 16px 48px;
  border-bottom: 1px solid #e5e7eb;
}

.nav-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.nav-link {
  color: #3b82f6;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.nav-separator {
  color: #9ca3af;
}

.nav-current {
  color: #6b7280;
}

.customer-header-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  margin: 24px 48px;
  padding: 24px 32px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.customer-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.customer-avatar {
  width: 56px;
  height: 56px;
  background: #f3f4f6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
}

.customer-info .customer-name-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.customer-info .customer-name {
  font-size: 22px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.customer-info .customer-id {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.status-badge-lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.status-badge-lg.active {
  background: #dcfce7;
  color: #166534;
}

.status-badge-lg.active .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.status-badge-lg.inactive {
  background: #f3f4f6;
  color: #4b5563;
}

.status-badge-lg.inactive .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
}

.btn-edit-customer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-edit-customer:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

/* ============================================
   Files Section
   ============================================ */
.files-section {
  background: white;
  margin: 0 48px 48px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.files-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.files-search {
  display: flex;
  align-items: center;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 14px;
  min-width: 260px;
  gap: 8px;
}

.files-search svg {
  color: #9ca3af;
}

.files-loading,
.files-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  text-align: center;
}

.files-empty svg {
  color: #d1d5db;
}

.files-table {
  width: 100%;
  border-collapse: collapse;
}

.files-table th {
  text-align: left;
  padding: 14px 24px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #fafbfc;
  border-bottom: 1px solid #e5e7eb;
}

.files-table td {
  padding: 16px 24px;
  font-size: 14px;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}

.files-table tbody tr:last-child td {
  border-bottom: none;
}

.files-table .filename-cell .filename {
  font-weight: 500;
  color: #1f2937;
}

.files-table .size-cell {
  color: #6b7280;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.type-badge.encrypted {
  background: #dbeafe;
  color: #1d4ed8;
}

.type-badge.unencrypted {
  background: #fef3c7;
  color: #b45309;
}

/* Decryption Status Badge */
.decryption-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.decryption-status-badge.success {
  background: #dcfce7;
  color: #15803d;
}

.decryption-status-badge.failed {
  background: #fee2e2;
  color: #dc2626;
}

.decryption-status-badge.pending {
  background: #f3f4f6;
  color: #6b7280;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-download:hover {
  background: #2563eb;
}

/* Retry Decryption Button */
.btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #f59e0b;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

.btn-retry:hover {
  background: #d97706;
}

.btn-retry:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  background: #f59e0b;
}

/* ============================================
   Edit Customer Page
   ============================================ */
.edit-customer-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 48px 48px;
  background: #f5f7fa;
  min-height: calc(100vh - 60px);
}

.edit-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  margin-bottom: 24px;
}

.edit-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
}

.edit-header-left {
  flex: 1;
}

.edit-title {
  font-size: 26px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.edit-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-label {
  font-size: 14px;
  color: #6b7280;
}

.edit-header-right {
  display: flex;
  gap: 12px;
}

.btn-deactivate {
  padding: 12px 20px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-deactivate:hover {
  border-color: #9ca3af;
}

.btn-delete {
  padding: 12px 20px;
  border: 1px solid #fecaca;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-delete:hover {
  background: #fef2f2;
}

.btn-save {
  padding: 12px 24px;
  border: none;
  background: #3b82f6;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: white;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-save:hover {
  background: #2563eb;
}

.btn-save:disabled,
.btn-deactivate:disabled,
.btn-delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============================================
   Edit Sections
   ============================================ */
.edit-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  margin-bottom: 24px;
  overflow: hidden;
}

.edit-section .section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
  background: white;
}

.edit-section .section-content {
  padding: 24px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field.full-width {
  grid-column: 1 / -1;
}

.field-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.field-input,
.field-select,
.field-textarea {
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.field-input.readonly {
  background: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

.field-input.input-error {
  border-color: #dc2626;
}

.field-textarea {
  min-height: 100px;
  resize: vertical;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 13px;
}

.field-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 44px;
  cursor: pointer;
}

.error-text {
  font-size: 12px;
  color: #dc2626;
}

.upload-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upload:hover {
  border-color: #3b82f6;
  color: #3b82f6;
}

.upload-hint {
  font-size: 13px;
  color: #9ca3af;
}

.hidden-input {
  display: none !important;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #3b82f6;
  cursor: pointer;
}

.checkbox-wrapper label {
  font-size: 14px;
  color: #374151;
  cursor: pointer;
}

/* ============================================
   Message Banners
   ============================================ */
.success-banner,
.error-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 500;
}

.success-banner {
  background: #dcfce7;
  color: #166534;
}

.error-banner {
  background: #fef2f2;
  color: #dc2626;
}

/* ============================================
   New Customer Page Styles
   ============================================ */
.page-container {
  width: 100%;
  min-height: calc(100vh - 60px);
  background: #f5f7fa;
}

.nav-header {
  background: white;
  padding: 16px 48px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #374151;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.back-btn:hover {
  background: #e5e7eb;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.breadcrumb-link {
  color: #3b82f6;
  cursor: pointer;
  transition: color 0.2s;
}

.breadcrumb-link:hover {
  color: #2563eb;
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #9ca3af;
}

.breadcrumb-current {
  color: #6b7280;
}

.page-content {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 48px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 32px 0;
}

.form-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.form-section .section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.form-section .section-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 768px) {
  .form-grid,
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .dashboard-header {
    flex-direction: column;
    gap: 20px;
  }
  
  .dashboard-header-right {
    width: 100%;
    flex-direction: column;
  }
  
  .search-box {
    min-width: 100%;
  }
  
  .edit-header {
    flex-direction: column;
    gap: 20px;
  }
  
  .edit-header-right {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .nav-header {
    flex-direction: column;
    gap: 12px;
    padding: 16px 24px;
  }
  
  .page-content,
  .dashboard-container,
  .edit-customer-container {
    padding: 24px;
  }
  
  .customer-header-card,
  .files-section {
    margin: 24px;
  }
}

/* ============================================
   Form Actions
   ============================================ */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  outline: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: white;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
  background: #f9fafb;
  border-color: #d1d5db;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #2563eb;
}

/* ============================================
   Checkbox Field
   ============================================ */
.checkbox-field {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.field-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #3b82f6;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-content {
  flex: 1;
}

.checkbox-label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  display: block;
  margin-bottom: 4px;
}

.field-hint {
  font-size: 12px;
  color: #6b7280;
  margin: 0;
}

/* ============================================
   Accordion
   ============================================ */
.accordion {
  border: none;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.accordion-header::-webkit-details-marker {
  display: none;
}

.accordion-icon {
  color: #6b7280;
  transition: transform 0.2s;
  margin-right: 20px;
}

.accordion[open] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  border-top: 1px solid #e5e7eb;
}

/* ============================================
   Copy Button
   ============================================ */
.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.input-with-icon .field-input {
  padding-right: 44px;
  flex: 1;
  width: 100%;
}

.copy-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  border-radius: 4px;
  z-index: 1;
}

.copy-btn:hover {
  color: #3b82f6;
  background: #f3f4f6;
}

/* ============================================
   Upload Button
   ============================================ */
.upload-btn-wrapper {
  margin-top: 12px;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-btn:hover {
  background-color: #f9fafb;
  border-color: #d1d5db;
}

/* ============================================
   Required Field Indicator
   ============================================ */
.required {
  color: #dc2626;
}

/* ============================================
   Info Icon
   ============================================ */
.info-icon {
  color: #9ca3af;
  cursor: help;
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}

/* ============================================
   Edit Page Header
   ============================================ */
.edit-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.edit-page-title-section {
  flex: 1;
  min-width: 300px;
  max-width: 100%;
  overflow: hidden;
}

.edit-page-title-section .page-title {
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  line-height: 1.3;
}

.edit-status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.status-label-text {
  font-size: 14px;
  color: #6b7280;
  white-space: nowrap;
}

.edit-page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.btn-outline {
  padding: 12px 20px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-outline:hover:not(:disabled) {
  border-color: #9ca3af;
  background: #f9fafb;
}

.btn-danger {
  padding: 12px 20px;
  border: 1px solid #fecaca;
  background: white;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-danger:hover:not(:disabled) {
  background: #fef2f2;
}

.btn-danger svg {
  color: #dc2626;
}

.readonly-input {
  background: #f9fafb !important;
  color: #6b7280 !important;
  cursor: not-allowed !important;
}

/* ============================================
   Disabled Field
   ============================================ */
.disabled-field {
  opacity: 0.7;
}

.disabled-field .field-select {
  background-color: #f3f4f6 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
}

.disabled-field .field-hint {
  color: #9ca3af;
  font-style: italic;
}

/* Textarea error state */
.field-textarea.input-error {
  border-color: #dc2626;
}

/* Responsive adjustments for edit page */
@media (max-width: 1100px) {
  .edit-page-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .edit-page-title-section {
    min-width: 100%;
  }
  
  .edit-page-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .edit-page-title-section .page-title {
    font-size: 22px;
  }
  
  .edit-page-actions {
    flex-direction: column;
  }
  
  .edit-page-actions .btn-outline,
  .edit-page-actions .btn-danger {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================
   Authentication Method Selector
   ============================================ */
.auth-method-selector {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-option {
  flex: 1;
  min-width: 180px;
  position: relative;
  cursor: pointer;
}

.auth-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-option-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  transition: all 0.2s;
  text-align: center;
}

.auth-option:hover .auth-option-content {
  border-color: #3b82f6;
  background: #f8fafc;
}

.auth-option.selected .auth-option-content {
  border-color: #3b82f6;
  background: #eff6ff;
}

.auth-option-content svg {
  color: #6b7280;
}

.auth-option.selected .auth-option-content svg {
  color: #3b82f6;
}

.auth-option-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.auth-option-desc {
  font-size: 12px;
  color: #6b7280;
}

/* ============================================
   SSH Key Validation Feedback
   ============================================ */
.key-validation {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px;
}

.key-validation.valid {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.key-validation.invalid {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.key-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #166534;
}

.key-info svg {
  color: #22c55e;
}

.key-size {
  color: #6b7280;
  font-size: 12px;
}

.key-warning {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #b45309;
  margin-top: 8px;
}

.key-warning svg {
  color: #f59e0b;
}

.key-error {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #dc2626;
}

.key-error svg {
  color: #dc2626;
}

/* ============================================
   Key Generation Help
   ============================================ */
.key-help {
  margin-top: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.key-help summary {
  padding: 12px 16px;
  background: #f9fafb;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  list-style: none;
}

.key-help summary::-webkit-details-marker {
  display: none;
}

.key-help summary::before {
  content: "▶ ";
  font-size: 10px;
  margin-right: 8px;
}

.key-help[open] summary::before {
  content: "▼ ";
}

.key-help-content {
  padding: 16px;
  background: white;
  border-top: 1px solid #e5e7eb;
}

.key-help-content p {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #6b7280;
}

.code-block {
  background: #1f2937;
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.code-block code {
  color: #22c55e;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 12px;
  word-break: break-all;
}

.code-label {
  color: #9ca3af;
  font-size: 11px;
}

/* ============================================
   IP Whitelist Section
   ============================================ */
.ip-whitelist-section .field-textarea {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 13px;
}

/* ============================================
   Password Strength Indicator
   ============================================ */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  transition: background 0.2s;
}

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

.strength-bar.medium {
  background: #f59e0b;
}

.strength-bar.strong {
  background: #22c55e;
}

/* ============================================
   Auth Method Badge (for display)
   ============================================ */
.auth-method-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.auth-method-badge.key {
  background: #dbeafe;
  color: #1d4ed8;
}

.auth-method-badge.password {
  background: #fef3c7;
  color: #b45309;
}

.auth-method-badge.both {
  background: #dcfce7;
  color: #166534;
}

/* ============================================
   Auto-generated Password Notice
   ============================================ */
.auto-password-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  margin-top: 8px;
}

.auto-password-notice svg {
  color: #3b82f6;
  flex-shrink: 0;
  margin-top: 2px;
}

.auto-password-notice strong {
  display: block;
  color: #1e40af;
  margin-bottom: 4px;
  font-size: 14px;
}

.auto-password-notice p {
  margin: 0;
  color: #3b82f6;
  font-size: 13px;
  line-height: 1.5;
}

/* ============================================
   Password Display Field
   ============================================ */
.password-display-field {
  margin-bottom: 16px;
}

.password-display-field .input-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-display-field .field-input {
  flex: 1;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  letter-spacing: 0.5px;
}

/* ============================================
   SFTP Command Box
   ============================================ */
.sftp-command-box {
  margin-top: 20px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.sftp-command-box .field-label {
  margin-bottom: 8px;
  font-size: 13px;
  color: #475569;
}

.sftp-command-box .code-block {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #1e293b;
  border-radius: 8px;
  margin-bottom: 8px;
}

.sftp-command-box .code-block code {
  flex: 1;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 13px;
  color: #22d3ee;
  word-break: break-all;
}

.sftp-command-box .copy-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.2s;
}

.sftp-command-box .copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.sftp-command-box .field-hint {
  font-size: 12px;
  color: #64748b;
}

/* ============================================
   Password Success Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-container {
  background: white;
  border-radius: 16px;
  padding: 32px 40px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  text-align: center;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-success-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.modal-success-icon svg {
  color: #22c55e;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 12px 0;
}

.modal-description {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.modal-description strong {
  color: #374151;
}

.modal-credentials {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  text-align: left;
}

.credential-item {
  margin-bottom: 16px;
}

.credential-item:last-child {
  margin-bottom: 0;
}

.credential-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.credential-value {
  font-size: 15px;
  font-weight: 500;
  color: #1e293b;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
}

.password-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1e293b;
  border-radius: 8px;
  padding: 12px 16px;
}

.password-value {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #22d3ee;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  letter-spacing: 1px;
}

.copy-password-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-password-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.copy-password-btn svg {
  color: white;
}

.modal-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 24px;
}

.modal-warning svg {
  color: #f59e0b;
  flex-shrink: 0;
}

.modal-done-btn {
  width: 100%;
  padding: 14px 24px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-done-btn:hover {
  background: #2563eb;
}

/* ============================================
   Regenerate Password Button
   ============================================ */
.regenerate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  color: #6b7280;
  transition: all 0.2s;
  flex-shrink: 0;
}

.regenerate-btn:hover {
  background: #e5e7eb;
  color: #374151;
  border-color: #d1d5db;
}

.regenerate-btn:active {
  transform: scale(0.95);
}

.regenerate-btn.spinning svg {
  animation: spin 0.5s linear;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.password-field-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.password-field-row .input-with-icon {
  flex: 1;
}

/* ============================================
   Multi SSH Key Upload Component
   ============================================ */
.multi-ssh-key-upload {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: white;
}

.ssh-keys-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
}

.ssh-keys-count {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
}

.ssh-keys-count svg {
  color: #6b7280;
}

.ssh-keys-actions {
  display: flex;
  gap: 8px;
}

.upload-keys-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-keys-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.add-key-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: white;
  background: #3b82f6;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.add-key-btn:hover:not(:disabled) {
  background: #2563eb;
}

.add-key-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Add Key Form */
.add-key-form {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #fafbfc;
}

.add-key-label-row {
  margin-bottom: 12px;
}

.key-label-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #1f2937;
  background: white;
  transition: border-color 0.2s;
}

.key-label-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.key-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  color: #1f2937;
  background: white;
  resize: vertical;
  min-height: 100px;
  transition: border-color 0.2s;
}

.key-textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.key-textarea.input-error {
  border-color: #dc2626;
}

.add-key-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.btn-sm {
  padding: 8px 16px !important;
  font-size: 13px !important;
  min-width: auto !important;
}

/* SSH2 Conversion Notice */
.ssh2-conversion-notice {
  margin-top: 12px;
  padding: 14px 16px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ssh2-conversion-notice.error {
  background: #fef2f2;
  border-color: #fecaca;
}

.ssh2-conversion-notice .conversion-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #1e40af;
  font-size: 13px;
  line-height: 1.5;
}

.ssh2-conversion-notice.error .conversion-info {
  color: #991b1b;
}

.ssh2-conversion-notice .conversion-info svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.ssh2-conversion-notice .key-preview {
  display: flex;
  gap: 8px;
  padding-left: 26px;
}

.ssh2-conversion-notice .key-preview .key-algo {
  background: #dbeafe;
  color: #1e40af;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.ssh2-conversion-notice .key-preview .key-bits {
  background: #e0e7ff;
  color: #3730a3;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
}

.btn-convert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  align-self: flex-start;
  margin-left: 26px;
}

.btn-convert:hover {
  background: #2563eb;
}

.key-textarea.has-conversion {
  border-color: #3b82f6;
  background: #f0f9ff;
}

/* SSH Keys List */
.ssh-keys-list {
  padding: 0;
}

.ssh-key-item {
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s;
}

.ssh-key-item:last-child {
  border-bottom: none;
}

.ssh-key-item:hover {
  background: #fafbfc;
}

.ssh-key-item.invalid {
  background: #fef2f2;
}

.key-item-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.key-item-number {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  flex-shrink: 0;
}

.ssh-key-item.valid .key-item-number {
  background: #dcfce7;
  color: #166534;
}

.ssh-key-item.invalid .key-item-number {
  background: #fecaca;
  color: #dc2626;
}

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

.key-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  cursor: pointer;
  padding: 2px 4px;
  margin: -2px -4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.key-label:hover {
  background: #f3f4f6;
}

.key-label .edit-icon {
  opacity: 0;
  color: #9ca3af;
  transition: opacity 0.15s;
}

.key-label:hover .edit-icon {
  opacity: 1;
}

.key-label-edit {
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-label-input-inline {
  padding: 4px 8px;
  border: 1px solid #3b82f6;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  background: white;
  min-width: 200px;
}

.key-label-input-inline:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.save-label-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: #3b82f6;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  transition: background 0.15s;
}

.save-label-btn:hover {
  background: #2563eb;
}

.key-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.key-algo {
  padding: 2px 6px;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 4px;
  font-weight: 500;
}

.key-bits {
  color: #9ca3af;
}

.key-added {
  color: #9ca3af;
}

.remove-key-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.remove-key-btn:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.key-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  background: #f3f4f6;
  border-radius: 6px;
}

.key-preview code {
  flex: 1;
  font-size: 12px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-key-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.copy-key-btn:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Key Warning Banner - for RSA key size warnings */
.key-warning-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 14px;
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: 6px;
  font-size: 12px;
  color: #ca8a04;
}

.key-warning-banner svg {
  color: #eab308;
  flex-shrink: 0;
}

.key-validation-inline {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
}

.key-validation-inline.invalid {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.key-validation-inline.warning {
  background: #fefce8;
  border: 1px solid #fef08a;
}

.key-validation-inline .key-error,
.key-validation-inline .key-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

/* No Keys Message */
.no-keys-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.no-keys-message svg {
  color: #d1d5db;
  margin-bottom: 12px;
}

.no-keys-message p {
  font-size: 15px;
  font-weight: 500;
  color: #6b7280;
  margin: 0 0 4px 0;
}

.no-keys-message span {
  font-size: 13px;
  color: #9ca3af;
}

/* SSH Keys Error */
.ssh-keys-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: #fef2f2;
  border-top: 1px solid #fecaca;
  font-size: 13px;
  color: #dc2626;
}

.ssh-keys-error svg {
  color: #dc2626;
  flex-shrink: 0;
}

/* Spinner for loading states */
.spinner-small {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

/* Button with spinner */
.btn-primary .spinner-small,
.btn-secondary .spinner-small {
  margin-right: 0;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ============================================
   IP Validation Feedback
   ============================================ */
.ip-validation-feedback {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  color: #dc2626;
}

.ip-validation-feedback svg {
  flex-shrink: 0;
  color: #dc2626;
}

.ip-validation-feedback.valid {
  color: #16a34a;
}

.ip-validation-feedback.valid svg {
  color: #16a34a;
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  animation: slideInRight 0.3s ease-out;
  max-width: 400px;
  min-width: 280px;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-success {
  background: #065f46;
  border: 1px solid #047857;
  color: #ffffff;
}

.toast-success svg {
  color: #34d399;
  flex-shrink: 0;
}

.toast-error {
  background: #991b1b;
  border: 1px solid #b91c1c;
  color: #ffffff;
}

.toast-error svg {
  color: #fca5a5;
  flex-shrink: 0;
}

.toast-info {
  background: #1e40af;
  border: 1px solid #1d4ed8;
  color: #ffffff;
}

.toast-info svg {
  color: #93c5fd;
  flex-shrink: 0;
}

/* Toast icon styling */
.toast-notification > svg:first-child {
  margin-right: 10px;
  flex-shrink: 0;
}

.toast-notification span {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin-right: 12px;
}

.toast-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  padding: 4px;
  cursor: pointer;
  color: white;
  opacity: 0.8;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-left: auto;
  border-radius: 4px;
}

.toast-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.25);
}

/* ============================================
   Success Modal - Large Version
   ============================================ */
.success-modal-large {
  max-width: 600px !important;
  padding: 32px !important;
  text-align: left !important;
}

.success-modal-large .modal-success-icon {
  margin: 0 auto 20px;
}

.success-modal-large .modal-title {
  text-align: center;
  margin-bottom: 8px;
}

.success-modal-large .modal-description {
  text-align: center;
  margin-bottom: 24px;
}

.credentials-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.credentials-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 16px 0;
}

.credentials-title svg {
  color: #64748b;
}

.credentials-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.credential-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.credential-row .credential-label {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  min-width: 100px;
}

.credential-value-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.credential-value-box code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 14px;
  color: #1e293b;
  font-weight: 500;
}

.copy-btn-inline {
  background: #f3f4f6;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.copy-btn-inline:hover {
  background: #e5e7eb;
  color: #374151;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.auth-badge.key {
  background: #dbeafe;
  color: #1d4ed8;
}

.auth-badge.password {
  background: #fef3c7;
  color: #b45309;
}

.password-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.password-credential-box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #1e293b;
  border-radius: 8px;
  padding: 12px 16px;
}

.password-credential-box code {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #22d3ee;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  letter-spacing: 1px;
}

.password-credential-box .copy-btn-inline {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

.password-credential-box .copy-btn-inline:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* PGP Section in Modal */
.pgp-section {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
}

.pgp-description {
  font-size: 13px;
  color: #3b82f6;
  margin: 0 0 12px 0;
}

.pgp-key-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.pgp-fingerprint,
.pgp-expires {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.pgp-fingerprint .label,
.pgp-expires .label {
  font-weight: 500;
  color: #64748b;
}

.pgp-fingerprint code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 11px;
  color: #1d4ed8;
  background: white;
  padding: 4px 8px;
  border-radius: 4px;
}

.pgp-download-btn {
  width: 100%;
  justify-content: center;
}

/* Instructions Section */
.instructions-section {
  background: #fafbfc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.instructions-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 12px 0;
}

.instructions-title svg {
  color: #64748b;
}

.instructions-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: #475569;
  line-height: 1.8;
}

.instructions-list li {
  margin-bottom: 4px;
}

/* ============================================
   Email Section in Customer Details
   ============================================ */
.email-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

.subsection-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin: 0 0 16px 0;
}

.subsection-title svg {
  color: #6b7280;
}

.optional-badge {
  font-size: 11px;
  font-weight: 500;
  color: #9ca3af;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
}

/* ============================================
   PGP Key Section Component
   ============================================ */
.pgp-key-section {
  margin-top: 20px;
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.pgp-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #1e293b;
  margin: 0 0 16px 0;
}

.pgp-error-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #dc2626;
}

.pgp-error-banner svg {
  color: #dc2626;
  flex-shrink: 0;
}

.pgp-success-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #16a34a;
}

.pgp-success-banner svg {
  color: #22c55e;
  flex-shrink: 0;
}

.pgp-key-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  text-align: center;
}

.pgp-key-empty-state svg {
  color: #cbd5e1;
  margin-bottom: 12px;
}

.pgp-empty-title {
  font-size: 15px;
  font-weight: 500;
  color: #475569;
  margin: 0 0 8px 0;
}

.pgp-empty-desc {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 20px 0;
}

.pgp-key-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.pgp-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
}

.pgp-status-badge.active {
  background: #dcfce7;
  color: #16a34a;
}

.pgp-status-badge.expired {
  background: #fef2f2;
  color: #dc2626;
}

.pgp-status-badge .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pgp-key-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #d97706;
}

.pgp-key-warning svg {
  color: #f59e0b;
}

.pgp-key-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.pgp-key-detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pgp-key-label {
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  min-width: 80px;
}

.pgp-key-value {
  font-size: 13px;
  color: #1e293b;
}

.pgp-key-value code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 12px;
  background: #e2e8f0;
  padding: 3px 8px;
  border-radius: 4px;
  color: #334155;
}

.copy-btn-small {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn-small:hover {
  background: #e2e8f0;
  color: #475569;
}

.pgp-key-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger-outline:hover {
  background: #fef2f2;
  border-color: #f87171;
}

.btn-danger-outline:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   PGP Key Section Enhancements
   ============================================ */
.pgp-requirements {
  margin-bottom: 16px;
}

.pgp-requirements .field-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #6b7280;
  background: #f9fafb;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.pgp-requirements .field-hint svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #9ca3af;
}

.generate-pgp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pgp-key-details {
  background: #f8fafc;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.pgp-detail-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.pgp-detail-row:last-child {
  margin-bottom: 0;
}

.pgp-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  min-width: 80px;
}

.pgp-value {
  font-size: 13px;
  color: #6b7280;
}

.pgp-fingerprint-code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 11px;
  background: #e5e7eb;
  padding: 4px 8px;
  border-radius: 4px;
  color: #374151;
}

.copy-btn-small {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.copy-btn-small:hover {
  color: #3b82f6;
}

.status-badge-sm {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.status-badge-sm.active {
  background: #dcfce7;
  color: #166534;
}

.pgp-actions {
  display: flex;
  gap: 12px;
}

.pgp-actions .btn {
  flex: 1;
  justify-content: center;
}

/* ============================================
   Warning Note (Conditional Display)
   ============================================ */
.warning-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  margin-bottom: 16px;
}

.warning-note svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #f59e0b;
}

.warning-note span {
  font-size: 13px;
  color: #92400e;
  line-height: 1.4;
}

/* ============================================
   Compact Success Modal
   ============================================ */
.success-modal-compact {
  max-width: 420px !important;
  padding: 24px !important;
  text-align: left !important;
}

.modal-header-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-success-icon-sm {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-success-icon-sm svg {
  color: #22c55e;
}

.modal-header-text {
  flex: 1;
}

.modal-title-sm {
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.modal-subtitle-sm {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
  line-height: 1.4;
}

.modal-subtitle-sm strong {
  color: #374151;
}

/* Compact Credentials */
.credentials-compact {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px 0;
  margin-bottom: 16px;
}

.cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
}

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

.cred-row.password-highlight {
  background: #065f46;
  margin: 4px;
  border-radius: 8px;
  border-bottom: none;
}

.cred-row.password-highlight .cred-label {
  color: #a7f3d0;
}

.cred-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  min-width: 80px;
}

.cred-value {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cred-value code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 13px;
  color: #1e293b;
  font-weight: 500;
}

.cred-row.password-highlight .cred-value code {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.password-value-box {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.copy-sm {
  background: #f3f4f6;
  border: none;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.copy-sm:hover {
  background: #e5e7eb;
  color: #374151;
}

.cred-row.password-highlight .copy-sm {
  background: rgba(255, 255, 255, 0.15);
  color: #d1fae5;
}

.cred-row.password-highlight .copy-sm:hover {
  background: rgba(255, 255, 255, 0.25);
  color: white;
}

.auth-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.auth-tag.key {
  background: #dbeafe;
  color: #1d4ed8;
}

.auth-tag.password {
  background: #fef3c7;
  color: #b45309;
}

/* Compact PGP Section */
.pgp-compact {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
}

.pgp-header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  margin-bottom: 8px;
}

.pgp-header-row svg {
  color: #3b82f6;
}

.pgp-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pgp-info-row span {
  font-size: 12px;
  color: #64748b;
}

.pgp-info-row code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 10px;
  color: #1d4ed8;
  background: white;
  padding: 2px 4px;
  border-radius: 3px;
}

.download-key-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: white;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #1d4ed8;
  cursor: pointer;
  transition: all 0.15s;
}

.download-key-btn:hover {
  background: #dbeafe;
}

.download-key-btn svg {
  color: #3b82f6;
}

/* Compact Warning */
.warning-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  margin-bottom: 16px;
}

.warning-compact svg {
  color: #f59e0b;
  flex-shrink: 0;
}

.warning-compact span {
  font-size: 12px;
  color: #92400e;
  font-weight: 500;
}

/* Compact Done Button */
.modal-done-btn-compact {
  width: 100%;
  padding: 12px 20px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-done-btn-compact:hover {
  background: #2563eb;
}

/* ============================================
   Footer Styles
   ============================================ */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 12px 24px;
  text-align: center;
  z-index: 100;
}

.app-footer p {
  margin: 0;
  font-size: 13px;
  color: #64748b;
}

/* Ensure content doesn't overlap with footer */
.dashboard-container,
.page-container,
.view-customer-container {
  padding-bottom: 80px !important;
  min-height: calc(100vh - 60px);
}

/* Ensure pagination is visible above footer */
.dashboard-pagination {
  margin-bottom: 28px;
}

/* ============================================
   Sort Icons for Table Headers
   ============================================ */
.sortable-header {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.sortable-header:hover {
  background: #f1f5f9;
}

.sort-icon {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  opacity: 0.3;
  transition: opacity 0.2s;
}

.sort-icon.active {
  opacity: 1;
  color: #3b82f6;
}

.sortable-header:hover .sort-icon {
  opacity: 0.6;
}

.sortable-header:hover .sort-icon.active {
  opacity: 1;
}

/* Dashboard table sortable headers */
.dashboard-table th.sortable-header {
  position: relative;
}

.dashboard-table th.sortable-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s;
}

.dashboard-table th.sortable-header:hover::after {
  background: #e2e8f0;
}

/* Files table sortable headers */
.files-table th.sortable-header {
  position: relative;
}

.files-table th.sortable-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  transition: background 0.2s;
}

.files-table th.sortable-header:hover::after {
  background: #e2e8f0;
}

.footer-text {
  margin: 0;
  font-size: 12px;
  color: #64748b;
}

/* ============================================
   SSH Key Conversion Styles
   ============================================ */
.key-validation.convertible {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.key-convert-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #1d4ed8;
  flex-wrap: wrap;
}

.key-convert-notice svg {
  color: #3b82f6;
  flex-shrink: 0;
}

.key-convert-notice span {
  font-weight: 500;
}

.btn-convert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px !important;
  background: #3b82f6 !important;
  color: white !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
}

.btn-convert:hover {
  background: #2563eb !important;
}

.btn-convert svg {
  color: white !important;
}

/* Key format badge */
.key-format-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.key-format-badge.openssh {
  background: #dcfce7;
  color: #166534;
}

.key-format-badge.ssh2 {
  background: #dbeafe;
  color: #1d4ed8;
}

.key-format-badge.putty {
  background: #fef3c7;
  color: #b45309;
}

.key-format-badge.unknown {
  background: #f3f4f6;
  color: #6b7280;
}

/* ============================================
   Editable Key Labels
   ============================================ */
.key-label.editable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 6px;
  transition: background 0.15s;
}

.key-label.editable:hover {
  background: #e5e7eb;
}

.key-label.editable .label-text {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
}

.key-label.editable .edit-icon {
  opacity: 0;
  color: #6b7280;
  transition: opacity 0.15s;
}

.key-label.editable:hover .edit-icon {
  opacity: 1;
}

/* PGP Key Status Badge - Updated */
.pgp-key-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  background: #dcfce7;
  color: #16a34a;
}

.pgp-key-status-badge .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.pgp-key-status-badge .status-dot.active {
  background: #22c55e;
}

.pgp-key-status-badge .status-dot.expired {
  background: #dc2626;
}

/* Spinner Icon Animation */
.spinner-icon {
  animation: spin 1s linear infinite;
}

/* PGP Key Actions - Improved button alignment */
.pgp-key-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.pgp-key-actions .btn svg {
  flex-shrink: 0;
}

/* Regenerate button spinning state */
.regenerate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.regenerate-btn.spinning svg {
  animation: spin 0.6s linear infinite;
}

/* Copy button disabled state */
.copy-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.copy-btn:disabled:hover {
  color: #6b7280;
  background: none;
}