/* ImpactPay Custom Styles */

/* Typography - Professional Font Sizing */
h1, .h1 { font-size: 1.75rem; font-weight: 600; }
h2, .h2 { font-size: 1.5rem; font-weight: 600; }
h3, .h3 { font-size: 1.25rem; font-weight: 600; }
h4, .h4 { font-size: 1.125rem; font-weight: 600; }
h5, .h5 { font-size: 1rem; font-weight: 600; }
h6, .h6 { font-size: 0.875rem; font-weight: 600; }

:root {
        --sidebar-bg: #1a1a1a;
        --sidebar-text: #bdc3c7;
        --sidebar-active: #728B18;
        --sidebar-hover: #2a2a2a;
        --accent-color: #728B18;
        --border-color: #333333;
        --top-nav-height: 60px;
        --sidebar-width: 260px;
        --top-nav-bg: #EEECE1;
        --footer-bg: #EEECE1;
        --header-text: #434343;
        /* Typography */
        --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        --font-size-xs: 0.75rem;
        --font-size-sm: 0.875rem;
        --font-size-base: 0.9375rem;
        --font-size-lg: 1.125rem;
        --font-size-xl: 1.25rem;
        --font-size-2xl: 1.5rem;
      }

      * {
        box-sizing: border-box;
      }

      body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
        font-family: var(--font-family);
        font-size: var(--font-size-base);
        line-height: 1.5;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
      }
      
      /* Top Navigation Bar */
      .top-navbar {
        position: fixed;
        top: 0;
        left: var(--sidebar-width);
        right: 0;
        height: var(--top-nav-height);
        background-color: var(--top-nav-bg);
        border-bottom: 1px solid #d6d6d6;
        z-index: 1020;
        display: flex;
        align-items: center;
        padding: 0 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
      }
      
      .top-navbar .navbar-brand {
        color: var(--header-text);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 700;
        font-size: 1.25rem;
      }
      
      .top-navbar .navbar-brand:hover {
        color: var(--accent-color);
      }
      
      /* Sidebar Wrapper */
      .sidebar-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: var(--sidebar-width);
        background-color: var(--sidebar-bg);
        color: var(--sidebar-text);
        transition: all 0.3s ease;
        z-index: 1030;
        display: flex;
        flex-direction: column;
        border-right: 1px solid var(--border-color);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
      }
      
      .sidebar-header {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        height: var(--top-nav-height);
        background-color: rgba(0, 0, 0, 0.1);
      }
      
      .sidebar-brand {
        color: #fff;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 0.75rem;
        font-weight: 700;
        font-size: 1.25rem;
        width: 100%;
      }
      
      .sidebar-brand:hover {
        color: var(--accent-color);
        text-decoration: none;
      }
      
      .sidebar-brand img {
        height: 32px;
        width: auto;
        filter: brightness(1.2) contrast(1.1);
        background-color: rgba(255, 255, 255, 0.1);
        padding: 2px;
        border-radius: 4px;
      }
      
      .sidebar-content {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 1rem 0;
      }
      
      .sidebar-content::-webkit-scrollbar {
        width: 6px;
      }
      
      .sidebar-content::-webkit-scrollbar-track {
        background: var(--sidebar-bg);
      }
      
      .sidebar-content::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 3px;
      }
      
      .sidebar-content::-webkit-scrollbar-thumb:hover {
        background: var(--sidebar-hover);
      }
      
      .nav-section-title {
        padding: 0.75rem 1.25rem 0.5rem;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #6b8a8a;
        margin-top: 0.5rem;
      }
      
      .sidebar-nav {
        list-style: none;
        padding: 0;
        margin: 0;
      }
      
      .nav-item {
        margin: 0.25rem 0.75rem;
      }
      
      .nav-link {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        color: var(--sidebar-text);
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.2s ease;
        font-size: 0.95rem;
        position: relative;
      }
      
      .nav-link:hover:not(.disabled) {
        background-color: var(--sidebar-hover);
        color: #fff;
        transform: translateX(3px);
      }
      
      .nav-link.active {
        background-color: #728B18;
        color: #fff;
        font-weight: 500;
        box-shadow: 0 2px 8px rgba(114, 139, 24, 0.3);
      }
      
      .nav-link.active::before {
        display: none;
      }
      
      .submenu .nav-link.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 70%;
        background: #728B18;
        border-radius: 0 4px 4px 0;
        box-shadow: 0 0 10px rgba(114, 139, 24, 0.4);
        display: block;
      }
      
      .nav-link.disabled {
        color: #6b8a8a;
        cursor: not-allowed;
        opacity: 0.5;
      }
      
      .nav-link i {
        margin-right: 0.75rem;
        font-size: 1.1rem;
        width: 20px;
        text-align: center;
        flex-shrink: 0;
      }
      
      .nav-link .badge {
        margin-left: auto;
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
      }
      
      .nav-link .bi-chevron-down {
        margin-left: auto;
        transition: transform 0.3s ease;
        font-size: 0.8rem;
        flex-shrink: 0;
      }
      
      .nav-link[aria-expanded="true"] .bi-chevron-down {
        transform: rotate(180deg);
      }
      
      .submenu {
        list-style: none;
        padding: 0.5rem 0;
        margin: 0;
      }
      
      .submenu .nav-item {
        margin: 0.25rem 0.5rem 0.25rem 1.5rem;
      }
      
      .submenu .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
      }
      
      .submenu .nav-link i {
        font-size: 1rem;
        margin-right: 0.65rem;
      }
      
      /* Main Content Area */
      .main-content {
        margin-left: var(--sidebar-width);
        margin-top: var(--top-nav-height);
        min-height: calc(100vh - var(--top-nav-height));
        display: flex;
        flex-direction: column;
        transition: margin-left 0.3s ease;
      }
      
      .main-wrapper {
        flex: 1;
        padding: 2rem;
        background-color: #f8f9fa;
      }
      
      .footer {
        background-color: #EEECE1;
        color: #434343;
        text-align: center;
        padding: 1.5rem;
        font-size: 0.9rem;
        border-top: 1px solid #D6D6D6;
      }
      
      /* Profile Dropdown */
      .profile-dropdown {
        margin-left: auto;
      }
      
      .profile-btn {
        background: transparent;
        border: 1px solid #ccc;
        color: var(--header-text);
        padding: 0.5rem 1rem;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        cursor: pointer;
        transition: all 0.2s ease;
      }
      
      .profile-btn:hover {
        background-color: rgba(114, 139, 24, 0.1);
        color: var(--accent-color);
        border-color: var(--accent-color);
      }
      
      .avatar-sm {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--accent-color), var(--sidebar-active));
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 600;
        flex-shrink: 0;
      }
      
      /* Mobile Responsive */
      @media (max-width: 768px) {
        .sidebar-wrapper {
          left: calc(-1 * var(--sidebar-width));
        }
        
        .sidebar-wrapper.show {
          left: 0;
        }
        
        .main-content {
          margin-left: 0;
        }
        
        .top-navbar {
          left: 0;
          width: 100%;
        }
        
        .sidebar-toggle {
          display: flex;
          align-items: center;
          justify-content: center;
          padding: 0.5rem 0.75rem;
          background: transparent;
          border: 1px solid #ccc;
          color: var(--header-text);
          border-radius: 8px;
          cursor: pointer;
          transition: all 0.2s ease;
          margin-right: 0.5rem;
        }
        
        .sidebar-toggle:hover {
          background-color: rgba(114, 139, 24, 0.1);
          color: var(--accent-color);
          border-color: var(--accent-color);
        }
        
        .sidebar-overlay {
          display: none;
          position: fixed;
          top: 0;
          left: 0;
          width: 100%;
          height: 100vh;
          background: rgba(0, 0, 0, 0.5);
          z-index: 1025;
        }
        
        .sidebar-overlay.show {
          display: block;
        }
      }
      
      @media (min-width: 769px) {
        .sidebar-toggle {
          display: none;
        }
        
        .top-navbar {
          left: var(--sidebar-width);
        }
      }

