html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* ===== NAVBAR BRAND ===== */

.navbar-brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 0;
}

.navbar-brand .brand-text {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: #1a1f2f;
  letter-spacing: -0.5px;
}

.navbar-brand .brand-sub {
  font-size: 12px;
  font-weight: 400;
  color: #8e95a5;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ===== PREMIUM LOGIN PAGE ===== */

.login-wrapper {
  display: flex;
  min-height: 100vh;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Left Panel - Branding */
.login-left {
  flex: 1.2;
  background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2f 50%, #0d1b2a 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(197, 165, 90, 0.03) 0%, transparent 60%),
              radial-gradient(circle at 70% 50%, rgba(197, 165, 90, 0.02) 0%, transparent 60%);
  animation: bgShift 20s ease-in-out infinite;
}

@keyframes bgShift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-2%, -2%); }
}

.login-left::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #c5a55a, transparent);
}

.login-left-content {
  position: relative;
  z-index: 1;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 0 auto;
}

.brand-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid rgba(197, 165, 90, 0.3);
  border-radius: 50px;
  color: #c5a55a;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.company-name {
  font-family: 'Playfair Display', serif;
  font-size: 72px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  margin: 0 0 8px 0;
  letter-spacing: -2px;
}

.company-tagline {
  font-size: 20px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 24px 0;
  letter-spacing: 2px;
}

.company-desc {
  font-size: 15px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 40px 0;
  max-width: 400px;
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
  font-weight: 400;
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(197, 165, 90, 0.15);
  color: #c5a55a;
  border-radius: 50%;
  font-size: 10px;
  flex-shrink: 0;
}

.login-left-footer {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 40px;
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Right Panel - Login Form */
.login-right {
  flex: 0.8;
  background: #f8f9fc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  animation: fadeUp 0.6s ease-out;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  margin-bottom: 24px;
}

.login-logo-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
}

.login-left-logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-left-logo {
  width: 400px;
  height: 400px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.login-left-contact {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.6;
}

.contact-item svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: #c5a55a;
}

.login-card-header h3 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1f2f;
  margin: 0 0 8px 0;
}

.login-card-header p {
  font-size: 14px;
  color: #8e95a5;
  margin: 0;
}

/* Form Elements */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #2d3348;
  margin: 0;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0a7b9;
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.2s;
}

.login-form .form-control {
  width: 100%;
  padding: 12px 14px 12px 44px;
  border: 2px solid #e8ecf4;
  border-radius: 12px;
  font-size: 14px;
  color: #2d3348;
  background: #ffffff;
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
  box-sizing: border-box;
}

.login-form .form-control:focus {
  outline: none;
  border-color: #c5a55a;
  box-shadow: 0 0 0 4px rgba(197, 165, 90, 0.1);
}

.login-form .form-control:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon {
  color: #c5a55a;
}

.login-form .form-control::placeholder {
  color: #b0b7c7;
  font-size: 13px;
}

.login-form .form-control.is-invalid {
  border-color: #dc3545;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
}

.remember-me .form-check-input {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 2px solid #d0d5e0;
  cursor: pointer;
  accent-color: #c5a55a;
  margin: 0;
}

.remember-me label {
  font-size: 13px;
  color: #5a6072;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.forgot-link {
  font-size: 13px;
  color: #c5a55a;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #b89840;
  text-decoration: underline;
}

/* Login Button */
.btn-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, #1a1f2f, #0d1b2a);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(197, 165, 90, 0.15), transparent);
  transition: left 0.5s ease;
}

.btn-login:hover::before {
  left: 100%;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 31, 47, 0.25);
}

.btn-login:active {
  transform: translateY(0);
}

.btn-arrow {
  transition: transform 0.3s ease;
}

.btn-login:hover .btn-arrow {
  transform: translateX(4px);
}

.login-footer-text {
  text-align: center;
  color: #b0b7c7;
  font-size: 12px;
}

