/* ==================== ROOT VARIABLES ==================== */
:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #667eea 0%, #4f46e5 100%);
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  
  --bg-primary: #f8f9ff;
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

/* ==================== RESET & BASE ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ==================== APP CONTAINER (RESPONSIVE) ==================== */
.app-container {
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
  padding-bottom: 80px;
  position: relative;
}

/* Desktop: Center with max-width, Mobile: Full width */
@media (min-width: 769px) {
  .app-container {
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
  }
}

@media (max-width: 768px) {
  .app-container {
    max-width: 100%;
  }
}

/* ==================== HEADER ==================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(102, 126, 234, 0.95);
  backdrop-filter: blur(10px);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.menu-btn, .back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.3s ease;
}

.menu-btn:hover, .back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.user-info h3, .page-title h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.role-badge.admin {
  background: rgba(239, 68, 68, 0.3);
}

.role-badge.moderator {
  background: rgba(245, 158, 11, 0.3);
}

.header-right {
  display: flex;
  gap: 10px;
}

.notification-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  position: relative;
  transition: all 0.3s ease;
}

.notification-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.notification-btn .badge, .badge-count {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--danger-color);
  color: white;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: 2px solid #667eea;
}

.badge-count {
  position: static;
  background: rgba(255, 255, 255, 0.25);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 700;
  border: none;
}

/* ==================== STATS SECTION ==================== */
.stats-section {
  padding: 15px 20px;
  display: grid;
  gap: 15px;
}

/* Desktop: 2 columns, Mobile: 1 column */
@media (min-width: 769px) {
  .stats-section {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  gap: 15px;
  align-items: center;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.stat-card.gradient-purple::before {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.stat-card.gradient-blue::before {
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.stat-card.gradient-orange::before {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.stat-card.gradient-orange .stat-icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 26px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.gradient-blue .stat-icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.stat-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.stat-date {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.stat-action {
  margin-top: 8px;
}

.reset-btn {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.reset-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(1.05);
}

/* ==================== SECTION CONTAINER ==================== */
.section-container {
  background: white;
  margin: 15px 20px;
  padding: 20px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h3 i {
  color: #667eea;
  font-size: 20px;
}

.see-all {
  font-size: 14px;
  color: #667eea;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.see-all:hover {
  color: #764ba2;
  gap: 8px;
}

/* ==================== ACTION GRID ==================== */
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

/* Responsive grid */
@media (max-width: 768px) {
  .action-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .action-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  background: var(--bg-primary);
}

.action-card:hover {
  background: #f1f5f9;
  transform: translateY(-4px);
}

.action-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.action-card:hover .action-icon {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
}

.action-icon.bg-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.action-icon.bg-green {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.action-icon.bg-orange {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.action-icon.bg-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.action-icon.bg-teal {
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.action-icon.bg-indigo {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.action-icon.bg-pink {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.action-icon.bg-yellow {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.action-icon.bg-red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.action-card span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.3;
}

/* ==================== NOTIFICATION LIST ==================== */
.notification-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notification-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.notification-item:hover {
  background: #f1f5f9;
  border-left-color: #667eea;
  transform: translateX(4px);
}

.notification-item.empty {
  justify-content: center;
  align-items: center;
  padding: 20px;
  color: var(--text-secondary);
}

.notification-item.empty i {
  font-size: 20px;
  margin-right: 8px;
}

.notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: white;
}

.notif-icon .text-success {
  color: var(--success-color);
}

.notif-icon .text-primary {
  color: #667eea;
}

.notif-icon .text-info {
  color: var(--info-color);
}

.notif-content {
  flex: 1;
}

.notif-text {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.notif-text strong {
  color: #667eea;
  font-weight: 600;
}

.amount-badge {
  display: inline-block;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 6px;
}

.notif-time {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ==================== BUTTONS ==================== */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  text-align: center;
  cursor: pointer;
}

.btn.primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn.success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn.danger {
  background: var(--danger-color);
  color: white;
}

.btn.danger:hover {
  background: #dc2626;
}

.btn.ghost {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn.ghost:hover {
  background: #667eea;
  color: white;
}

.btn.small {
  padding: 6px 12px;
  font-size: 13px;
}

.btn.big {
  padding: 14px 24px;
  font-size: 16px;
}

/* ==================== FORM INPUTS ==================== */
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  margin-bottom: 14px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

/* ==================== CARDS ==================== */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
}

.card.message {
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.card.message.success {
  background: #d1fae5;
  color: #065f46;
  border: 2px solid #10b981;
}

.card.message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 2px solid #ef4444;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card,
.section-container,
.action-card,
.notification-item {
  animation: fadeInUp 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.section-container:nth-child(1) { animation-delay: 0.3s; }
.section-container:nth-child(2) { animation-delay: 0.4s; }
.section-container:nth-child(3) { animation-delay: 0.5s; }

/* ==================== FOOTER ==================== */
.app-footer {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: white;
  margin-top: 40px;
  padding: 40px 20px 20px;
  border-radius: 30px 30px 0 0;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.footer-logo {
  text-align: center;
  margin-bottom: 10px;
}

.footer-logo i {
  font-size: 48px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.footer-logo h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-info {
  text-align: center;
}

.footer-info p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer-info i {
  color: #667eea;
  font-size: 14px;
  width: 18px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 6px 0;
}

.footer-credit {
  font-size: 12px !important;
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Footer Desktop View */
@media (min-width: 769px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    text-align: left;
  }

  .footer-logo {
    text-align: left;
  }

  .footer-info {
    text-align: left;
  }

  .footer-info p {
    justify-content: flex-start;
  }

  .footer-bottom {
    grid-column: 1 / -1;
  }
}

/* ==================== RESPONSIVE MOBILE ==================== */
@media (max-width: 480px) {
  .stat-value {
    font-size: 22px;
  }
  
  .action-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .section-container {
    margin: 15px 10px;
    padding: 16px;
  }

  .app-footer {
    padding: 30px 15px 15px;
  }
}