/* ═══════════════════════════════════════════════════════════
   Autour Pro — p-style.css
   Business-style theme: white/light gray, dark navy accents
   ═══════════════════════════════════════════════════════════ */

:root {
  --pro-bg: #f8f9fb;
  --pro-surface: #ffffff;
  --pro-border: #e2e5ea;
  --pro-text: #1a1a2e;
  --pro-text-secondary: #5a6070;
  --pro-primary: #1a1a2e;
  --pro-primary-hover: #2d2d4e;
  --pro-accent: #3b82f6;
  --pro-accent-light: #eff6ff;
  --pro-danger: #ef4444;
  --pro-danger-light: #fef2f2;
  --pro-success: #10b981;
  --pro-success-light: #ecfdf5;
  --pro-warning: #f59e0b;
  --pro-radius: 8px;
  --pro-radius-lg: 12px;
  --pro-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --pro-shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
  --pro-nav-height: 56px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--pro-bg);
  color: var(--pro-text);
  min-height: 100vh;
}

/* ═══════════════════════ NAV BAR ═══════════════════════ */

.pro-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--pro-nav-height);
  background: var(--pro-surface);
  border-bottom: 1px solid var(--pro-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
}

.pro-nav-left {
  display: flex;
  align-items: center;
  gap: 32px;
}

.pro-nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--pro-text);
}

.pro-nav-brand {
  font-weight: 700;
  font-size: 18px;
}

.pro-nav-badge {
  background: var(--pro-primary);
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pro-nav-items {
  display: flex;
  gap: 4px;
}

.pro-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  background: transparent;
  color: var(--pro-text-secondary);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--pro-radius);
  cursor: pointer;
  transition: all 0.15s;
}

.pro-nav-btn:hover {
  background: var(--pro-bg);
  color: var(--pro-text);
}

.pro-nav-btn.active {
  background: var(--pro-accent-light);
  color: var(--pro-accent);
}

.pro-nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pro-org-select {
  padding: 6px 12px;
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius);
  background: var(--pro-surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--pro-text);
  cursor: pointer;
  min-width: 180px;
}

.pro-btn-link {
  color: var(--pro-text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

.pro-btn-link:hover {
  color: var(--pro-text);
}

/* ═══════════════════════ MAIN CONTENT ═══════════════════════ */

.pro-main {
  margin-top: var(--pro-nav-height);
  padding: 32px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.pro-screen {
  animation: fadeIn 0.2s ease;
}

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

.pro-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.pro-page-header h1 {
  font-size: 24px;
  font-weight: 700;
}

.pro-loading {
  text-align: center;
  padding: 64px;
  color: var(--pro-text-secondary);
  font-size: 14px;
}

.pro-error-page {
  text-align: center;
  padding: 64px;
  color: var(--pro-danger);
}

.pro-empty {
  color: var(--pro-text-secondary);
  font-size: 14px;
}

.pro-empty a {
  color: var(--pro-accent);
}

.pro-empty-state {
  text-align: center;
  padding: 64px 32px;
  color: var(--pro-text-secondary);
  background: var(--pro-surface);
  border-radius: var(--pro-radius-lg);
  border: 1px solid var(--pro-border);
}

.pro-text-muted {
  color: var(--pro-text-secondary);
  font-size: 14px;
}

/* ═══════════════════════ BUTTONS ═══════════════════════ */

.pro-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--pro-border);
  background: var(--pro-surface);
  color: var(--pro-text);
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--pro-radius);
  cursor: pointer;
  transition: all 0.15s;
}

.pro-btn:hover {
  background: var(--pro-bg);
}

.pro-btn-primary {
  background: var(--pro-primary);
  color: white;
  border-color: var(--pro-primary);
}

.pro-btn-primary:hover {
  background: var(--pro-primary-hover);
}

.pro-btn-danger {
  color: var(--pro-danger);
  border-color: var(--pro-danger);
  background: var(--pro-danger-light);
}

.pro-btn-danger:hover {
  background: var(--pro-danger);
  color: white;
}

.pro-btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.pro-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--pro-text-secondary);
  font-size: 16px;
  border-radius: var(--pro-radius);
  cursor: pointer;
  transition: all 0.15s;
}

.pro-btn-icon:hover {
  background: var(--pro-bg);
  color: var(--pro-text);
}

.pro-btn-icon.pro-btn-danger:hover {
  background: var(--pro-danger-light);
  color: var(--pro-danger);
}

/* ═══════════════════════ STAT CARDS ═══════════════════════ */

.pro-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.pro-stat-card {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--pro-shadow);
}

.pro-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--pro-text);
  line-height: 1.2;
}

.pro-stat-label {
  font-size: 13px;
  color: var(--pro-text-secondary);
  margin-top: 4px;
}

/* ═══════════════════════ SECTIONS ═══════════════════════ */

.pro-section {
  margin-bottom: 32px;
}

.pro-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.pro-section h2 {
  font-size: 18px;
  font-weight: 600;
}

/* ═══════════════════════ TABLES ═══════════════════════ */