.login-footer-text span {
  background: rgba(197, 165, 90, 0.08);
  padding: 6px 14px;
  border-radius: 6px;
  color: #8e95a5;
  font-family: 'Courier New', monospace;
  font-size: 11px;
}

/* Validation */
.text-danger {
  font-size: 12px;
  margin-top: 2px;
}

.field-validation-error {
  color: #dc3545;
  font-size: 12px;
}

.input-validation-error {
  border-color: #dc3545 !important;
}

.validation-summary-errors {
  background: rgba(220, 53, 69, 0.06);
  border: 1px solid rgba(220, 53, 69, 0.15);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #dc3545;
}

.validation-summary-errors ul {
  margin: 0;
  padding-left: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
  .login-left {
    padding: 40px;
  }

  .company-name {
    font-size: 52px;
  }
}

@media (max-width: 768px) {
  .login-wrapper {
    flex-direction: column;
  }

  .login-left {
    display: none;
  }

  .login-right {
    flex: 1;
    padding: 24px;
    min-height: 100vh;
    align-items: flex-start;
    padding-top: 60px;
  }

  .login-card {
    max-width: 100%;
  }

  .login-card-header h3 {
    font-size: 22px;
  }
}

/* Navbar auth links */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-auth .nav-link {
  padding: 6px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.nav-auth .nav-link.btn-login-link {
  background: linear-gradient(135deg, #1a1f2f, #0d1b2a);
  color: #ffffff !important;
  padding: 6px 20px;
}

.nav-auth .nav-link.btn-login-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 31, 47, 0.2);
}

.nav-auth .nav-link.text-dark:hover {
  color: #c5a55a !important;
}

.nav-auth .username-display {
  font-size: 13px;
  color: #8e95a5;
  font-weight: 500;
}

.nav-auth form {
  margin: 0;
}

.nav-auth .btn-logout-link {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.nav-auth .btn-logout-link:hover {
  background: rgba(220, 53, 69, 0.06);
}

/* ===== PREMIUM DASHBOARD LAYOUT ===== */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  background: #f5f6fa;
  margin: 0;
}

/* Sidebar */
.d-sidebar {
  width: 260px;
  background: #0a0e1a;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  transition: width 0.3s ease;
  overflow-y: auto;
}

.d-sidebar.collapsed {
  width: 72px;
}

.d-sidebar.collapsed .d-sidebar-brand,
.d-sidebar.collapsed .d-nav-label,
.d-sidebar.collapsed .d-nav-item span,
.d-sidebar.collapsed .d-sidebar-footer span,
.d-sidebar.collapsed .d-nav-badge {
  display: none;
}

.d-sidebar.collapsed .d-sidebar-header {
  justify-content: center;
  padding: 20px 0;
}

.d-sidebar.collapsed .d-sidebar-logo {
  width: 36px;
  height: 36px;
}

.d-sidebar.collapsed .d-nav-item {
  justify-content: center;
  padding: 12px;
  margin: 2px 12px;
  border-radius: 10px;
}

.d-sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.d-sidebar-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

.d-sidebar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.d-sidebar-nav {
  flex: 1;
  padding: 16px 0;
}

.d-nav-label {
  color: rgba(255, 255, 255, 0.25);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 16px 24px 8px;
  white-space: nowrap;
}

.d-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  white-space: nowrap;
}

.d-nav-item:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.d-nav-item.active {
  color: #c5a55a;
  border-left-color: #c5a55a;
  background: rgba(197, 165, 90, 0.06);
}

.d-nav-item svg {
  flex-shrink: 0;
}

