:root {
  --primary: #1f6feb;
  --primary-dark: #174ea6;
  --dark: #111827;
  --gray: #6b7280;
  --light: #f3f4f6;
  --white: #ffffff;
  --border: #e5e7eb;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f8fafc;
  color: var(--dark);
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 72px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  color: var(--white);
  font-size: 22px;
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span {
  display: block;
  color: var(--gray);
  font-size: 13px;
  margin-top: 2px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topnav a {
  color: var(--gray);
  font-size: 14px;
}

.topnav a:hover {
  color: var(--primary);
}

.main-content {
  flex: 1;
}

.hero {
  padding: 80px 24px;
}

.hero-content {
  max-width: 980px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 52px;
  box-shadow: var(--shadow);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero h1 {
  margin: 0;
  font-size: 42px;
  letter-spacing: -1px;
}

.hero p {
  max-width: 680px;
  color: var(--gray);
  line-height: 1.7;
  font-size: 17px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 34px 0;
}

.status-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  background: #f9fafb;
}

.status-card strong {
  display: block;
  font-size: 15px;
  margin-bottom: 8px;
}

.status-card span {
  display: block;
  font-size: 14px;
  color: var(--gray);
}

.status-card.success {
  border-color: rgba(22, 163, 74, 0.25);
  background: #f0fdf4;
}

.status-card.success span {
  color: var(--success);
}

.status-card.danger {
  border-color: rgba(220, 38, 38, 0.25);
  background: #fef2f2;
}

.status-card.danger span {
  color: var(--danger);
}

.alert {
  padding: 16px 18px;
  border-radius: 16px;
  line-height: 1.6;
  margin-top: 20px;
}

.alert.danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.next-box {
  margin-top: 34px;
  padding: 26px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 22px;
}

.next-box h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.next-box p {
  margin: 0;
  font-size: 15px;
}

.error-page {
  max-width: 720px;
  margin: 80px auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 42px;
  text-align: center;
  box-shadow: var(--shadow);
}

.error-page h1 {
  font-size: 64px;
  margin: 0 0 12px;
}

.button {
  display: inline-flex;
  margin-top: 20px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
}

.footer {
  padding: 24px 42px;
  border-top: 1px solid var(--border);
  background: var(--white);
  color: var(--gray);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

@media (max-width: 768px) {
  .topbar {
    padding: 0 20px;
  }

  .hero {
    padding: 40px 16px;
  }

  .hero-content {
    padding: 28px;
    border-radius: 22px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    padding: 22px;
  }
}

.nav-button {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--white) !important;
  font-weight: 700;
}

.auth-page {
  padding: 64px 20px;
}

.auth-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 42px;
  box-shadow: var(--shadow);
}

.auth-header {
  margin-bottom: 28px;
}

.auth-header h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -0.8px;
}

.auth-header p {
  color: var(--gray);
  line-height: 1.6;
  margin-bottom: 0;
}

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

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

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

.form-group label {
  font-size: 14px;
  font-weight: 700;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 15px;
  font-size: 15px;
  outline: none;
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: rgba(31, 111, 235, 0.55);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.08);
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
}

.button.full {
  width: 100%;
  border: none;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
}

.button.muted {
  background: #e5e7eb;
  color: #6b7280;
  border: none;
  cursor: not-allowed;
}

.auth-footer {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: var(--gray);
  font-size: 14px;
  text-align: center;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 700;
}

.alert.success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.dashboard-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 54px 24px;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 38px;
  box-shadow: var(--shadow);
}

.dashboard-hero h1 {
  margin: 0;
  font-size: 36px;
  letter-spacing: -0.8px;
}

.dashboard-hero p {
  color: var(--gray);
  line-height: 1.7;
  max-width: 680px;
}

.dashboard-company-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-company-card span {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 8px;
}

.dashboard-company-card strong {
  font-size: 22px;
}

.dashboard-company-card small {
  margin-top: 8px;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
}

.stat-card strong {
  display: block;
  font-size: 28px;
  margin-bottom: 6px;
}

.stat-card span {
  color: var(--gray);
  font-size: 14px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.module-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 26px;
}

.module-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.module-card p {
  color: var(--gray);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .stat-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .form-grid.two {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-card {
    padding: 28px;
    border-radius: 22px;
  }

  .auth-header h1,
  .dashboard-hero h1 {
    font-size: 28px;
  }

  .topnav {
    gap: 10px;
  }

  .topnav a {
    font-size: 13px;
  }
}

/* Dashboard Yeni Kurumsal Tasarım */

.dashboard-page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.dashboard-alert {
  margin-bottom: 24px;
}

.dashboard-welcome-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 38px;
  box-shadow: var(--shadow);
}