.pro-table-wrap {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius-lg);
  overflow: hidden;
  box-shadow: var(--pro-shadow);
}

.pro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.pro-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--pro-text-secondary);
  background: var(--pro-bg);
  border-bottom: 1px solid var(--pro-border);
}

.pro-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--pro-border);
  vertical-align: middle;
}

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

.pro-table tbody tr:hover {
  background: #f9fafb;
}

.pro-td-title {
  font-weight: 500;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-td-stats {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--pro-text-secondary);
}

.pro-td-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.pro-td-member {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ═══════════════════════ BADGES ═══════════════════════ */

.pro-org-type-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

.pro-org-type-organizer {
  background: var(--pro-accent-light);
  color: var(--pro-accent);
}

.pro-org-type-venue {
  background: var(--pro-success-light);
  color: var(--pro-success);
}

.pro-status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.pro-status-published {
  background: var(--pro-success-light);
  color: var(--pro-success);
}

.pro-status-hidden {
  background: #f3f4f6;
  color: #6b7280;
}

.pro-status-flagged {
  background: #fef3c7;
  color: #d97706;
}

.pro-role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.pro-role-owner {
  background: #fef3c7;
  color: #92400e;
}

.pro-role-admin {
  background: var(--pro-accent-light);
  color: var(--pro-accent);
}

.pro-role-member {
  background: #f3f4f6;
  color: #4b5563;
}

.pro-role-select {
  padding: 4px 8px;
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius);
  font-size: 12px;
  background: var(--pro-surface);
}

/* ═══════════════════════ MEMBERS ═══════════════════════ */

.pro-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.pro-member-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--pro-bg);
  border: 1px solid var(--pro-border);
}

/* ═══════════════════════ EVENT LIST (dashboard) ═══════════════════════ */

.pro-event-list {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius-lg);
  overflow: hidden;
  box-shadow: var(--pro-shadow);
}

.pro-event-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--pro-border);
}

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

.pro-event-date-col {
  min-width: 100px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pro-event-date {
  font-size: 13px;
  font-weight: 500;
}

.pro-event-time {
  font-size: 12px;
  color: var(--pro-text-secondary);
}

.pro-event-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pro-event-title {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-event-location {
  font-size: 12px;
  color: var(--pro-text-secondary);
}

.pro-event-stats-col {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--pro-text-secondary);
}

/* ═══════════════════════ QUICK ACTIONS ═══════════════════════ */

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

/* ═══════════════════════ FORMS ═══════════════════════ */

.pro-form {
  max-width: 640px;
}

.pro-form-group {
  margin-bottom: 16px;
}

.pro-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--pro-text);
  margin-bottom: 4px;
}

.pro-form-group input,
.pro-form-group select,
.pro-form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--pro-text);
  background: var(--pro-surface);
  transition: border-color 0.15s;
}

.pro-form-group input:focus,
.pro-form-group select:focus,
.pro-form-group textarea:focus {
  outline: none;
  border-color: var(--pro-accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.pro-form-group input:disabled,
.pro-form-group select:disabled,
.pro-form-group textarea:disabled {
  background: var(--pro-bg);
  color: var(--pro-text-secondary);
  cursor: not-allowed;
}

.pro-form-group select[multiple] {
  min-height: 100px;
}

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

.pro-form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.pro-error {
  color: var(--pro-danger);
  font-size: 13px;
  margin-top: 8px;
}

/* ═══════════════════════ SETTINGS ═══════════════════════ */

.pro-settings-card {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius-lg);
  padding: 24px;
  box-shadow: var(--pro-shadow);
}

.pro-settings-card h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}

.pro-settings-danger {
  border-color: var(--pro-danger);
}

.pro-settings-danger h2 {
  color: var(--pro-danger);
}

/* ═══════════════════════ LOGIN / CREATE ORG ═══════════════════════ */

.pro-login-card,
.pro-create-org-card {
  max-width: 480px;
  margin: 80px auto;
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius-lg);
  padding: 40px;
  text-align: center;
  box-shadow: var(--pro-shadow-lg);
}

.pro-login-card h1,
.pro-create-org-card h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.pro-login-card p,
.pro-create-org-card p {
  color: var(--pro-text-secondary);
  margin-bottom: 24px;
  font-size: 14px;
}

/* Welcome / create org card */

.pro-welcome-card {
  max-width: 580px;
  margin: 40px auto;
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius-lg);
  padding: 40px;
  box-shadow: var(--pro-shadow-lg);
}

.pro-welcome-header {
  text-align: center;
  margin-bottom: 32px;
}

.pro-welcome-header svg {
  margin-bottom: 12px;
}

.pro-welcome-header h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
}

.pro-welcome-header p {
  color: var(--pro-text-secondary);
  font-size: 15px;
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto;
}

.pro-optional {
  color: var(--pro-text-secondary);
  font-weight: 400;
  font-size: 12px;
}

.pro-type-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pro-type-check {
  cursor: pointer;
}

.pro-type-check input {
  display: none;
}

.pro-type-check-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px;
  border: 2px solid var(--pro-border);
  border-radius: var(--pro-radius-lg);
  text-align: center;
  transition: all 0.15s;
}

