/* Top bar styles */
.top-bar {
  background-color: #2e7d32; /* Green color */
  color: white;
  padding: 15px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
}

.top-bar h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Main container for sidebar and content */
.main-container {
  display: flex;
  height: calc(100vh - 60px); /* Account for top bar height */
}

/* Sidebar nav styles */
#navbar-container {
  width: 220px;
  background-color: white;
  height: 100%;
  overflow-y: auto;
  box-shadow: 3px 0 10px rgba(0,0,0,0.1);
  z-index: 10;
}

nav {
  padding: 20px 0;
}

nav ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

nav ul li {
  margin: 0;
}

nav ul li a {
  color: #2d3748;
  text-decoration: none;
  display: block;
  padding: 14px 25px 14px 30px;
  transition: all 0.3s ease;
  font-weight: 500;
  background-color: #fff;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  font-size: 15px;
  letter-spacing: 0.3px;
}

nav ul li:first-child a {
  border-top: 1px solid #f0f0f0;
}

nav ul li a:hover {
  background-color: #f8f9fa;
  box-shadow: inset 4px 0 0 #2e7d32;
  color: #1a202c;
}

nav ul li a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(to right, rgba(46, 125, 50, 0.05), transparent);
  transition: width 0.3s ease;
  z-index: -1;
}

nav ul li a:hover::before {
  width: 100%;
}

nav ul li a::after {
  content: "→";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  color: #2e7d32;
}

nav ul li a:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(3px);
}

nav ul li a:active {
  transform: translateY(0);
}

/* Main content area */
#main-content-area {
  flex: 1;
  padding: 25px;
  overflow-y: auto;
  background-color: #f8f9fa;
}

/* Remove navbar type specific background colors since we're using white sidebar */
.admin-nav, .user-nav {
  background-color: transparent;
}

/* Styles from admin/management/users/index.html */
.user-table-container {
  overflow-x: auto;
}

.user-table {
  width: 100%;
}

.user-table th {
  background-color: #f5f5f5;
  font-weight: 600;
}

.user-table tr:hover {
  background-color: #f9f9f9;
}

.subscription-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.subscription-trial {
  background-color: #e8f4ff;
  color: #1e88e5;
}

.subscription-starter {
  background-color: #e0f2fe;
  color: #0288d1;
}

.subscription-growth {
  background-color: #d1fae5;
  color: #10b981;
}

.subscription-pro {
  background-color: #ede9fe;
  color: #8b5cf6;
}

.subscription-scale {
  background-color: #ffedd5;
  color: #f97316;
}

.subscription-enterprise {
  background-color: #fce7f3;
  color: #ec4899;
}

.admin-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  background-color: #d1fae5;
  color: #065f46;
  font-size: 0.8rem;
  font-weight: 500;
}

.modal-card {
  max-width: 500px;
  width: 90%;
}

.delete-confirm {
  max-width: 400px;
}

.status-tag {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.status-active {
  background-color: #d1fae5;
  color: #065f46;
}

.status-inactive {
  background-color: #e5e7eb;
  color: #4b5563;
}

.status-suspended {
  background-color: #fee2e2;
  color: #b91c1c;
}

/* Styles from pages/user/bot-settings.html */
.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    background: #f1f1f1;
    border: none;
    cursor: pointer;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
    font-weight: 600;
    transition: background 0.3s;
}

.tab-button.active {
    background: #fff;
    border-bottom: 1px solid #fff;
    margin-bottom: -1px;
    color: #007bff;
}

.tab-button:hover:not(.active) {
    background: #e9ecef;
}

.tab-pane {
    display: none;
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    min-height: 150px;
}

.tab-pane.active {
    display: block;
}

/* API Key Management Styles */
.api-key-section {
    margin-top: 20px;
}

.api-key-generator {
    margin: 30px 0;
}

.generate-btn {
    position: relative;
    padding: 15px 30px;
    background: linear-gradient(135deg, #28a745 0%, #218838 100%); /* Green gradient */
    color: white;
    border: none;
    border-radius: 8px; /* More rectangular */
    cursor: pointer;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 250px;
    height: 60px;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.generate-btn:active {
    transform: translateY(1px);
}

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.key-display {
    display: flex;
    margin-top: 25px;
    max-width: 600px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.key-input {
    flex: 1;
    padding: 15px;
    border: 2px solid #28a745; /* Green border */
    border-radius: 8px 0 0 8px;
    background-color: #f8f9fa;
    font-size: 16px;
    font-family: monospace;
}

.copy-btn {
    padding: 0 20px;
    background: linear-gradient(135deg, #28a745 0%, #218838 100%); /* Green gradient */
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: background 0.3s;
}

.copy-btn:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
}

.copy-icon {
    margin-right: 8px;
    font-size: 18px;
}

.hidden {
    display: none;
}

.success-msg {
    margin-top: 15px;
    padding: 12px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 8px;
    display: flex;
    align-items: center;
    animation: fadeIn 0.3s;
}

.checkmark {
    font-size: 20px;
    margin-right: 10px;
}

.error-message {
    margin-top: 20px;
    padding: 12px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}