.d-sidebar-footer {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.d-logout-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
  width: 100%;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.d-logout-btn:hover {
  color: #ff4d4f;
  background: rgba(255, 77, 79, 0.06);
}

.d-logout-btn svg {
  flex-shrink: 0;
}

.d-nav-logout-form {
  margin: 0;
}

.d-nav-logout {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 24px;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
  white-space: nowrap;
}

.d-nav-logout:hover {
  color: #ff4d4f;
  background: rgba(255, 77, 79, 0.06);
  border-left-color: #ff4d4f;
}

/* Main Area */
.d-main {
  flex: 1;
  margin-left: 260px;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
  min-height: 100vh;
}

.d-main.expanded {
  margin-left: 72px;
}

/* Top Header */
.d-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: #ffffff;
  border-bottom: 1px solid #eef0f5;
  position: sticky;
  top: 0;
  z-index: 100;
}

.d-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.d-toggle-btn {
  background: none;
  border: none;
  color: #5a6072;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
}

.d-toggle-btn:hover {
  background: #f0f1f5;
  color: #1a1f2f;
}

.d-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f6fa;
  padding: 8px 16px;
  border-radius: 10px;
  color: #8e95a5;
  min-width: 260px;
}

.d-search input {
  background: none;
  border: none;
  outline: none;
  font-size: 13px;
  color: #2d3348;
  font-family: 'Inter', sans-serif;
  width: 100%;
}

.d-search input::placeholder {
  color: #b0b7c7;
}

.d-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.d-icon-btn {
  background: none;
  border: none;
  color: #5a6072;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  position: relative;
  transition: all 0.2s;
  display: flex;
}

.d-icon-btn:hover {
  background: #f0f1f5;
  color: #1a1f2f;
}

.d-notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ff4d4f;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.d-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 12px 4px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.d-user:hover {
  background: #f5f6fa;
}

.d-user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1a1f2f, #0d1b2a);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c5a55a;
  font-size: 14px;
  font-weight: 600;
}

.d-user-info {
  display: flex;
  flex-direction: column;
}

.d-user-name {
  font-size: 13px;
  font-weight: 600;
  color: #2d3348;
  line-height: 1.3;
}

.d-user-role {
  font-size: 11px;
  color: #8e95a5;
  line-height: 1.3;
}

/* Page Content */
.d-page-content {
  flex: 1;
  padding: 32px;
  min-height: calc(100vh - 80px);
}

/* Dashboard Content */
.dashboard-content {
  max-width: 1400px;
}

.dashboard-header {
  margin-bottom: 28px;
}

.dashboard-title {
  font-size: 26px;
  font-weight: 700;
  color: #1a1f2f;
  margin: 0 0 4px;
}

.dashboard-date {
  font-size: 14px;
  color: #8e95a5;
  margin: 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  border: 1px solid #eef0f5;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.stat-icon-gold {
  background: rgba(197, 165, 90, 0.1);
  color: #c5a55a;
}

.stat-icon-green {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.stat-icon-red {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.stat-info h3 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1f2f;
  margin: 0 0 4px;
}

.stat-info p {
  font-size: 13px;
  color: #8e95a5;
  margin: 0;
}

.stat-change {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.stat-up {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.stat-down {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

.d-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #eef0f5;
  overflow: hidden;
}

.d-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f1f5;
}

.d-card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1a1f2f;
  margin: 0;
}

.d-card-link {
  font-size: 13px;
  color: #c5a55a;
  text-decoration: none;
  font-weight: 500;
}

.d-card-link:hover {
  text-decoration: underline;
}

.d-card-body {
  padding: 0;
}

/* Table */
.d-table {
  width: 100%;
  border-collapse: collapse;
}

.d-table th {
  padding: 12px 24px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #8e95a5;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #fafbfd;
  border-bottom: 1px solid #f0f1f5;
}

.d-table td {
  padding: 14px 24px;
  font-size: 13px;
  border-bottom: 1px solid #f5f6fa;
}

.d-table tr:last-child td {
  border-bottom: none;
}

.project-name {
  font-weight: 600;
  color: #1a1f2f;
}

.client-name {
  color: #5a6072;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.status-progress {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.status-complete {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.status-pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.deadline {
  color: #5a6072;
  font-size: 12px;
}

/* Task List */
.task-list {
  padding: 8px 0;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  border-bottom: 1px solid #f5f6fa;
  transition: background 0.2s;
}

.task-item:last-child {
  border-bottom: none;
}

.task-item:hover {
  background: #fafbfd;
}

.task-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 2px solid #d0d5e0;
  accent-color: #c5a55a;
  cursor: pointer;
  flex-shrink: 0;
}