.lead { font-size: 1.0625rem; font-weight: 400; }
.small, small { font-size: 0.8125rem; }
.text-muted { color: #6c757d !important; }

/* Card title consistency */
.card-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.card-subtitle { font-size: 0.875rem; font-weight: 400; }

/* Alert Styles */
.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* Brand Colors */
.text-primary {
  color: #728B18 !important;
}

.bg-dark {
  background-color: #1a1a1a !important;
}

/* Professional Button Styles */
.btn-primary {
  background-color: #728B18;
  border: none;
  color: white;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(114, 139, 24, 0.2);
}

.btn-primary:hover {
  background-color: #5f7614;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(114, 139, 24, 0.3);
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.25rem rgba(114, 139, 24, 0.25);
}

/* Secondary Button Styles */
.btn-outline-primary {
  border: 2px solid #728B18;
  color: #728B18;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background-color: #728B18;
  border-color: #728B18;
  color: white;
  transform: translateY(-1px);
}

/* Professional Card Styles */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  font-weight: 600;
  color: #495057;
}

/* Professional Table Styles */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  background-color: #f8f9fa;
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: #495057;
  padding: 1rem 0.75rem;
}

.table td {
  padding: 0.875rem 0.75rem;
  border-bottom: 1px solid #f1f3f4;
}

