/* Sneat-inspired OnJob Admin Theme */

:root {
  --bs-primary: #696cff;
  --bs-primary-rgb: 105, 108, 255;
  --bs-secondary: #8592a3;
  --bs-success: #71dd5a;
  --bs-info: #03c3ec;
  --bs-warning: #ffb547;
  --bs-danger: #ff3e1e;
  --bs-light: #f8f9fa;
  --bs-dark: #293040;
  --bs-body-color: #565a6e;
  --bs-border-color: #ebebf0;
  --sidebar-width: 250px;
  --topbar-height: 70px;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #f4f5fb;
  color: var(--bs-body-color);
  font-family: 'Public Sans', sans-serif;
}

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(135deg, #3a41b0 0%, #5054d4 100%);
  color: white;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 0;
}

.sidebar-brand a {
  color: white;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-brand i {
  font-size: 1.5rem;
}

.sidebar-nav {
  list-style: none;
  padding: 15px 0;
  margin: 0;
}

.sidebar-nav li {
  margin: 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: #ffc400;
}

.sidebar-nav-label {
  padding: 15px 20px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
}

.sidebar-user {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.1);
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffc400, #ffb400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #333;
}

.sidebar-user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ===== Main Wrapper ===== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ===== Topbar ===== */
.navbar {
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 15px 30px !important;
  margin: 0 !important;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0;
}

.navbar-content h5 {
  margin: 0;
  color: var(--bs-dark);
  font-weight: 600;
}

/* ===== Main Content ===== */
main {
  flex: 1;
  padding: 30px;
  background-color: #f4f5fb;
  overflow-y: auto;
}

.page-content {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  padding: 30px;
  min-height: 100%;
}

/* ===== Cards ===== */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card-header {
  background: linear-gradient(135deg, #696cff 0%, #5054d4 100%);
  color: white;
  border: none;
  padding: 20px 25px;
  border-radius: 8px 8px 0 0;
}

.card-header h5,
.card-header h4 {
  margin: 0;
  font-weight: 600;
  color: white;
}

.card-body {
  padding: 25px;
}

.card-footer {
  background: #f8f9fa;
  border-top: 1px solid var(--bs-border-color);
  padding: 15px 25px;
}

/* ===== Buttons ===== */
.btn-primary {
  background: linear-gradient(135deg, #696cff 0%, #5054d4 100%);
  border: none;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(105, 108, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #5054d4 0%, #3d47b5 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(105, 108, 255, 0.4);
  transform: translateY(-1px);
}

.btn-outline-secondary {
  color: var(--bs-primary);
  border: 2px solid var(--bs-primary);
}

.btn-outline-secondary:hover {
  background: var(--bs-primary);
  border-color: var(--bs-primary);
  color: white;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

/* ===== Forms ===== */
.form-label {
  font-weight: 600;
  color: var(--bs-dark);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-control,
.form-select {
  border: 1px solid var(--bs-border-color);
  border-radius: 6px;
  padding: 10px 12px;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(105, 108, 255, 0.1);
}

/* ===== Tables ===== */
.table {
  margin-bottom: 0;
}

.table-hover tbody tr {
  transition: all 0.2s ease;
}

.table-hover tbody tr:hover {
  background-color: #f8f9fa;
}

.table thead th {
  background-color: #f8f9fa;
  border-color: var(--bs-border-color);
  color: var(--bs-dark);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  padding: 15px;
}

.table td {
  vertical-align: middle;
  padding: 15px;
  border-color: var(--bs-border-color);
}

/* ===== Badges ===== */
.badge {
  padding: 6px 12px;
  font-weight: 600;
  border-radius: 20px;
  font-size: 0.8rem;
}

.badge-primary {
  background: #696cff;
  color: white;
}

.badge-success {
  background: #71dd5a;
  color: white;
}

.badge-warning {
  background: #ffb547;
  color: white;
}

.badge-danger {
  background: #ff3e1e;
  color: white;
}

.badge-info {
  background: #03c3ec;
  color: white;
}

/* ===== Alerts ===== */
.alert {
  border: none;
  border-radius: 8px;
  border-left: 4px solid;
  animation: slideIn 0.3s ease;
}

.alert-success {
  background: #f0fff5;
  border-left-color: #71dd5a;
  color: #155e3a;
}

.alert-danger {
  background: #fff5f2;
  border-left-color: #ff3e1e;
  color: #5c1607;
}

.alert-warning {
  background: #fffaf0;
  border-left-color: #ffb547;
  color: #5c3d1f;
}

.alert-info {
  background: #f0f7ff;
  border-left-color: #03c3ec;
  color: #084d6c;
}

@keyframes slideIn {
  from {
    transform: translateX(-20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== Modal ===== */
.modal-content {
  border: none;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: linear-gradient(135deg, #696cff 0%, #5054d4 100%);
  color: white;
  border: none;
  padding: 20px 25px;
}

.modal-header .btn-close {
  filter: brightness(0) invert(1);
}

.modal-title {
  font-weight: 600;
}

/* ===== Headings ===== */
h1, h2, h3, h4, h5, h6 {
  color: var(--bs-dark);
  font-weight: 600;
}

h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

h5 {
  font-size: 1rem;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1001;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-wrapper {
    margin-left: 0;
  }
  
  main {
    padding: 15px;
  }
  
  .page-content {
    padding: 15px;
  }
}

/* ===== Login Page ===== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #696cff 0%, #5054d4 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  padding: 40px;
}

.login-logo {
  text-align: center;
  margin-bottom: 30px;
}

.login-logo i {
  font-size: 3rem;
  color: #696cff;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bs-dark);
  text-align: center;
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--bs-body-color);
  text-align: center;
  margin-bottom: 30px;
  font-size: 0.95rem;
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form .form-control {
  height: 45px;
  padding: 10px 15px;
  font-size: 0.95rem;
}

.login-form .btn {
  height: 45px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-top: 10px;
}

/* ===== Utility Classes ===== */
.text-muted {
  color: var(--bs-body-color) !important;
}

.border-light {
  border-color: var(--bs-border-color) !important;
}

.bg-light {
  background-color: #f8f9fa !important;
}

.shadow-sm {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06) !important;
}

/* Scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}
