/* Nexus Horizon ERP - Main Stylesheet */

/* ===== Base Styles ===== */
:root {
  --primary: #2c3e50;
  --secondary: #18bc9c;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --light: #f8f9fa;
  --dark: #343a40;
  --gray: #6c757d;
  --sidebar-width: 250px;
  --header-height: 60px;
  --border-radius: 0.25rem;
  --transition-speed: 0.3s;
  --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.cursor-pointer {
  cursor: pointer !important;
}

.cursor-default {
  cursor: default !important;
}

.cursor-not-allowed {
  cursor: not-allowed !important;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: #f5f5f5;
  color: var(--dark);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
}

a {
  text-decoration: none;
  color: var(--primary);
  transition: all var(--transition-speed) ease;
}

a:hover {
  color: var(--secondary);
}

/* ===== Layout ===== */
.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
}

/* ===== Sidebar ===== */
.sidebar {
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  background: var(--primary);
  color: #fff;
  transition: all var(--transition-speed) ease;
  z-index: 999;
  height: 100vh;
  position: fixed;
  overflow-y: auto;
}

.sidebar.active {
  margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar .sidebar-header {
  padding: 20px;
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar .sidebar-header h3 {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
}

.sidebar-profile {
  padding: 15px 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-profile .profile-img {
  margin-right: 15px;
  font-size: 2rem;
}

.sidebar-profile .profile-info h5 {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-profile .profile-info p {
  margin: 0;
  font-size: 1rem;
  color: #fff;
}

.sidebar ul.components {
  padding: 0;
  margin: 0;
}

.sidebar ul li a {
  padding: 12px 20px;
  font-size: 1rem;
  display: block;
  color: rgba(255, 255, 255, 0.8);
  border-left: 3px solid transparent;
}

.sidebar ul li a:hover,
.sidebar ul li.active > a {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--secondary);
}

.sidebar ul li a i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.sidebar ul li a .dropdown-toggle::after {
  float: right;
  margin-top: 8px;
}

.sidebar ul ul {
  background: rgba(0, 0, 0, 0.15);
}

.sidebar ul ul a {
  font-size: 0.9rem;
  padding-left: 50px;
}

/* ===== Content Area ===== */
#content {
  width: 100%;
  min-height: 100vh;
  transition: all var(--transition-speed) ease;
  position: relative;
  margin-left: var(--sidebar-width);
}

.sidebar.active + #content {
  margin-left: 0;
}

/* ===== Navbar ===== */
.navbar {
  padding: 15px 10px;
  border-bottom: 1px solid #eee;
  box-shadow: var(--box-shadow);
}

.navbar .dropdown-menu {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border: none;
}

.navbar .notifications .badge {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 0.65rem;
}

/* ===== Content Container ===== */
.content-container {
  padding: 20px;
}

/* ===== Cards ===== */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
  transition: transform var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.card-header-primary {
  background-color: var(--primary);
  color: #fff;
}

.card-header-secondary {
  background-color: var(--secondary);
  color: #fff;
}

/* ===== Stat Cards ===== */
.stat-card {
  padding: 20px;
  display: flex;
  align-items: center;
}

.stat-card .stat-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border-radius: 50%;
  margin-right: 15px;
}

.stat-card .stat-info h3 {
  font-size: 1.8rem;
  margin: 0;
}

.stat-card .stat-info p {
  margin: 0;
  color: var(--gray);
}

.stat-card.primary .stat-icon {
  background-color: rgba(44, 62, 80, 0.1);
  color: var(--primary);
}

.stat-card.secondary .stat-icon {
  background-color: rgba(24, 188, 156, 0.1);
  color: var(--secondary);
}

.stat-card.success .stat-icon {
  background-color: rgba(40, 167, 69, 0.1);
  color: var(--success);
}

.stat-card.warning .stat-icon {
  background-color: rgba(255, 193, 7, 0.1);
  color: var(--warning);
}

/* ===== Tables ===== */
.table {
  margin-bottom: 0;
}

.table thead th {
  border-top: none;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: var(--primary);
}

.table-hover tbody tr:hover {
  background-color: rgba(24, 188, 156, 0.05);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
  color: var(--dark);
  margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--primary);
  color: #fff !important;
  border: 1px solid var(--primary);
}

/* ===== Forms ===== */
.form-control:focus,
.form-select:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 0.25rem rgba(24, 188, 156, 0.25);
}

