:root {
    --orange: #FF7A00;
    --gray-dark: #333;
    --gray-light: #f8f9fa;
    --gray-medium: #666;
    --white: #fff;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --radius: 12px;
    --font-main: 'Inter', sans-serif;
  }
  
  .app-logo {
    display: flex;
    align-items: center;
  }
  
  .logo-img {
    width: 50px;
    height: auto;
  }
  
  .quote-details-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    flex: 1;
  }
  
  .user-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .user-logo-img {
    height: 120px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .powered-by {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .quote-title {
    margin: 0;
    margin-top: 8px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    color: var(--gray-dark);
  }
  
  /* Base styles */
  body {
    margin: 0;
    font-family: var(--font-main);
    background-color: var(--gray-light);
    color: var(--gray-dark);
    line-height: 1.6;
  }
  
  #app {
    padding: 20px;
    max-width: 960px;
    margin: auto;
  }
  
  /* Loading */
  .loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
  }
  
  .loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #eee;
    border-top: 4px solid var(--orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
  }
  
  @keyframes spin {
    to { transform: rotate(360deg); }
  }
  
  .loading-container p {
    font-size: 16px;
    color: var(--gray-medium);
  }
  
  /* Error */
  .error-container {
    display: flex;
    justify-content: center;
    padding: 60px 20px;
  }
  
  .error-content {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
  }
  
  .error-content h2 {
    color: var(--orange);
    font-size: 24px;
    margin-bottom: 12px;
  }
  
  .error-content p {
    color: var(--gray-medium);
    margin-bottom: 24px;
  }
  
  .btn-secondary {
    background: var(--gray-medium);
    color: var(--white);
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
  }
  
  .btn-secondary:hover {
    background: #555;
  }
  
  /* Quote container */
  .quote-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
  
  /* Header */
  .quote-header {
    background: var(--white);
    padding: 24px 32px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
  }
  
  .freelancer-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-dark);
    text-align: left;
    margin: 0;
  }
  
  .business-name {
    font-size: 16px;
    color: var(--gray-medium);
    text-align: left;
    margin: 2px 0 0 0;
  }
  
  .quote-meta {
    font-size: 14px;
    text-align: center;
    color: var(--gray-medium);
  }
  
  .quote-meta div {
    margin-bottom: 4px;
  }
  /* Hide quote id as requested */
  .quote-id { display: none; }
  
  /* Content sections */
  .quote-content {
    padding: 32px;
  }
  
  .quote-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 6px;
  }
  
  /* Client info */
  .client-section {
    margin-bottom: 32px;
  }
  
  .client-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
  }
  
  .contact-info {
    color: var(--gray-medium);
    font-size: 14px;
  }
  
  /* Items */
  .items-table {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 32px;
  }
  
  .table-header,
  .item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    padding: 12px 16px;
  }
  
  .table-header {
    background: #f2f2f2;
    font-weight: 600;
  }
  
  .item-row {
    border-bottom: 1px solid #eee;
    font-size: 14px;
  }
  
  .item-row:nth-child(even) {
    background: #fafafa;
  }
  
  .col-total {
    font-weight: 600;
    text-align: center;
  }
  
  /* Totals */
  .totals-section {
    background: #f6f6f6;
    padding: 20px;
    border-radius: 8px;
  }
  
  .total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
  }
  
  .total-final {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 2px solid #e0e0e0;
    font-size: 18px;
    font-weight: 700;
    color: var(--orange);
  }
  
  /* Notes & Terms */
  .notes-content,
  .terms-content {
    background: #fff5e6;
    padding: 16px;
    border-left: 4px solid var(--orange);
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-dark);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
  }
  
  /* Responsive */
  @media (max-width: 768px) {
    .quote-header {
      flex-direction: column;
      gap: 16px;
      align-items: center;
    }
    
    .quote-details-center {
      order: 2;
      text-align: center;
    }
    
    .company-info {
      order: 1;
      text-align: center;
    }
  
    .table-header,
    .item-row {
      grid-template-columns: 1fr;
      gap: 10px;
    }

    /* Mobile logo positioning */
    .user-logo-container {
      order: 3;
      margin: 0;
    }
  }

  /* Comments Section */
  .comments-section {
    margin-top: 32px;
    background: var(--white);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .comments-section h2 {
    color: var(--gray-dark);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--orange);
    padding-bottom: 8px;
  }

  /* Comment Form */
  .comment-form {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
  }

  .comment-form-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .form-group label {
    font-weight: 500;
    color: var(--gray-dark);
    font-size: 14px;
  }

  .form-group input,
  .form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 14px;
    transition: border-color 0.2s ease;
  }

  .form-group input:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.1);
  }

  .form-group textarea {
    resize: vertical;
    min-height: 100px;
  }

  .btn-primary {
    background: var(--orange);
    color: var(--white);
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: background-color 0.2s ease;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 8px;
  }

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

  .btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
  }

  /* Comment Display */
  .comments-display {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
  }

  .comments-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-medium);
    font-size: 14px;
  }

  .loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #eee;
    border-top: 2px solid var(--orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  .comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .comment-item {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  }

  .comment-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 8px;
  }

  .comment-date {
    font-size: 12px;
    color: var(--gray-medium);
  }

  .comment-text {
    color: var(--gray-dark);
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
  }

  .no-comments {
    text-align: center;
    padding: 32px 16px;
    color: var(--gray-medium);
  }

  .no-comments p {
    margin: 0;
    font-style: italic;
  }

  /* Comment form responsive */
  @media (max-width: 768px) {
    .comments-section {
      margin-top: 24px;
      padding: 16px;
    }

    .comment-form {
      padding: 16px;
    }

    .btn-primary {
      align-self: stretch;
      justify-content: center;
    }
  }
  
  /* Modal */
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 10000;
  }
  .modal-content {
    width: 100%;
    max-width: 640px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .modal-header h3 { margin: 0; }
  .modal-close {
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--gray-medium);
  }
  .modal-body { padding: 16px 20px; }
  .modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 20px;
    border-top: 1px solid #eee;
  }
  .mode-select p { margin-top: 0; color: var(--gray-medium); }
  .mode-actions { display: flex; gap: 8px; }
  .signature-section { display: block; }
  .canvas-wrapper {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
  }
  #signature-canvas { width: 100%; height: 180px; touch-action: none; display: block; }
  .canvas-help { margin-top: 8px; font-size: 12px; color: var(--gray-medium); }
  .feedback { padding: 8px 20px 16px; font-size: 14px; color: var(--gray-medium); }

  @media (max-width: 768px) {
    .modal-content { max-width: 100%; }
  }
  
  /* Signature Section */
  .signature-section {
    margin: 24px 0;
  }
  #signature-display {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    display: inline-block;
  }
  .signature-image {
    width: 320px;
    max-width: 100%;
    height: auto;
    display: block;
    background: #fff;
  }
  .signature-typed {
    font-family: serif;
    font-size: 22px;
    color: #333;
  }
  
/* Dates under title */
.quote-dates {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  margin-top: 6px;
  color: var(--gray-medium);
  font-size: 14px;
}

.sign-button-wrapper {
  margin-top: 16px;
}
 
.left-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
