* {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html {
  font-size: 14px;
  height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.15rem rgba(102, 126, 234, 0.25);
}

/* Sticky Header */
.app-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1030;
  background: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.app-header .navbar {
  margin-bottom: 0;
  padding: 10px 0;
  background: white;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.4rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo i {
  font-size: 1.8rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-link {
  font-weight: 600;
  color: #495057;
  padding: 8px 16px;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
  color: #667eea;
  transform: translateY(-2px);
}

.nav-link i {
  font-size: 1.1rem;
}

/* Main Container - Flex Layout */
.app-container {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 120px);
}

/* Left Sidebar - Sticky Payment History */
.app-sidebar {
  width: 340px;
  flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid rgba(0,0,0,0.08);
  position: sticky;
  top: 66px;
  height: calc(100vh - 66px);
  overflow: hidden;
  align-self: flex-start;
  box-shadow: 2px 0 15px rgba(0,0,0,0.05);
}

/* Right Main Content */
.app-main {
  flex: 1;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  padding: 25px;
  overflow-y: auto;
  min-width: 0;
}

.app-main .container-fluid {
  max-width: 100%;
  padding: 0;
}

/* Custom Buttons */
.btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 10px 20px;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.btn-success {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
  border: none;
}

.btn-success:hover {
  background: linear-gradient(135deg, #a8e063 0%, #56ab2f 100%);
}

.btn-warning {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border: none;
  color: white;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

/* Cards */
.card {
  border: none;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0,0,0,0.12);
}

/* Badges */
.badge {
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 700;
}

/* Forms */
.form-control {
  border-radius: 12px;
  border: 2px solid #e9ecef;
  padding: 12px 16px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

/* Alerts */
.alert {
  border-radius: 15px;
  border: none;
  padding: 15px 20px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }

  .app-sidebar {
    width: 100%;
    height: 45vh;
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 1px solid rgba(0,0,0,0.08);
  }

  .app-main {
    padding: 20px 15px;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .brand-logo i {
    font-size: 1.5rem;
  }
  
  .nav-link {
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Loading Spinner */
.spinner-border {
  border-width: 3px;
}

/* Utility Classes */
.text-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-success {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.shadow-soft {
  box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.rounded-soft {
  border-radius: 20px;
}