.task-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-title {
  font-size: 13px;
  font-weight: 500;
  color: #2d3348;
}

.task-meta {
  font-size: 11px;
  color: #a0a7b9;
}

.task-priority {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.priority-high {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.priority-medium {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.priority-low {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

/* Responsive Dashboard */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .d-sidebar {
    width: 72px;
  }

  .d-sidebar .d-sidebar-brand,
  .d-sidebar .d-nav-label,
  .d-sidebar .d-nav-item span,
  .d-sidebar .d-sidebar-footer span {
    display: none;
  }

  .d-sidebar .d-sidebar-header {
    justify-content: center;
    padding: 20px 0;
  }

  .d-sidebar .d-sidebar-logo {
    width: 36px;
    height: 36px;
  }

  .d-sidebar .d-nav-item {
    justify-content: center;
    padding: 12px;
    margin: 2px 12px;
    border-radius: 10px;
  }

  .d-main {
    margin-left: 72px;
  }

  .d-header {
    padding: 12px 16px;
  }

  .d-page-content {
    padding: 16px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .d-search {
    display: none;
  }

  .d-user-info {
    display: none;
  }
}

/* ===== CUSTOMER CRUD PAGES ===== */

.page-content {
  width: 100%;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1f2f;
  margin: 0 0 4px;
}

.page-subtitle {
  font-size: 14px;
  color: #8e95a5;
  margin: 0;
}

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #1a1f2f, #0d1b2a);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 31, 47, 0.2);
  color: #ffffff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #ffffff;
  color: #2d3348;
  border: 2px solid #e8ecf4;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: #c5a55a;
  color: #c5a55a;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.2);
}

/* Alert */
.alert-success {
  padding: 14px 20px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 12px;
  color: #10b981;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Table Card */
.table-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #eef0f5;
  overflow: hidden;
  margin-top: 20px;
}

.table-header {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f1f5;
}

.table-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1a1f2f;
}

.table-wrapper {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 14px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: #8e95a5;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #fafbfd;
  border-bottom: 1px solid #f0f1f5;
  white-space: nowrap;
}

.data-table td {
  padding: 14px 20px;
  font-size: 13px;
  color: #2d3348;
  border-bottom: 1px solid #f5f6fa;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: #fafbfd;
}

.id-badge {
  display: inline-block;
  padding: 3px 10px;
  background: #f0f1f5;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #5a6072;
}

.customer-name {
  font-weight: 600;
  color: #1a1f2f;
}

.date-text {
  color: #8e95a5;
  font-size: 12px;
  white-space: nowrap;
}

.empty-row {
  text-align: center;
  color: #b0b7c7;
  padding: 48px 20px !important;
  font-size: 14px;
}

.action-btns {
  display: flex;
  gap: 6px;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-edit {
  color: #3b82f6;
  background: rgba(59, 130, 246, 0.06);
}

.btn-edit:hover {
  background: rgba(59, 130, 246, 0.12);
}

.btn-delete {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.06);
}

.btn-delete:hover {
  background: rgba(239, 68, 68, 0.12);
}

/* Form Card */
.form-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #eef0f5;
  padding: 32px;
}

.custom-form {
  max-width: 100%;
  width: 100%;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group-full {
  grid-column: 1 / -1;
}

.custom-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.custom-form .form-label {
  font-size: 13px;
  font-weight: 600;
  color: #2d3348;
  margin: 0;
}

.custom-form .required {
  color: #ef4444;
}

.custom-form .form-control {
  padding: 11px 16px;
  border: 2px solid #e8ecf4;
  border-radius: 10px;
  font-size: 14px;
  color: #2d3348;
  font-family: 'Inter', sans-serif;
  transition: all 0.25s ease;
  width: 100%;
  box-sizing: border-box;
}

.custom-form .form-control:focus {
  outline: none;
  border-color: #c5a55a;
  box-shadow: 0 0 0 4px rgba(197, 165, 90, 0.1);
}

.custom-form .form-control::placeholder {
  color: #b0b7c7;
}

.custom-form textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.custom-form .text-danger {
  font-size: 12px;
  margin-top: 2px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid #f0f1f5;
}

/* Supplier Profile Card */
#supplierProfile {
  padding: 20px 28px;
}

.supplier-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f1f5;
}

