/**
 * Lead Management by TECTUM STEEL - Stylesheet Principal
 * Design modern, clean și UX friendly
 */

/* Reset și Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #667eea;
  --primary-hover: #5568d3;
  --secondary-color: #764ba2;
  --success-color: #38a169;
  --warning-color: #ed8936;
  --danger-color: #e53e3e;
  --info-color: #3182ce;

  --bg-color: #f7fafc;
  --sidebar-bg: #2d3748;
  --sidebar-active: #4a5568;
  --text-dark: #2d3748;
  --text-light: #718096;
  --border-color: #e2e8f0;

  --sidebar-width: 260px;
  --topbar-height: 60px;
}

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

/* Layout Principal */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.sidebar-header h1 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 3px;
  color: white;
}

.sidebar-header p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
}

.sidebar-menu {
  padding: 15px 0;
}

.menu-category {
  margin-bottom: 25px;
}

.menu-category-title {
  padding: 8px 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  margin-bottom: 5px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.menu-item:hover {
  background: var(--sidebar-active);
  color: white;
  border-left-color: var(--primary-color);
}

.menu-item.active {
  background: var(--sidebar-active);
  color: white;
  border-left-color: var(--primary-color);
}

.menu-item-icon {
  width: 20px;
  margin-right: 12px;
  font-size: 16px;
}

.menu-item-text {
  flex: 1;
  font-size: 14px;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  height: var(--topbar-height);
  background: white;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-left h2 {
  font-size: 20px;
  color: var(--text-dark);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background 0.2s;
  position: relative;
}

.user-menu:hover {
  background: var(--bg-color);
}

.user-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
}

.user-role {
  font-size: 12px;
  color: var(--text-light);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  display: none;
  z-index: 1001;
}

.user-menu:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 10px 15px;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: var(--bg-color);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 5px 0;
}

/* Content Area */
.content-area {
  padding: 30px;
  flex: 1;
}

.page-header {
  margin-bottom: 30px;
}

.page-title {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.page-subtitle {
  color: var(--text-light);
  font-size: 14px;
}

/* Cards */
.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

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

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
}

.card-body {
  padding: 25px;
}

.card-footer {
  padding: 15px 25px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.primary {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
}
.stat-icon.success {
  background: rgba(56, 161, 105, 0.1);
  color: var(--success-color);
}
.stat-icon.warning {
  background: rgba(237, 137, 54, 0.1);
  color: var(--warning-color);
}
.stat-icon.danger {
  background: rgba(229, 62, 62, 0.1);
  color: var(--danger-color);
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-light);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
}

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

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

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

.btn-success:hover {
  background: #2f855a;
}

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

.btn-danger:hover {
  background: #c53030;
}

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

.btn-secondary:hover {
  background: #4a5568;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

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

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-weight: 500;
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.2s;
}

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

.form-control:disabled {
  background: var(--bg-color);
  cursor: not-allowed;
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
}

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

.table thead {
  background: var(--bg-color);
}

.table th {
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-dark);
  border-bottom: 2px solid var(--border-color);
}

.table td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.table tbody tr:hover {
  background: var(--bg-color);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-primary {
  background: rgba(102, 126, 234, 0.1);
  color: var(--primary-color);
}
.badge-success {
  background: rgba(56, 161, 105, 0.1);
  color: var(--success-color);
}
.badge-warning {
  background: rgba(237, 137, 54, 0.1);
  color: var(--warning-color);
}
.badge-danger {
  background: rgba(229, 62, 62, 0.1);
  color: var(--danger-color);
}
.badge-info {
  background: rgba(49, 130, 206, 0.1);
  color: var(--info-color);
}

/* Alerts */
.alert {
  padding: 15px 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-size: 14px;
}

.alert-success {
  background: rgba(56, 161, 105, 0.1);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
}

.alert-error {
  background: rgba(229, 62, 62, 0.1);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
}

.alert-warning {
  background: rgba(237, 137, 54, 0.1);
  color: var(--warning-color);
  border-left: 4px solid var(--warning-color);
}

.alert-info {
  background: rgba(49, 130, 206, 0.1);
  color: var(--info-color);
  border-left: 4px solid var(--info-color);
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

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

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

  .topbar {
    padding: 0 15px;
  }

  .content-area {
    padding: 15px;
  }
}

/* Utilities */
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.mt-10 {
  margin-top: 10px;
}
.mt-20 {
  margin-top: 20px;
}
.mb-10 {
  margin-bottom: 10px;
}
.mb-20 {
  margin-bottom: 20px;
}
.d-flex {
  display: flex;
}
.align-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.gap-10 {
  gap: 10px;
}
.gap-20 {
  gap: 20px;
}