.pro-type-check-body span {
  font-size: 14px;
  font-weight: 600;
}

.pro-type-check-body small {
  font-size: 12px;
  color: var(--pro-text-secondary);
  line-height: 1.3;
}

.pro-type-check input:checked + .pro-type-check-body {
  border-color: var(--pro-accent);
  background: var(--pro-accent-light);
}

.pro-type-check:hover .pro-type-check-body {
  border-color: var(--pro-accent);
}

.pro-btn-lg {
  width: 100%;
  justify-content: center;
  padding: 12px 24px;
  font-size: 15px;
  margin-top: 8px;
}

/* ═══════════════════════ MODAL ═══════════════════════ */

.pro-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s;
}

.pro-modal {
  background: var(--pro-surface);
  border-radius: var(--pro-radius-lg);
  box-shadow: var(--pro-shadow-lg);
  width: 90vw;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
}

.pro-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--pro-border);
}

.pro-modal-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.pro-modal-close {
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--pro-text-secondary);
  cursor: pointer;
  padding: 0 4px;
}

.pro-modal-close:hover {
  color: var(--pro-text);
}

.pro-modal-body {
  padding: 24px;
}

/* ═══════════════════════ TOAST ═══════════════════════ */

.pro-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--pro-radius);
  font-size: 14px;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s;
  box-shadow: var(--pro-shadow-lg);
}

.pro-toast-show {
  opacity: 1;
  transform: translateY(0);
}

.pro-toast-success {
  background: var(--pro-success);
  color: white;
}

.pro-toast-error {
  background: var(--pro-danger);
  color: white;
}

.pro-toast-info {
  background: var(--pro-primary);
  color: white;
}

/* ═══════════════════════ ANALYTICS ═══════════════════════ */

.pro-period-selector {
  display: flex;
  gap: 4px;
}

.pro-period-selector .pro-btn-sm.active {
  background: var(--pro-accent-light);
  color: var(--pro-accent);
  border-color: var(--pro-accent);
}

.pro-chart-card {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius-lg);
  padding: 20px;
  box-shadow: var(--pro-shadow);
}

.pro-chart-card canvas {
  max-height: 280px;
}

/* ═══════════════════════ VENUES ═══════════════════════ */

.pro-venues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.pro-venue-card {
  background: var(--pro-surface);
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius-lg);
  overflow: hidden;
  box-shadow: var(--pro-shadow);
}

.pro-venue-img {
  height: 160px;
  background-size: cover;
  background-position: center;
  background-color: var(--pro-bg);
}

.pro-venue-img-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pro-text-secondary);
}

.pro-venue-info {
  padding: 16px;
}

.pro-venue-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.pro-venue-addr {
  font-size: 13px;
  color: var(--pro-text-secondary);
  margin-bottom: 8px;
}

.pro-venue-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--pro-text-secondary);
  margin-bottom: 12px;
}

.pro-venue-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pro-link-results {
  margin-top: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.pro-link-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--pro-border);
  border-radius: var(--pro-radius);
  margin-bottom: 8px;
}

/* ═══════════════════════ FILE UPLOAD ═══════════════════════ */

.pro-file-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px dashed var(--pro-border);
  border-radius: var(--pro-radius);
  background: var(--pro-bg);
  color: var(--pro-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}

.pro-file-upload:hover {
  border-color: var(--pro-accent);
  color: var(--pro-accent);
}

.pro-img-preview {
  position: relative;
  display: inline-block;
  margin-bottom: 8px;
}

.pro-img-preview img {
  max-width: 200px;
  max-height: 120px;
  border-radius: var(--pro-radius);
  border: 1px solid var(--pro-border);
  object-fit: cover;
}

.pro-img-preview .pro-btn-icon {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.6);
  color: white;
  width: 24px;
  height: 24px;
  font-size: 14px;
}

.pro-logo-preview img {
  max-width: 120px;
  max-height: 120px;
}

/* ═══════════════════════ QUILL OVERRIDES ═══════════════════════ */

.ql-toolbar.ql-snow {
  border-radius: var(--pro-radius) var(--pro-radius) 0 0;
  border-color: var(--pro-border);
}

.ql-container.ql-snow {
  border-radius: 0 0 var(--pro-radius) var(--pro-radius);
  border-color: var(--pro-border);
  font-family: inherit;
  font-size: 14px;
}

.ql-editor {
  min-height: 120px;
}

.ql-editor.ql-blank::before {
  font-style: normal;
  color: var(--pro-text-secondary);
}

/* ═══════════════════════ RESPONSIVE ═══════════════════════ */

@media (max-width: 768px) {
  .pro-nav {
    padding: 0 12px;
  }

  .pro-nav-items {
    gap: 0;
  }

  .pro-nav-btn span {
    display: none;
  }

  .pro-main {
    padding: 16px;
  }

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

  .pro-stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pro-org-select {
    min-width: 120px;
  }

  .pro-table {
    font-size: 13px;
  }

  .pro-table th,
  .pro-table td {
    padding: 8px 10px;
  }
}