.dashboard-welcome-content h1 {
  margin: 16px 0 14px;
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.8px;
  color: var(--dark);
}

.dashboard-welcome-content p {
  max-width: 720px;
  margin: 0;
  color: var(--gray);
  line-height: 1.7;
  font-size: 16px;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.dashboard-company-card {
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
  border: 1px solid #bfdbfe;
  border-radius: 24px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.dashboard-company-card span {
  color: var(--gray);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.dashboard-company-card strong {
  color: var(--dark);
  font-size: 24px;
  line-height: 1.25;
}

.dashboard-company-card small {
  margin-top: 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 24px;
}

.dashboard-stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.04);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #eff6ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  flex-shrink: 0;
}

.dashboard-stat-card strong {
  display: block;
  color: var(--dark);
  font-size: 26px;
  line-height: 1.2;
  margin-bottom: 4px;
}

.dashboard-stat-card span {
  color: var(--gray);
  font-size: 14px;
}

.dashboard-section-title {
  margin: 38px 0 18px;
}

.dashboard-section-title h2 {
  margin: 0 0 8px;
  color: var(--dark);
  font-size: 26px;
  letter-spacing: -0.4px;
}

.dashboard-section-title p {
  margin: 0;
  color: var(--gray);
  line-height: 1.6;
}

.dashboard-module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.dashboard-module-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.04);
  transition: 0.2s ease;
}

.dashboard-module-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.module-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 18px;
}

.dashboard-module-card h3 {
  margin: 0 0 10px;
  color: var(--dark);
  font-size: 20px;
}

.dashboard-module-card p {
  min-height: 76px;
  margin: 0 0 20px;
  color: var(--gray);
  line-height: 1.6;
  font-size: 15px;
}

.button.muted {
  background: #e5e7eb;
  color: #6b7280;
  border: none;
  cursor: not-allowed;
}

@media (max-width: 1024px) {
  .dashboard-welcome-card {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-module-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .dashboard-page {
    padding: 32px 16px 56px;
  }

  .dashboard-welcome-card {
    padding: 26px;
    border-radius: 22px;
  }

  .dashboard-welcome-content h1 {
    font-size: 28px;
  }

  .dashboard-stat-grid,
  .dashboard-module-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-card,
  .dashboard-module-card {
    border-radius: 20px;
  }
}

/* Firma Yönetimi Panel Tasarımı */

.panel-page {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.panel-header h1 {
  margin: 14px 0 10px;
  font-size: 36px;
  letter-spacing: -0.8px;
  color: var(--dark);
}

.panel-header p {
  max-width: 680px;
  margin: 0;
  color: var(--gray);
  line-height: 1.7;
}

.panel-alert {
  margin-bottom: 20px;
}

.panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.panel-card,
.panel-side-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 30px;
  box-shadow: var(--shadow);
}

.panel-card h2,
.panel-side-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--dark);
}

.panel-card p {
  margin: 0 0 26px;
  color: var(--gray);
  line-height: 1.6;
}

