/* Custom Styles for Voucher Management System */

:root {
  --primary-color: #3498db;
  --secondary-color: #2c3e50;
  --success-color: #27ae60;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --info-color: #17a2b8;
  --light-bg: #f8f9fa;
  --dark-bg: #2c3e50;
  --sidebar-width: 250px;
  --header-height: 60px;
  --content-padding: 1.5rem;
  --card-radius: 12px;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Dashboard Styles */
.main-content {
    margin-left: var(--sidebar-width);
    padding: var(--content-padding);
    min-height: 100vh;
    background-color: var(--light-bg);
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.welcome-card h1 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.today {
    border-left: 4px solid #28a745;
}

.stat-card.monthly {
    border-left: 4px solid #007bff;
}

.stat-card.total {
    border-left: 4px solid #ffc107;
}

.stat-card.agents {
    border-left: 4px solid #dc3545;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
}

.stat-card.today .stat-icon {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.stat-card.monthly .stat-icon {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.stat-card.total .stat-icon {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.stat-card.agents .stat-icon {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.stat-info h3 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.stat-info p {
    margin: 0.2rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.stat-info .amount {
    font-weight: 600;
    color: #495057;
}

/* Quick Action Cards */
.quick-action-card {
    display: block;
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.quick-action-card:hover {
    text-decoration: none;
    color: inherit;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-color: #007bff;
}

.action-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.2rem;
}

.quick-action-card h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.quick-action-card p {
    margin: 0;
    color: #6c757d;
    font-size: 0.85rem;
}

/* Rank Badge */
.rank-badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #ffc107;
    color: #212529;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-weight: 600;
    font-size: 0.8rem;
    margin-right: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Add this to your existing CSS */
.bg-purple {
    background-color: #6f42c1 !important;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  line-height: 1.6;
  color: #333;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Login Page Styles */
.login-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 400px;
  width: 100%;
}

.login-header {
  background: var(--secondary-color);
  color: white;
  padding: 30px 20px;
  text-align: center;
}

.login-header h2 {
  margin: 0;
  font-weight: 300;
  font-size: 1.8rem;
}

.login-body {
  padding: 30px;
}

.form-group {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.btn-login {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  width: 100%;
  transition: all 0.3s ease;
}

.btn-login:hover {
  background: #2980b9;
  transform: translateY(-2px);
}

.login-links {
  text-align: center;
  margin-top: 20px;
}

.login-links a {
  color: var(--primary-color);
  text-decoration: none;
}

.login-links a:hover {
  text-decoration: underline;
}

/* Dashboard Styles */
.dashboard-container {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--secondary-color);
  color: white;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
  transition: all 0.3s ease;
  z-index: 1000;
}

.sidebar-header {
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}

.sidebar-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
  background: rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--primary-color);
}

.sidebar-menu i {
  margin-right: 10px;
  width: 20px;
  text-align: center;
}

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: var(--content-padding);
}

.header {
  background: white;
  border-bottom: 1px solid #e1e5e9;
  padding: 0.75rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--secondary-color);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 15px;
}

.content {
  padding: var(--content-padding);
  max-width: 100%;
}

/* Card Styles */
.card {
  background: white;
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
  border: none;
  overflow: hidden;
}

.card-header {
  background: white;
  border-bottom: 1px solid #e1e5e9;
  padding: 1rem 1.25rem;
  border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
  font-weight: 600;
}

.card-header h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--secondary-color);
}

.card-body {
  padding: 1.25rem 1.5rem;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-color);
}

.stat-card.success {
  border-left-color: var(--success-color);
}

.stat-card.warning {
  border-left-color: var(--warning-color);
}

.stat-card.danger {
  border-left-color: var(--danger-color);
}

.stat-card.info {
  border-left-color: var(--info-color);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 5px;
}

.stat-label {
  color: #6c757d;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Table Styles - scrollable datagrid (vertical + horizontal) */
.table-responsive {
  border-radius: 10px;
  overflow: auto;
  max-height: min(70vh, 600px);
  -webkit-overflow-scrolling: touch;
}
.table-responsive .table {
  min-width: 100%;
}

.table {
  margin-bottom: 0;
}

.table th {
  background: var(--light-bg);
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: var(--secondary-color);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.table td {
  padding: 0.75rem 1rem;
  vertical-align: middle;
  font-size: 0.9375rem;
}

/* Button Styles */
.btn {
  border-radius: 6px;
  font-weight: 500;
  padding: 8px 16px;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-success {
  background: var(--success-color);
  border-color: var(--success-color);
}

.btn-warning {
  background: var(--warning-color);
  border-color: var(--warning-color);
}

.btn-danger {
  background: var(--danger-color);
  border-color: var(--danger-color);
}

.btn-info {
  background: var(--info-color);
  border-color: var(--info-color);
}

/* Badge Styles */
.badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-weight: 500;
}

/* Form Styles */
.form-label {
  font-weight: 500;
  color: var(--secondary-color);
  margin-bottom: 8px;
}

.required::after {
  content: " *";
  color: var(--danger-color);
}

/* Alert Styles */
.alert {
  border-radius: 8px;
  border: none;
  padding: 15px 20px;
}

.alert-success {
  background: #d1f2eb;
  color: #27ae60;
}

.alert-danger {
  background: #fdeaea;
  color: #e74c3c;
}

.alert-warning {
  background: #fef9e7;
  color: #f39c12;
}

.alert-info {
  background: #e8f4f8;
  color: #17a2b8;
}

/* Quick Sell Styles */
.quick-sell-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
}

.quick-sell-card .card-body {
  text-align: center;
}

.voucher-credentials {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  border-left: 4px solid var(--success-color);
}

.credential-item {
  margin-bottom: 15px;
}

.credential-label {
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 5px;
}

.credential-value {
  font-family: 'Courier New', monospace;
  background: white;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #e1e5e9;
  font-size: 1.1rem;
}

/* Progress Bars */
.progress {
  height: 8px;
  border-radius: 4px;
  background: #e9ecef;
  overflow: hidden;
}

.progress-bar {
  border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    width: 70px;
  }
  
  .sidebar .menu-text {
    display: none;
  }
  
  .main-content {
    margin-left: 70px;
  }
  
  .sidebar-menu a {
    justify-content: center;
    padding: 15px;
  }
  
  .sidebar-menu i {
    margin-right: 0;
    font-size: 1.2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .header h1 {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .content {
    padding: 15px;
  }
  
  .card-body {
    padding: 15px;
  }
  
  .table-responsive {
    font-size: 0.9rem;
  }
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
  .sidebar, .header, .btn {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0 !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Modern button styles */
.btn-modern {
    border: none;
    border-radius: 12px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

/* Card hover effects */
.card-modern {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate__animated {
    animation-duration: 0.6s;
    animation-fill-mode: both;
}

.animate__fadeInUp {
    animation-name: fadeInUp;
}

/* Glass morphism effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Pulse animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Typing animation */
.typing-container {
    display: inline-block;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-section {
        padding: 100px 0 60px;
        text-align: center;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}