/* Admin Console Styles */

/* ===== Authentication Pages ===== */
.auth-body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.auth-shell {
  width: 100%;
  max-width: 440px;
  padding: 2rem 1rem;
}

.auth-card {
  background: white;
  border-radius: 1rem;
  padding: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: #2563eb;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
  text-align: center;
}

.auth-subtitle {
  color: #64748b;
  text-align: center;
  font-size: 0.9375rem;
  margin-bottom: 1.75rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.auth-field label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.auth-field input {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.auth-field-error {
  color: #dc2626;
  font-size: 0.8125rem;
}

.auth-error {
  background: #fef2f2;
  color: #dc2626;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.auth-error ul {
  margin: 0;
  padding-left: 1rem;
}

.auth-error:empty {
  display: none;
}

.auth-submit {
  margin-top: 0.5rem;
  padding: 0.875rem;
  border: none;
  border-radius: 0.5rem;
  background: #2563eb;
  color: white;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s ease;
}

.auth-submit:hover {
  background: #1d4ed8;
}

.auth-qr {
  display: flex;
  justify-content: center;
  margin: 0 0 1rem;
}

.auth-qr img {
  width: 200px;
  height: 200px;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.5rem;
  background: white;
}

.auth-secret {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.auth-secret-label {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.auth-secret code {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.05em;
  word-break: break-all;
}



/* ===== App Layout with Sidebar ===== */
.app-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

/* ===== Sidebar ===== */
.sidebar {
  width: 260px;
  background: #0f172a;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-header {
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: white;
}

.sidebar-logo svg {
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: #94a3b8;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.nav-item.active {
  background: #2563eb;
  color: white;
}

.nav-item svg {
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: auto;
}

.logout-form {
  margin: 0;
}

.logout-item {
  color: #94a3b8;
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  text-align: left;
}

.logout-item:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
}

.sidebar-copyright {
  font-size: 0.6875rem;
  color: #475569;
  text-align: center;
  padding: 0.5rem 0 0.25rem;
}

/* ===== Main Content Wrapper ===== */
.main-wrapper {
  flex: 1;
  overflow-y: auto;
  background: #f8fafc;
  min-width: 0;
}

/* Main Layout */
.main-content {
  padding: 2rem;
  width: 90%;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* ===== Section Content (replaces tab content) ===== */
.section-content-container {
  flex: 1;
}

.section-content {
  display: none;
  flex-direction: column;
}

.section-content.active {
  display: flex;
}

.section-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  gap: 1rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  color: #64748b;
  font-size: 0.9375rem;
}

.quick-actions {
  display: flex;
  gap: 0.75rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  max-width:170px;
  white-space: nowrap;
}

.action-btn.primary {
  background: #2563eb;
  color: white;
}

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

.action-btn.secondary {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.action-btn.secondary:hover {
  background: #f1f5f9;
}

/* Overview Widgets */
.overview-widgets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.widget-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.2s ease;
}

.widget-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.1);
}

.widget-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.widget-card.customers .widget-icon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.widget-card.tickets .widget-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.widget-card.revenue-subscription .widget-icon {
  background: linear-gradient(135deg, #10b981, #059669);
}

.widget-card.revenue-extras .widget-icon {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.widget-content {
  flex: 1;
}

.widget-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.widget-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.widget-change {
  font-size: 0.75rem;
  font-weight: 500;
}

.widget-change.positive {
  color: #059669;
}

.widget-change.negative {
  color: #dc2626;
}

/* Legacy tab styles removed - now using sidebar navigation */

/* Approved/Not-Approved toggle on Enquiries section */
.enquiries-toggle {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: 0.5rem;
  padding: 0.25rem;
  gap:10px;
}

    .enquiries-toggle .toggle-btn {
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        font-size: 0.875rem;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s ease;
        border: none;
    }

.enquiries-toggle .toggle-btn:hover:not(.active) {
  
}

.enquiries-toggle .toggle-btn.active {
  border: 2px ridge grey;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Enquiry Details modal */
.enquiry-modal {
  max-width: 720px;
  max-height: 90vh;
}

.enquiry-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.enquiry-section:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.enquiry-section-title {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.enquiry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem;
}

.enquiry-grid-item {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.enquiry-grid-item.full-width {
  grid-column: span 2;
}

.enquiry-grid-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.enquiry-grid-value {
  font-size: 0.9375rem;
  color: #0f172a;
  font-weight: 500;
  word-break: break-word;
}

.enquiry-empty {
  font-size: 0.875rem;
  color: #94a3b8;
  font-style: italic;
}

/* Generic form-input style used by the New Direct Enquiry modal and any
   future create/edit forms. Roomy padding + rounded corners match the
   buttons elsewhere in the console; subtle focus ring keeps keyboard nav
   visible without being noisy. */
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.form-input:hover {
  border-color: #94a3b8;
}

.form-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

textarea.form-input {
  resize: vertical;
  min-height: 80px;
  line-height: 1.4;
}

/* When the form-input sits inside an enquiry-grid-item, the existing
   label spacing is too tight — give the input a bit of breathing room. */
.enquiry-grid-item .form-input {
  margin-top: 0.25rem;
}

.enquiry-warning {
  background: #fef3c7;
  color: #92400e;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

/* Provisioning Process modal */
.provisioning-modal {
  max-width: 520px;
}

.provisioning-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.prov-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.prov-step.active {
  background: #eff6ff;
  border-color: #3b82f6;
}

.prov-step.done {
  background: #f0fdf4;
  border-color: #10b981;
}

.prov-step.error {
  background: #fef2f2;
  border-color: #dc2626;
}

.prov-step-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.prov-step.active .prov-step-icon {
  background: #3b82f6;
  color: white;
}

.prov-step.done .prov-step-icon {
  background: #10b981;
  color: white;
}

.prov-step.done .prov-step-icon::before {
  content: '✓';
}

.prov-step.done .prov-step-icon span,
.prov-step.done .prov-step-icon {
  font-size: 1rem;
}

.prov-step.error .prov-step-icon {
  background: #dc2626;
  color: white;
}

.prov-step-label {
  flex: 1;
  font-size: 0.875rem;
  color: #0f172a;
}

.prov-step-status {
  font-size: 0.75rem;
  color: #64748b;
}

.provisioning-progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.provisioning-bar {
  width: 100%;
  height: 0.5rem;
  background: #e2e8f0;
  border-radius: 0.25rem;
  overflow: hidden;
}

.provisioning-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  transition: width 0.4s ease;
}

.provisioning-status-text {
  font-size: 0.8125rem;
  color: #64748b;
  text-align: center;
}

/* OrgUrl availability status under add-customer input */
.orgurl-status {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  min-height: 1rem;
  display: block;
}

.orgurl-status.checking { color: #64748b; }
.orgurl-status.available { color: #059669; }
.orgurl-status.taken { color: #dc2626; }
.orgurl-status.invalid { color: #dc2626; }

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

/* Inline status switch in tables */
.status-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.status-switch input {
  display: none;
}

.status-switch-track {
  width: 36px;
  height: 20px;
  background: #cbd5e1;
  border-radius: 10px;
  position: relative;
  transition: background 0.2s ease;
}

.status-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.status-switch input:checked + .status-switch-track {
  background: #10b981;
}

.status-switch input:checked + .status-switch-track::after {
  transform: translateX(16px);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
}

/* Tables */
.customers-table-container,
.revenue-table-container,
.tickets-table-container {
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.customers-table,
.revenue-table,
.tickets-table {
  width: 100%;
  border-collapse: collapse;
}

.customers-table th,
.revenue-table th,
.tickets-table th {
  background: #f8fafc;
  padding: 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
}

.customers-table td,
.revenue-table td,
.tickets-table td {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
  color: #374151;
}

.customers-table tr:last-child td,
.revenue-table tr:last-child td,
.tickets-table tr:last-child td {
  border-bottom: none;
}

.customers-table tr:hover,
.revenue-table tr:hover,
.tickets-table tr:hover {
  background: #f8fafc;
}

/* Customer Table Specific */
.customer-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.customer-logo {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.customer-details {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.customer-name {
  font-weight: 600;
  color: #0f172a;
}

.customer-subdomain {
  font-size: 0.75rem;
  color: #64748b;
}

.usage-bar {
  width: 100px;
  height: 0.5rem;
  background: #e2e8f0;
  border-radius: 0.25rem;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.3s ease;
}

.usage-text {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
}

.invoice-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.invoice-date {
  font-weight: 500;
  color: #0f172a;
}

.invoice-amount {
  font-size: 0.75rem;
  color: #64748b;
}

.table-actions {
  display: flex;
  gap: 0.5rem;
}

.table-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.table-btn.edit {
  background: #eff6ff;
  color: #2563eb;
}

.table-btn.edit:hover {
  background: #dbeafe;
}

.table-btn.view {
  background: #f0fdf4;
  color: #166534;
}

.table-btn.view:hover {
  background: #dcfce7;
}

.table-btn.delete {
  background: #fef2f2;
  color: #dc2626;
}

.table-btn.delete:hover {
  background: #fee2e2;
}

/* Status Badges */
.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
}

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

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

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

.status-badge.open {
  background: #eff6ff;
  color: #2563eb;
}

.status-badge.in-progress {
  background: #fef3c7;
  color: #92400e;
}

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

.status-badge.closed {
  background: #f1f5f9;
  color: #64748b;
}

.priority-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.priority-badge.urgent {
  background: #fef2f2;
  color: #dc2626;
}

.priority-badge.high {
  background: #fef3c7;
  color: #92400e;
}

.priority-badge.medium {
  background: #eff6ff;
  color: #2563eb;
}

.priority-badge.low {
  background: #f0fdf4;
  color: #166534;
}

/* Revenue Filters */
.revenue-filters {
  display: flex;
  gap: 0.75rem;
}

.filter-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  background: white;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Revenue Summary */
.revenue-summary {
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  padding: 2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.revenue-chart-placeholder {
  color: #64748b;
}

.revenue-chart-placeholder h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

/* Tickets Filters */
.tickets-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

/* Templates Grid */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.template-category {
  background: white;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.category-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  padding: 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  margin: 0;
}

.template-list {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.template-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

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

.template-info {
  flex: 1;
}

.template-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.template-description {
  font-size: 0.75rem;
  color: #64748b;
}

.template-actions {
  display: flex;
  gap: 0.5rem;
}

/* Wizard Modal */
.wizard-modal {
  max-width: 700px;
  max-height: 90vh;
}

.wizard-progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-left: 1rem;
}

.progress-bar {
  width: 200px;
  height: 0.5rem;
  background: #e2e8f0;
  border-radius: 0.25rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.75rem;
  color: #64748b;
  text-align: center;
}

.wizard-steps {
  min-height: 400px;
}

.wizard-step {
  display: none;
}

.wizard-step.active {
  display: block;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.step-description {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

/* Logo Upload */
.logo-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem;
  border: 2px dashed #cbd5e1;
  border-radius: 0.75rem;
  background: #f8fafc;
  text-align: center;
}

.logo-preview {
  width: 4rem;
  height: 4rem;
  border-radius: 0.5rem;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1.5rem;
}

.upload-btn {
  padding: 0.5rem 1rem;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* Care Models Selection */
.care-models-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.care-model-option {
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.care-model-option:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.care-model-option.selected {
  border-color: #2563eb;
  background: #eff6ff;
}

.care-model-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.care-model-checkbox {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #d1d5db;
  border-radius: 0.25rem;
  position: relative;
  flex-shrink: 0;
}

.care-model-option.selected .care-model-checkbox {
  background: #2563eb;
  border-color: #2563eb;
}

.care-model-option.selected .care-model-checkbox::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
}

.care-model-info {
  flex: 1;
}

.care-model-name {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.care-model-description {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.care-model-services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.service-tag {
  padding: 0.25rem 0.5rem;
  background: #f1f5f9;
  color: #475569;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.care-model-option.selected .service-tag {
  background: #dbeafe;
  color: #1d4ed8;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 0.75rem;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideInUp 0.3s ease-out;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #0f172a;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  padding: 0.25rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.btn-quaternary,
.btn-tertiary,
.btn-secondary,
.btn-primary {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-secondary {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

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

.btn-primary {
  background: #2563eb;
  color: white;
}

    .btn-primary:hover {
        background: #0c265e;
    }

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

.btn-tertiary {
    background: #82c293;
    color: white;
}

    .btn-tertiary:hover {
        background: #255231;
    }

.btn-quaternary {
    background: #ff7d63;
    color: white;
}

    .btn-quaternary:hover {
        background: #b0422c;
    }
/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Invoice Modal Styles */
.invoice-modal {
  max-width: 900px;
  max-height: 90vh;
}

.invoice-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.invoice-company-info h4 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 0.75rem;
}

.invoice-company-info p {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.invoice-details {
  text-align: right;
}

.invoice-number {
  font-size: 2rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1rem;
}

.invoice-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

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

.meta-item span {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}

.invoice-customer {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

.invoice-customer h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.customer-details {
  font-size: 0.875rem;
  line-height: 1.6;
  color: #475569;
}

.customer-details strong {
  color: #0f172a;
  font-size: 1rem;
}

.invoice-items {
  margin-bottom: 2rem;
}

.invoice-items h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1rem;
}

.items-table-container {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

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

.invoice-items-table th {
  background: #f8fafc;
  padding: 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e2e8f0;
}

.invoice-items-table td {
  padding: 1rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
  color: #374151;
}

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

.invoice-items-table tr:hover {
  background: #f8fafc;
}

.item-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  background: transparent;
}

.item-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.item-amount {
  font-weight: 600;
  color: #0f172a;
  text-align: right;
}

.item-actions {
  display: flex;
  gap: 0.5rem;
}

.item-btn {
  padding: 0.25rem;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.item-btn.delete {
  background: #fef2f2;
  color: #dc2626;
}

.item-btn.delete:hover {
  background: #fee2e2;
}

.add-item-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.add-item-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.invoice-totals {
  margin-bottom: 2rem;
  display: flex;
  justify-content: flex-end;
}

.totals-grid {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  min-width: 300px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #e2e8f0;
}

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

.total-row.total-final {
  border-top: 2px solid #e2e8f0;
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.total-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.total-final .total-label {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.total-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}

.total-final .total-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2563eb;
}

.invoice-notes {
  margin-bottom: 1rem;
}

.invoice-notes h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.invoice-notes textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  resize: vertical;
  font-family: inherit;
}

.invoice-notes textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Customer Information Modal */
.customer-info-modal {
  max-width: 1000px;
  max-height: 90vh;
}

.customer-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.customer-logo-large {
  width: 4rem;
  height: 4rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.customer-modal-info {
  flex: 1;
}

.customer-subdomain {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* Customer Overview Cards */
.customer-overview-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.overview-metric-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.overview-metric-card .metric-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.overview-metric-card .metric-icon.staff {
  background: linear-gradient(135deg, #10b981, #059669);
}

.overview-metric-card .metric-icon.clients {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.overview-metric-card .metric-icon.revenue {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.overview-metric-card .metric-icon.tickets {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.overview-metric-card .metric-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.overview-metric-card .metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.overview-metric-card .metric-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

/* Customer Details Grid */
.customer-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.customer-detail-section {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.customer-detail-section .section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1rem;
}

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

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.detail-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
  min-width: 100px;
  flex-shrink: 0;
}

.detail-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f172a;
  text-align: right;
  flex: 1;
}

.care-models-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  justify-content: flex-end;
}

.care-model-tag {
  padding: 0.25rem 0.75rem;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.license-professional {
  color: #059669;
  font-weight: 600;
}

.usage-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.usage-bar {
  width: 80px;
  height: 0.375rem;
  background: #e2e8f0;
  border-radius: 0.25rem;
  overflow: hidden;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  transition: width 0.3s ease;
}

.usage-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
}

/* Support Tickets Section */
.customer-tickets-section {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin-top:40px;
  margin-bottom: 2rem;
}

.customer-tickets-section .section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1rem;
}

.tickets-summary {
  display: flex;
  gap: 2rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.ticket-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ticket-count {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.ticket-count.open {
  color: #f59e0b;
}

.ticket-count.resolved {
  color: #10b981;
}

.ticket-count.total {
  color: #64748b;
}

.ticket-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.recent-tickets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ticket-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
}

.ticket-priority {
  width: 0.375rem;
  height: 2rem;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.ticket-priority.urgent {
  background: #ef4444;
}

.ticket-priority.medium {
  background: #f59e0b;
}

.ticket-priority.low {
  background: #10b981;
}

.ticket-info {
  flex: 1;
}

.ticket-subject {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.ticket-meta {
  font-size: 0.75rem;
  color: #64748b;
}

.ticket-status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.ticket-status-badge.urgent {
  background: #fef2f2;
  color: #dc2626;
}

.ticket-status-badge.medium {
  background: #fef3c7;
  color: #92400e;
}

/* Usage Analytics Section */
.customer-usage-section {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.customer-usage-section .section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 1rem;
}

.usage-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.analytics-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.analytics-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.analytics-icon.logins {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.analytics-icon.changes {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.analytics-icon.new-clients {
  background: linear-gradient(135deg, #10b981, #059669);
}

.analytics-icon.new-staff {
  background: linear-gradient(135deg, #ec4899, #db2777);
}

.analytics-icon.visits {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.analytics-icon.invoices {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.analytics-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.analytics-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.analytics-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.analytics-change {
  font-size: 0.625rem;
  font-weight: 500;
  margin-top: 0.125rem;
}

.analytics-change.positive {
  color: #059669;
}

.analytics-change.negative {
  color: #dc2626;
}

.analytics-change.neutral {
  color: #64748b;
}

/* Customer Creation Process Overlay */
.creation-process-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease-out;
}

.creation-process-overlay.show {
  display: flex;
}

.creation-process-content {
  background: white;
  border-radius: 1rem;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideInUp 0.4s ease-out;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.process-header {
  text-align: center;
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid #e2e8f0;
}

.process-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  animation: pulse 2s infinite;
}

.process-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.process-subtitle {
  font-size: 1rem;
  color: #64748b;
  margin: 0;
}

.process-steps {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.process-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  opacity: 0.5;
}

.process-step.active {
  background: #eff6ff;
  border: 1px solid #3b82f6;
  opacity: 1;
  transform: scale(1.02);
}

.process-step.completed {
  background: #f0fdf4;
  border: 1px solid #10b981;
  opacity: 1;
}

.step-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.process-step.active .step-icon {
  background: #3b82f6;
  color: white;
}

.process-step.completed .step-icon {
  background: #10b981;
  color: white;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.25rem;
}

.step-description {
  font-size: 0.875rem;
  color: #64748b;
}

.step-status {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid #e2e8f0;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;
}

.process-step.active .status-spinner {
  display: block;
}

.status-check {
  width: 1rem;
  height: 1rem;
  background: #10b981;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
}

.process-step.completed .status-check {
  display: flex;
}

.process-footer {
  padding: 1rem 2rem 2rem;
  border-top: 1px solid #e2e8f0;
}

.progress-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.progress-bar {
  width: 100%;
  height: 0.5rem;
  background: #e2e8f0;
  border-radius: 0.25rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8);
  transition: width 0.5s ease;
  width: 0%;
}

.progress-text {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.success-message {
  text-align: center;
  padding: 2rem;
}

.success-icon {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: #dcfce7;
  color: #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  animation: successPulse 0.6s ease-out;
}

.success-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.75rem;
}

.success-description {
  font-size: 1rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.success-details {
  background: #f8fafc;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

.detail-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}

/* Animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes successPulse {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .overview-widgets {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .customer-overview-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .customer-details-grid {
    grid-template-columns: 1fr;
  }

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

  .invoice-header {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .invoice-details {
    text-align: left;
  }

  .totals-grid {
    min-width: 250px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }

  .sidebar-title,
  .sidebar-user-info,
  .nav-item span,
  .sidebar-copyright {
    display: none;
  }

  .sidebar-header {
    padding: 1rem 0.75rem 0.75rem;
  }

  .sidebar-user {
    padding: 0.75rem;
    justify-content: center;
  }

  .sidebar-nav {
    padding: 0.75rem 0.5rem;
  }

  .nav-item {
    justify-content: center;
    padding: 0.625rem;
  }

  .sidebar-footer {
    padding: 0.5rem;
  }

  .main-content {
    padding: 1rem;
  }

  .section-page-header {
    flex-direction: column;
    gap: 1rem;
  }

  .quick-actions {
    width: 100%;
    justify-content: space-between;
  }

  .overview-widgets {
    grid-template-columns: 1fr;
  }

  .revenue-filters {
    flex-direction: column;
  }

  .tickets-filters {
    flex-direction: column;
    gap: 0.75rem;
  }

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

  .form-group.full-width {
    grid-column: span 1;
  }

  .table-actions {
    flex-direction: column;
  }

  .modal-content {
    margin: 1rem;
    width: calc(100% - 2rem);
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }

  .wizard-progress {
    margin-left: 0;
    margin-top: 0.5rem;
  }

  .progress-bar {
    width: 100%;
  }

  .invoice-items-table {
    font-size: 0.75rem;
  }

  .invoice-items-table th,
  .invoice-items-table td {
    padding: 0.5rem;
  }

  .item-actions {
    flex-direction: column;
  }

  .totals-grid {
    min-width: auto;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .customer-info {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .table-actions {
    gap: 0.25rem;
  }

  .table-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
  }

  .care-models-grid {
    gap: 0.75rem;
  }

  .care-model-services {
    justify-content: center;
  }

  .invoice-header {
    gap: 0.75rem;
  }

  .invoice-number {
    font-size: 1.5rem;
  }

  .meta-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}