.company-form textarea {
  resize: vertical;
  min-height: 110px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.button.secondary {
  background: #f8fafc;
  color: var(--dark);
  border: 1px solid var(--border);
}

.company-preview-logo {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 900;
  margin: 22px 0 16px;
}

.panel-side-card > strong {
  display: block;
  font-size: 21px;
  color: var(--dark);
  line-height: 1.3;
}

.company-preview-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.company-preview-list li {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.company-preview-list span {
  display: block;
  color: var(--gray);
  font-size: 13px;
  margin-bottom: 5px;
}

.company-preview-list b {
  display: block;
  color: var(--dark);
  font-size: 14px;
  word-break: break-word;
}

.info-box {
  padding: 16px;
  border-radius: 18px;
  background: #eff6ff;
  color: var(--primary-dark);
  line-height: 1.6;
  font-size: 14px;
  border: 1px solid #bfdbfe;
}

@media (max-width: 900px) {
  .panel-header {
    flex-direction: column;
  }

  .panel-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .panel-page {
    padding: 32px 16px 56px;
  }

  .panel-card,
  .panel-side-card {
    padding: 24px;
    border-radius: 22px;
  }

  .panel-header h1 {
    font-size: 28px;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .button {
    width: 100%;
    justify-content: center;
  }
}

/* Logo ve İmza Yükleme */

.media-card {
  grid-column: 1 / -1;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.media-upload-box {
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  background: #f8fafc;
}

.media-upload-box h3 {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--dark);
}

.media-preview {
  width: 100%;
  height: 170px;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 18px;
}

.media-preview img {
  max-width: 90%;
  max-height: 130px;
  object-fit: contain;
}

.signature-preview img {
  max-height: 100px;
}

.empty-media {
  color: var(--gray);
  font-size: 14px;
  font-weight: 700;
}

.media-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.media-form input[type="file"] {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.media-delete-form {
  margin-top: 12px;
}

.danger-button {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.danger-button:hover {
  background: #fecaca;
}

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

/* Teklif Ayarları */
.quote-settings-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.quote-settings-form textarea {
  resize: vertical;
  min-height: 110px;
}

.quote-preview-box {
  padding: 20px;
  border-radius: 20px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  margin: 22px 0 8px;
}

.quote-preview-box span {
  display: block;
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.quote-preview-box strong {
  display: block;
  color: var(--dark);
  font-size: 24px;
  letter-spacing: 0.4px;
}

.button {
  border: 0;
  cursor: pointer;
  font-size: 15px;
}

@media (max-width: 900px) {
  .quote-settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Teklif Oluşturma ve PDF Önizleme */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.side-full-button {
  width: 100%;
  justify-content: center;
  margin: 0 0 18px;
}

.quote-create-grid {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.form-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.archive-card {
  overflow: hidden;
}

.archive-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.archive-topline strong,
.archive-topline span {
  display: block;
}

.archive-topline span {
  margin-top: 6px;
  color: var(--gray);
  font-size: 14px;
}

.empty-state {
  text-align: center;
  padding: 56px 20px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 24px;
}

.empty-state h2 {
  margin: 0 0 10px;
}

.empty-state p {
  max-width: 560px;
  margin: 0 auto 10px;
  color: var(--gray);
  line-height: 1.7;
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  padding: 15px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 14px;
}

.data-table th {
  color: var(--gray);
  background: #f8fafc;
  font-size: 13px;
}

.small-link {
  color: var(--primary);
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
}

.status-draft {
  background: #f1f5f9;
  color: #475569;
}

.status-sent {
  background: #eff6ff;
  color: #1d4ed8;
}

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

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

.quote-document {
  max-width: 980px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 42px;
}

.quote-doc-header {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 28px;
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 2px solid #e2e8f0;
}

.quote-company-block {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.quote-logo {
  max-width: 110px;
  max-height: 78px;
  object-fit: contain;
}

.quote-logo-placeholder {
  width: 78px;
  height: 78px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  color: var(--white);
  font-size: 34px;
}

.quote-company-block h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.quote-company-block p {
  margin: 4px 0;
  color: var(--gray);
  line-height: 1.5;
  font-size: 13px;
}

.quote-meta-card {
  background: #0f172a;
  color: var(--white);
  border-radius: 22px;
  padding: 22px;
}

.quote-meta-card span,
.quote-meta-card small,
.quote-customer-grid span,
.quote-customer-grid small {
  display: block;
}

.quote-meta-card span {
  font-size: 12px;
  color: #bfdbfe;
  font-weight: 900;
  letter-spacing: 1px;
}

.quote-meta-card strong {
  display: block;
  font-size: 24px;
  margin: 10px 0 14px;
}

.quote-meta-card small {
  color: #dbeafe;
  line-height: 1.8;
}

.quote-customer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 28px 0;
}

.quote-customer-grid > div {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
}

.quote-customer-grid span {
  color: var(--gray);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

.quote-customer-grid strong {
  display: block;
  font-size: 19px;
  margin-bottom: 8px;
}

.quote-customer-grid small {
  color: var(--gray);
  line-height: 1.7;
}

.quote-document-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 28px;
}

.quote-document-table th,
.quote-document-table td {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.quote-document-table th {
  background: #f8fafc;
  color: var(--gray);
  font-size: 13px;
  text-align: left;
}

.right {
  text-align: right !important;
}

.quote-total-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.quote-note-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  background: #f8fafc;
}

.quote-note-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.quote-note-card p {
  color: var(--gray);
  line-height: 1.7;
  margin: 0 0 18px;
  font-size: 14px;
}

.quote-total-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.quote-total-card div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
}

.quote-total-card div:last-child {
  border-bottom: 0;
}

.quote-total-card span {
  color: var(--gray);
}

.quote-total-card .grand {
  background: #0f172a;
  color: var(--white);
  align-items: center;
}

.quote-total-card .grand span {
  color: #dbeafe;
}

.quote-total-card .grand strong {
  font-size: 20px;
}

.quote-doc-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding-top: 34px;
  margin-top: 34px;
  border-top: 1px solid var(--border);
}

.quote-doc-footer strong,
.quote-doc-footer span {
  display: block;
}

.quote-doc-footer span {
  color: var(--gray);
  margin-top: 6px;
  font-size: 13px;
}

.quote-signature {
  max-width: 180px;
  max-height: 90px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .quote-create-grid,
  .quote-doc-header,
  .quote-customer-grid,
  .quote-total-grid {
    grid-template-columns: 1fr;
  }

  .form-grid.three {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #fff;
  }

  .topbar,
  .footer,
  .no-print {
    display: none !important;
  }

  .main-content,
  .panel-page,
  .quote-print-page {
    padding: 0 !important;
    margin: 0 !important;
  }

  .quote-document {
    box-shadow: none;
    border: 0;
    border-radius: 0;
    max-width: none;
    padding: 18mm;
  }
}

/* Müşteri Yönetimi */
.customer-form textarea {
  resize: vertical;
  min-height: 96px;
}

.hint-text {
  display: block;
  color: var(--gray);
  font-size: 13px;
  line-height: 1.5;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.table-actions form {
  margin: 0;
}

.link-button {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--primary);
  font-weight: 800;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}

.danger-text {
  color: var(--danger);
}

.split-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.quote-items-card {
  margin-top: 20px;
}

.muted {
  color: #6b7280;
  font-size: 14px;
  margin-top: -6px;
  margin-bottom: 16px;
}

.quote-items-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 14px;
}

.quote-items-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.quote-items-table th,
.quote-items-table td {
  border: 1px solid #e5e7eb;
  padding: 10px;
  vertical-align: middle;
}

.quote-items-table th {
  background: #f9fafb;
  color: #374151;
  font-size: 14px;
  text-align: left;
}

.quote-items-table input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
}

.quote-items-table input[readonly] {
  background: #f3f4f6;
  font-weight: bold;
}

.secondary-btn {
  display: inline-block;
  border: none;
  background: #e5e7eb;
  color: #111827;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
}

.secondary-btn:hover {
  background: #d1d5db;
}

.remove-item-btn {
  border: none;
  background: #fee2e2;
  color: #991b1b;
  padding: 8px 10px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: bold;
}

.remove-item-btn:hover {
  background: #fecaca;
}

.items-total-box {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  font-size: 18px;
}

.items-total-box strong {
  color: #111827;
}

.quote-items-preview {
  margin-top: 28px;
}

.quote-items-preview h2 {
  margin: 0 0 14px;
  font-size: 20px;
  color: #111827;
}

.quote-items-preview-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
}

.quote-items-preview-table th {
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

.quote-items-preview-table td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
  color: #111827;
}

.quote-items-preview-table tr:last-child td {
  border-bottom: none;
}

.quote-items-preview-table .text-right {
  text-align: right;
}

.quote-items-preview-table .text-center {
  text-align: center;
}

.quote-items-preview-table tfoot td {
  background: #f9fafb;
  font-weight: 700;
  font-size: 15px;
}

.no-items-box {
  margin-top: 20px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  color: #6b7280;
  padding: 16px;
  border-radius: 12px;
}

.quote-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.quote-edit-btn:hover {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.quote-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.quote-view-btn:hover {
  background: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.22);
}

.quote-delete-form {
  display: inline-flex;
  margin: 0;
}

.quote-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quote-delete-btn:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.22);
}

.quote-restore-form {
  display: inline-flex;
  margin: 0;
}
.quote-restore-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 14px;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.quote-restore-btn:hover {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.22);
}

.material-remote-picker {
  display: grid;
  gap: 7px;
  min-width: 220px;
}

.material-remote-picker .material-search-input,
.material-remote-picker .material-remote-select {
  width: 100%;
  min-width: 0;
}

.material-search-results {
  max-height: 230px;
  overflow-y: auto;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.material-search-result {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
  color: #111827;
  font: inherit;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.material-search-result:last-child {
  border-bottom: 0;
}

.material-search-result:hover,
.material-search-result:focus {
  background: #eff6ff;
  color: #1d4ed8;
  outline: 0;
}

.material-search-message {
  padding: 10px;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.material-search-message.is-error {
  color: #b91c1c;
  background: #fef2f2;
}

.material-search-help {
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
}