.table-hover tbody tr:hover {
  background-color: rgba(114, 139, 24, 0.04);
}

/* Professional Form Styles */
.form-control {
  border: 1px solid #ced4da;
  border-radius: 6px;
  padding: 0.625rem 0.75rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: #728B18;
  box-shadow: 0 0 0 0.25rem rgba(114, 139, 24, 0.15);
}

/* Badge Enhancements */
.badge {
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
}

/* Professional Sidebar Enhancements */
.sidebar-wrapper {
  backdrop-filter: blur(10px);
}

.nav-section-title {
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* Status Badge Colors */
.badge.bg-success {
  background-color: #198754 !important;
}

.badge.bg-warning {
  background-color: #ffc107 !important;
  color: #000 !important;
}

.badge.bg-danger {
  background-color: #dc3545 !important;
}

.badge.bg-primary {
  background-color: #728B18 !important;
}

/* Transaction Report Styles */
.table-dark th {
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

.badge {
  font-size: 0.75rem;
  font-weight: 500;
}

code {
  font-size: 0.8rem;
  font-weight: 600;
}

.btn-group .btn {
  border-radius: 0.375rem !important;
  margin-right: 0.25rem;
}

.btn-group .btn:last-child {
  margin-right: 0;
}

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

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #dee2e6;
}

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

.timeline-marker {
  position: absolute;
  left: -25px;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 2px #dee2e6;
}

.timeline-content h6 {
  font-size: 0.875rem;
}

/* Print Styles */
@media print {
  .btn, .card-header, .timeline {
    display: none !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
  }
}

/* 2FA Setup Styles */
.progress-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.step.active .step-circle {
  background-color: #0d6efd;
  color: white;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.2);
}

.step.completed .step-circle {
  background-color: #198754;
  color: white;
}

.step .step-circle {
  background-color: #e9ecef;
  color: #6c757d;
  border: 2px solid #dee2e6;
}

.step.completed .step-circle {
  background-color: #198754;
  color: white;
}

.step-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #6c757d;
  text-align: center;
  min-width: 80px;
}

.step.active .step-label {
  color: #0d6efd;
  font-weight: 600;
}

.step.completed .step-label {
  color: #198754;
}

.step-connector {
  width: 60px;
  height: 2px;
  background-color: #e9ecef;
  margin: 0 10px;
}

.step-connector.completed {
  background-color: #198754;
}

.step.active + .step-connector {
  background-color: #0d6efd;
}

.delivery-info {
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

.otp-input {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 0.5rem;
  font-family: monospace;
}

.security-feature {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background-color: #f8f9fa;
}

.delivery-status {
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

.security-tip {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background-color: #f8f9fa;
  transition: all 0.2s ease;
}

.security-tip:hover {
  background-color: #e9ecef;
  transform: translateY(-1px);
}

/* Mobile Responsive for 2FA */
@media (max-width: 576px) {
  .progress-steps {
    flex-direction: column;
    gap: 1rem;
  }

  .step-connector {
    width: 2px;
    height: 30px;
    margin: 10px 0;
  }

  .delivery-info, .delivery-status {
    font-size: 0.9rem;
  }

  .delivery-status .row {
    flex-direction: column;
    text-align: center;
  }

  .delivery-status .col-auto {
    margin-bottom: 0.5rem;
  }
}

/* User Management Table Styles */
.table-responsive {
    overflow-x: auto;
}
.table th, .table td {
    white-space: normal;
    vertical-align: middle;
    word-wrap: break-word;
}
.table td.text-break {
    word-break: break-all;
}
.table td .btn-group {
    flex-wrap: wrap;
}
.table td.text-nowrap {
    white-space: nowrap;
}
@media (max-width: 768px) {
    .table th, .table td {
        min-width: 120px;
    }
    .table td .btn-group .btn {
        margin-bottom: 2px;
    }
}