.supplier-profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c5a55a, #a88a3e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.supplier-profile-avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #eef0f5;
  flex-shrink: 0;
}

.supplier-profile-info h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1a1f2f;
}

/* Input with Icon */
.form-group.has-icon .form-control {
  padding-left: 40px;
}

.form-group.has-icon .input-wrapper {
  position: relative;
}

.form-group.has-icon .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0a7b9;
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.2s;
}

.form-group.has-icon .input-wrapper:focus-within .input-icon {
  color: #c5a55a;
}

.supplier-profile-badge {
  font-size: 12px;
  color: #c5a55a;
  font-weight: 600;
}

.supplier-profile-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.supplier-profile-details .detail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.supplier-profile-details .detail-label {
  font-size: 13px;
  font-weight: 600;
  color: #8e95a5;
  min-width: 100px;
}

.supplier-profile-details .detail-row span:last-child {
  font-size: 14px;
  color: #2d3348;
}

/* Supplier Table Image */
.supplier-table-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #eef0f5;
}

/* Supplier Form Layout */
.supplier-form-layout {
  display: flex;
  gap: 24px;
}

.supplier-form-fields {
  flex: 1;
  min-width: 0;
}

.supplier-form-image {
  width: 220px;
  flex-shrink: 0;
}

.supplier-image-card {
  background: #f9fafb;
  border: 2px dashed #dde0e8;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.supplier-image-upload {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.supplier-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #b0b7c7;
  font-size: 13px;
}

/* Supplier Form Layout */
.supplier-form-layout {
  display: flex;
  gap: 24px;
}

.supplier-form-fields {
  flex: 1;
  min-width: 0;
}

.supplier-form-image {
  width: 220px;
  flex-shrink: 0;
}

.supplier-image-card {
  background: #f9fafb;
  border: 2px dashed #dde0e8;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.supplier-image-card .form-label {
  display: block;
  margin-bottom: 4px;
}

.supplier-image-upload {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.supplier-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #b0b7c7;
  font-size: 13px;
}

@media (max-width: 768px) {
  .supplier-form-layout {
    flex-direction: column;
  }
  .supplier-form-image {
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
  }
}

/* Supplier Search */
.supplier-option-name {
  font-weight: 600;
  font-size: 14px;
  color: #2d3348;
}

.supplier-option-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 3px;
  font-size: 12px;
  color: #8e95a5;
}

.supplier-option-details span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.customer-option {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f1f5;
  transition: background 0.15s ease;
}

.customer-option:hover {
  background: #f7f8fc;
}

.customer-option.highlighted {
  background: #eef1f9;
}

/* Delete Page */
.delete-card {
  max-width: 520px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #eef0f5;
  padding: 40px;
  text-align: center;
}

.delete-icon {
  margin-bottom: 20px;
}

.delete-info p {
  font-size: 16px;
  color: #2d3348;
  margin: 0 0 6px;
}

.delete-warning {
  color: #ef4444 !important;
  font-size: 14px !important;
  font-weight: 500;
}

.delete-details {
  background: #fafbfd;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  text-align: left;
}

.detail-row {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  color: #2d3348;
  border-bottom: 1px solid #f0f1f5;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: #8e95a5;
  min-width: 80px;
  font-weight: 500;
}

