/* Bizzby Founder Portal Styles */

:root {
  --cream: #FDF8F3;
  --cream-deep: #F5EDE4;
  --warm-white: #FEFCFA;
  --primary: #D4654A;
  --primary-hover: #C05539;
  --primary-light: #F2DDD6;
  --primary-glow: rgba(212, 101, 74, 0.12);
  --navy: #2C2438;
  --navy-soft: #4A3F56;
  --sage: #7B9E87;
  --sage-light: #E8F0EB;
  --gold: #C4973B;
  --gold-light: #F5EDD8;
  --gray-warm: #8E8490;
  --gray-light: #E8E2E0;
  --border: #E8E2E0;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --success: #7B9E87;
  --error: #D4654A;
}

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

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.875rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Navigation */
.nav {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav-logo img {
  height: 32px;
  width: auto;
}

.nav-menu {
  display: flex;
  gap: 2rem;
  flex: 1;
  margin-left: 3rem;
}

.nav-menu a {
  color: var(--navy-soft);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.938rem;
  transition: color 0.2s;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-user span {
  font-size: 0.875rem;
  color: var(--navy-soft);
  font-weight: 500;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.938rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:disabled {
  background: var(--gray-light);
  color: var(--gray-warm);
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: var(--cream-deep);
  color: var(--navy);
}

.btn-secondary:hover {
  background: var(--gray-light);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--navy);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-block {
  width: 100%;
}

.btn-text {
  background: none;
  border: none;
  color: var(--gray-warm);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.5rem;
}

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

/* Cards */
.card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  margin-top: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.status-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.status-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-card h3 {
  font-size: 1.125rem;
  margin: 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.813rem;
  font-weight: 600;
}

.status-badge.active {
  background: var(--sage-light);
  color: var(--sage);
}

.status-badge.inactive {
  background: var(--gray-light);
  color: var(--gray-warm);
}

.status-badge svg {
  width: 12px;
  height: 12px;
}

.status-card-content {
  color: var(--navy-soft);
  font-size: 0.938rem;
}

.status-card a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.status-card a:hover {
  text-decoration: underline;
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--warm-white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.action-btn:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.action-btn svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

/* Login Page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-deep) 100%);
}

.login-container {
  width: 100%;
  max-width: 440px;
  padding: 2rem;
}

.login-card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2.5rem;
  text-align: center;
}

.login-logo {
  margin-bottom: 2rem;
}

.login-logo img {
  height: 48px;
  width: auto;
}

.login-card h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--navy-soft);
  margin-bottom: 2rem;
  font-size: 0.938rem;
}

.login-form {
  text-align: left;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--navy);
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.success-message,
.error-message {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  text-align: center;
}

.success-message {
  background: var(--sage-light);
  color: var(--sage);
}

.success-message svg {
  color: var(--sage);
  margin-bottom: 1rem;
}

.success-message h3 {
  color: var(--sage);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.success-message p {
  margin-bottom: 0.5rem;
  font-size: 0.938rem;
}

.error-message {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

.text-muted {
  color: var(--gray-warm) !important;
  font-size: 0.875rem !important;
}

.login-footer {
  margin-top: 2rem;
  text-align: center;
  color: var(--navy-soft);
  font-size: 0.875rem;
}

.login-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* Table */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--warm-white);
}

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

thead {
  background: var(--cream-deep);
}

th {
  text-align: left;
  padding: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--navy-soft);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.938rem;
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--cream);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.938rem;
  color: var(--navy-soft);
  cursor: pointer;
  transition: all 0.2s;
}

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

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Filters */
.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.filter-group label {
  font-size: 0.813rem;
  font-weight: 600;
  color: var(--navy-soft);
}

.filter-group input,
.filter-group select {
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
}

/* Plan Card */
.plan-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: white;
  border: none;
  padding: 2.5rem;
  margin-bottom: 2rem;
}

.plan-card h2,
.plan-card h3 {
  color: white;
}

.plan-card .plan-price {
  font-size: 3rem;
  font-family: var(--font-display);
  margin: 1rem 0;
}

.plan-card .plan-features {
  list-style: none;
  margin: 1.5rem 0;
}

.plan-card .plan-features li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.plan-card .plan-features svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Usage Meter */
.usage-meter {
  margin: 1.5rem 0;
}

.usage-bar {
  height: 12px;
  background: var(--cream-deep);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.75rem 0;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--sage) 0%, var(--primary) 100%);
  border-radius: 999px;
  transition: width 0.3s;
}

.usage-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--navy-soft);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-menu {
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .card-grid,
  .quick-actions {
    grid-template-columns: 1fr;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  
  .container {
    padding: 1rem;
  }
  
  .card {
    padding: 1.5rem;
  }
}

/* Loading State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--gray-warm);
}

.loading::after {
  content: '';
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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