.form-label {
  font-weight: 500;
}

/* ===== Buttons ===== */
.btn {
  font-weight: 500;
  border-radius: var(--border-radius);
  padding: 0.5rem 1rem;
  transition: all var(--transition-speed) ease;
}

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

.btn-primary:hover,
.btn-primary:focus {
  background-color: #1a252f;
  border-color: #1a252f;
}

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

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #15a589;
  border-color: #15a589;
}

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

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

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

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

/* ===== Badges ===== */
.badge.bg-primary {
  background-color: var(--primary) !important;
}

.badge.bg-secondary {
  background-color: var(--secondary) !important;
}

/* ===== Progress Bars ===== */
.progress {
  height: 0.8rem;
  background-color: #e9ecef;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.progress-bar {
  background-color: var(--secondary);
}

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 30px;
}

.timeline:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 2px;
  background-color: #e9ecef;
}

.timeline-item {
  position: relative;
  padding-bottom: 20px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item:before {
  content: "";
  position: absolute;
  left: -34px;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--secondary);
  border: 2px solid #fff;
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--gray);
}

/* ===== Responsive Styles ===== */
@media (max-width: 768px) {
  .sidebar {
    margin-left: calc(-1 * var(--sidebar-width));
  }

  .sidebar.active {
    margin-left: 0;
  }

  #content {
    margin-left: 0;
  }

  .sidebar.active + #content {
    margin-left: var(--sidebar-width);
  }

  .stat-card .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .stat-card .stat-info h3 {
    font-size: 1.5rem;
  }
}

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

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  background-color: #fff;
}

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

.login-logo h1 {
  color: var(--primary);
  font-size: 2rem;
  margin: 0;
}

/* ===== Dashboard Widgets ===== */
.widget {
  height: 100%;
  min-height: 200px;
}

/* ===== Deal Pipeline ===== */
.pipeline-stage {
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
}

.pipeline-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.pipeline-stage-title {
  font-weight: 600;
  margin: 0;
}

.pipeline-stage-value {
  font-weight: 600;
  color: var(--primary);
}

.pipeline-card {
  background-color: #fff;
  border-radius: var(--border-radius);
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: var(--box-shadow);
}

.pipeline-card-title {
  font-weight: 600;
  margin-bottom: 5px;
}

.pipeline-card-client {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 10px;
}

.pipeline-card-value {
  font-weight: 600;
  color: var(--success);
}

/* ===== Project Status Colors ===== */
.status-active {
  color: var(--success);
}

.status-completed {
  color: var(--primary);
}

.status-on-hold {
  color: var(--warning);
}

.status-cancelled {
  color: var(--danger);
}

/* ===== Custom File Input ===== */
.custom-file-input::-webkit-file-upload-button {
  visibility: hidden;
}

.custom-file-input::before {
  content: "Select file";
  display: inline-block;
  background: linear-gradient(top, #f9f9f9, #e3e3e3);
  border: 1px solid #999;
  border-radius: 3px;
  padding: 5px 8px;
  outline: none;
  white-space: nowrap;
  cursor: pointer;
  text-shadow: 1px 1px #fff;
  font-weight: 700;
  font-size: 10pt;
}

.custom-file-input:hover::before {
  border-color: black;
}

.custom-file-input:active::before {
  background: -webkit-linear-gradient(top, #e3e3e3, #f9f9f9);
}

/* ===== Print Styles ===== */
@media print {
  .sidebar,
  .navbar,
  .no-print {
    display: none !important;
  }

  #content {
    margin-left: 0;
    width: 100%;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ===== Badge Styles ===== */
.badge {
  font-weight: 500;
  letter-spacing: 0.5px;
}

.badge-success {
  background-color: var(--success) !important;
  color: #fff !important;
}

.badge-warning {
  background-color: var(--warning) !important;
  color: #212529 !important;
}

.badge-secondary {
  background-color: var(--gray) !important;
  color: #fff !important;
}

.badge-primary {
  background-color: var(--primary) !important;
  color: #fff !important;
}

.badge-danger {
  background-color: var(--danger) !important;
  color: #fff !important;
}

.badge-info {
  background-color: #17a2b8 !important;
  color: #fff !important;
}

.badge-light {
  background-color: var(--light) !important;
  color: #212529 !important;
}

.badge-dark {
  background-color: var(--dark) !important;
  color: #fff !important;
}