.delete-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Responsive Forms */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-card {
    padding: 20px;
  }

  .delete-card {
    padding: 24px;
  }
}

/* ===== LEDGER PAGE ===== */

.ledger-summary {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.summary-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 12px 18px;
  border: 1px solid #eef0f5;
  flex: 1;
  min-width: 120px;
}

.summary-label {
  font-size: 10px;
  font-weight: 600;
  color: #8e95a5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.summary-amount {
  font-size: 16px;
  font-weight: 700;
}

.summary-credit .summary-amount {
  color: #10b981;
}

.summary-debit .summary-amount {
  color: #ef4444;
}

.summary-balance-pos .summary-amount {
  color: #10b981;
}

.summary-balance-neg .summary-amount {
  color: #ef4444;
}

.type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.type-credit {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.type-debit {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.amount-text {
  font-weight: 600;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #2d3348;
}

.balance-text {
  font-weight: 600;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: #1a1f2f;
}

.voucher-badge {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(197, 165, 90, 0.08);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #c5a55a;
  font-family: 'Courier New', monospace;
}

.desc-text {
  font-weight: 500;
  color: #2d3348;
  max-width: 220px;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== SEARCH CARD ===== */

.search-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #eef0f5;
  margin-bottom: 24px;
  overflow: hidden;
}

.search-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: #fafbfd;
  border-bottom: 1px solid #f0f1f5;
  font-size: 13px;
  font-weight: 600;
  color: #2d3348;
}

.search-card-header svg {
  color: #c5a55a;
}

.search-card-body {
  padding: 16px 20px;
}

.search-fields {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 140px;
}

.search-field label {
  font-size: 11px;
  font-weight: 600;
  color: #8e95a5;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-field .form-control {
  padding: 8px 12px;
  border: 2px solid #e8ecf4;
  border-radius: 8px;
  font-size: 13px;
  color: #2d3348;
  font-family: 'Inter', sans-serif;
  transition: all 0.25s ease;
  width: 100%;
  box-sizing: border-box;
}

.search-field .form-control:focus {
  outline: none;
  border-color: #c5a55a;
  box-shadow: 0 0 0 3px rgba(197, 165, 90, 0.08);
}

.search-field .form-control::placeholder {
  color: #b0b7c7;
  font-size: 12px;
}

.search-field-btn {
  flex: 0 0 auto;
  min-width: auto;
}

/* ===== CUSTOMER SEARCH DROPDOWN ===== */

.customer-search-wrapper {
  position: relative;
}

.customer-search-input {
  position: relative;
  display: flex;
  align-items: center;
}

.customer-search-input svg {
  position: absolute;
  left: 14px;
  pointer-events: none;
  z-index: 1;
}

.customer-search-input .form-control {
  padding-left: 40px;
}

.customer-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e8ecf4;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
  display: none;
  margin-top: 4px;
}

.customer-dropdown.show {
  display: block;
}

.customer-option {
  padding: 10px 16px;
  font-size: 14px;
  color: #2d3348;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f5f6fa;
}

.customer-option:last-child {
  border-bottom: none;
}

.customer-option:hover {
  background: rgba(197, 165, 90, 0.06);
  color: #c5a55a;
}

.supplier-option-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.supplier-option-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.supplier-option-letter {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c5a55a, #a88a3e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.supplier-opt-detail {
  font-size: 12px;
  color: #8e95a5;
}

.supplier-opt-detail:not(:last-child)::after {
  content: " • ";
  margin: 0 4px;
  color: #d0d4dd;
}

.supplier-profile-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.supplier-profile-left {
  flex-shrink: 0;
}

.supplier-profile-image-wrap {
  width: 100px;
  height: 100px;
}

.supplier-profile-pic {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #eef0f5;
}

.supplier-profile-letter {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c5a55a, #a88a3e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
}

.supplier-profile-right {
  flex: 1;
  min-width: 0;
}

@media (max-width: 768px) {
  .ledger-summary {
    flex-direction: column;
  }
}