/* Beyond The Sale - Client Portal Styles (Reuses CRM styles with portal branding) */

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

:root {
  --primary-color: #059669;
  --secondary-color: #047857;
  --accent-color: #34d399;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --white: #ffffff;

  /* Additional variables for consistency */
  --bg-primary: #ffffff;
  --text-primary: #1f2937;
  --surface: #f9fafb;
  --primary-600: #059669;
  --secondary-500: #047857;
  --border-light: #e5e7eb;
  --error-500: #ef4444;
  --success-500: #10b981;
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --hover-bg: rgba(0, 0, 0, 0.05);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  padding: 2rem;
}

.login-box {
  background: var(--white);
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-width: 400px;
  width: 100%;
}

.login-box h1 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.login-box p {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Dashboard Layout */
.dashboard {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: var(--white);
  border-right: 1px solid var(--border-color);
  padding: 2rem 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  /* Hide scrollbar */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar .logo {
  padding: 0 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.sidebar .logo h2 {
  color: var(--primary-color);
  font-size: 1.25rem;
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.3s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: var(--bg-light);
  color: var(--primary-color);
  border-left: 3px solid var(--primary-color);
}

.sidebar .user-info {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
}

.sidebar .user-info p {
  font-size: 0.875rem;
  color: var(--text-light);
}

.main-content {
  margin-left: 250px;
  flex: 1;
  padding: 2rem;
}

.top-bar {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.top-bar h1 {
  font-size: 1.75rem;
  color: var(--text-dark);
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  margin-bottom: 1.5rem;
}

.card h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  font-size: 1rem;
  font-family: inherit;
}

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

/* Buttons */
.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

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

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

.btn-secondary {
  background: var(--text-light);
  color: var(--white);
}

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

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--bg-light);
}

th {
  text-align: left;
  padding: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  border-bottom: 2px solid var(--border-color);
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
}

tr:hover {
  background: var(--bg-light);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-success {
  background: #d1fae5;
  color: var(--success-color);
}

.badge-warning {
  background: #fef3c7;
  color: var(--warning-color);
}

.badge-danger {
  background: #fee2e2;
  color: var(--danger-color);
}

/* Messages */
.message {
  padding: 1rem;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
}

.message.success {
  background: #d1fae5;
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.message.error {
  background: #fee2e2;
  color: var(--danger-color);
  border: 1px solid var(--danger-color);
}

/* Loading */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-light);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-primary: #1f2937;
  --text-primary: #f9fafb;
  --surface: #374151;
  --bg-light: #111827;
  --text-dark: #f9fafb;
  --text-light: #d1d5db;
  --border-color: #374151;
  --border-light: #374151;
  --white: #1f2937;
  --hover-bg: rgba(255, 255, 255, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
  .dashboard {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    position: static;
    height: auto;
  }

  .main-content {
    margin-left: 0;
  }
}
