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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f5f5f5;
  color: #000;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

header {
  background: #000;
  color: white;
  padding: 20px 30px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo img {
  height: 30px;
}

header h1 {
  font-size: 24px;
  color: white;
  margin-bottom: 0;
  font-weight: 600;
}

.logout-btn {
  padding: 10px 20px;
  background: white;
  color: #000;
  border: 2px solid white;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: #000;
  color: white;
}

.tabs {
  background: white;
  padding: 0 20px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  margin-bottom: 20px;
  display: flex;
  gap: 10px;
}

.tab {
  padding: 15px 25px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
}

.tab:hover {
  color: #000;
}

.tab.active {
  color: #000;
  border-bottom-color: #000;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  padding: 40px 20px;
}

.login-container > h1 {
  text-align: center;
  margin-bottom: 5px;
  margin-top: 20px;
  font-size: 28px;
  color: #000;
}

.login-container > .subtitle {
  text-align: center;
  margin-bottom: 30px;
  color: #000;
}

.login-box {
  background: white;
  padding: 50px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(255,255,255,0.1);
  width: 100%;
  max-width: 420px;
}

.login-logo-top {
  text-align: center;
  margin-bottom: 20px;
}

.login-logo-top img {
  height: 40px;
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo img {
  height: 50px;
}

.login-box h1 {
  text-align: center;
  margin-bottom: 5px;
  font-size: 28px;
  color: #000;
}

.login-box .subtitle {
  text-align: center;
  margin-bottom: 30px;
  color: #666;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: #000;
}

.form-group input {
  width: 100%;
  padding: 14px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #000;
}

.login-box button[type="submit"] {
  width: 100%;
  padding: 14px;
  background: #000;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.login-box button[type="submit"]:hover {
  background: #333;
}

.error-message {
  color: #d32f2f;
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
}

.subscribers-container {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.subscribers-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.subscribers-table th {
  background: #f8f9fa;
  padding: 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid #e1e8ed;
}

.subscribers-table td {
  padding: 12px;
  border-bottom: 1px solid #e1e8ed;
}

.subscribers-table tr:hover {
  background: #f8f9fa;
}

.analytics-container {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 20px 0 40px 0;
}

.stat-card {
  background: #000;
  color: white;
  padding: 25px;
  border-radius: 8px;
  border: 2px solid #000;
}

.stat-card h3 {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.8;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
}

.charts-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.chart-box {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  height: 300px;
}

.chart-box h3 {
  margin-bottom: 15px;
  font-size: 16px;
}

.chart-box canvas {
  max-height: 250px;
}

.subtitle {
  color: #7f8c8d;
  font-size: 14px;
}

.main-content {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 20px;
}

.customers-list {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  height: calc(100vh - 180px);
  overflow-y: auto;
}

.customers-list h2 {
  margin-bottom: 15px;
  font-size: 20px;
}

.customer-card {
  padding: 15px;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.customer-card.has-active-subscription {
  border-left: 4px solid #2ecc71;
  border-left-width: 4px;
}

.customer-card:hover {
  background: #f8f9fa;
  border-color: #000;
}

.customer-card.has-active-subscription:hover {
  border-left-color: #2ecc71;
}

.customer-card.active {
  background: #000;
  color: white;
  border-color: #000;
}

.customer-card.active.has-active-subscription {
  border-left-color: #2ecc71;
}

.customer-card h3 {
  font-size: 16px;
  margin-bottom: 5px;
}

.customer-card p {
  font-size: 13px;
  opacity: 0.8;
}

.customer-details {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  height: calc(100vh - 180px);
  overflow-y: auto;
}

.placeholder {
  text-align: center;
  color: #95a5a6;
  padding: 50px;
}

.detail-section {
  margin-bottom: 30px;
}

.detail-section h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #000;
  border-bottom: 2px solid #000;
  padding-bottom: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}

.info-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 4px;
}

.info-item.highlighted {
  background: #000;
  color: white;
  grid-column: 1 / -1;
}

.info-item.highlighted label {
  color: rgba(255, 255, 255, 0.8);
}

.info-item.highlighted span {
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.info-item.highlighted span:hover {
  opacity: 0.8;
}

.editable-field {
  position: relative;
}

.editable-field input {
  width: 100%;
  padding: 8px;
  border: 2px solid #fff;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.editable-field input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.2);
}

.info-item label {
  display: block;
  font-size: 12px;
  color: #7f8c8d;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.info-item span {
  font-size: 14px;
  font-weight: 500;
}

.subscription-item, .payment-item {
  padding: 12px;
  border: 1px solid #e1e8ed;
  border-radius: 4px;
  margin-bottom: 10px;
}

.status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.status.active { background: #d4edda; color: #155724; }
.status.succeeded { background: #d4edda; color: #155724; }
.status.canceled { background: #f8d7da; color: #721c24; }
.status.incomplete { background: #fff3cd; color: #856404; }

.notes-section {
  margin-top: 30px;
}

.note-form {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.note-form textarea {
  flex: 1;
  padding: 10px;
  border: 1px solid #e1e8ed;
  border-radius: 4px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}

.note-form button {
  padding: 10px 20px;
  background: #000;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.note-form button:hover {
  background: #333;
}

.note-item {
  padding: 12px;
  background: #f5f5f5;
  border-left: 3px solid #000;
  border-radius: 4px;
  margin-bottom: 10px;
  position: relative;
}

.note-item .note-date {
  font-size: 11px;
  color: #666;
  margin-bottom: 5px;
}

.note-item .note-text {
  font-size: 14px;
  line-height: 1.5;
  color: #000;
}

.note-item .delete-note {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #000;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s;
}

.note-item .delete-note:hover {
  background: #333;
}

.empty-state {
  text-align: center;
  color: #95a5a6;
  padding: 20px;
  font-size: 14px;
}
