/* ---------------------------------------
   ROOT VARIABLES (Colors etc.)
--------------------------------------- */
:root {
  --primary-color: #004466;
  --accent-color: #00b894;
  --text-color: #333;
  --background-color: #f9f9f9;
}

/* ---------------------------------------
   GLOBAL RESET (Margins, Padding, Box-sizing)
--------------------------------------- */
* {
  margin: 0; padding: 0; box-sizing: border-box;
}

/* ---------------------------------------
   BODY (Font, Colors, Background, Line Height)
--------------------------------------- */
body {
  font-family: Arial, sans-serif;
  color: var(--text-color);
  background: var(--background-color);
  line-height: 1.6;
}

/* ---------------------------------------
   CONTAINER (Max Width and Centering)
--------------------------------------- */
.container {
  width: 90%; max-width: 1200px; margin: 0 auto; padding: 20px 0;
}

/* ---------------------------------------
   HEADER + NAVIGATION (Top Bar Styling)
--------------------------------------- */
header {
  background: var(--primary-color);
  color: #fff;
  padding: 20px 0;
}
.logo img {
  max-height: 60px;
  height: auto;
  width: auto;
  object-fit: contain;
}
header .logo a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.5rem;
}
nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}
nav a {
  color: #fff;
  text-decoration: none;
}
nav a:hover {
  text-decoration: underline;
}

/* ---------------------------------------
   MAIN CONTENT
--------------------------------------- */
main {
  margin: 40px 0;
}

/* ---------------------------------------
   FOOTER
--------------------------------------- */
footer {
  background: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 20px 0;
}

/* ---------------------------------------
   BUTTONS (General Styling)
--------------------------------------- */
.button {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent-color);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
}
.button:hover {
  background: #019875;
}

/* ---------------------------------------
   TABLES (General Styling)
--------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
table thead {
  background: var(--primary-color);
  color: #fff;
}
table th, table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}
table tr:nth-child(even) {
  background: #f2f2f2;
}

/* ---------------------------------------
   FORMS (Inputs, Select, Textarea, Buttons)
--------------------------------------- */
form input, form select, form textarea {
  width: 100%;
  padding: 8px;
  margin: 5px 0 15px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
}
form button {
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 4px;
}
form button:hover {
  background: #019875;
}

/* ---------------------------------------
   RESPONSIVE TABLES (Mobile Friendly)
--------------------------------------- */
@media (max-width: 768px) {
  nav ul {
    flex-direction: column;
    align-items: flex-start;
  }
  table, thead, tbody, th, td, tr {
    display: block;
  }
  table tr {
    margin-bottom: 15px;
  }
  table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }
  table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 45%;
    text-align: left;
    font-weight: bold;
  }
}

/* ---------------------------------------
   ADMIN PANEL STYLES
--------------------------------------- */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
}
.admin-sidebar {
  width: 220px;
  background: var(--primary-color);
  color: #fff;
  padding: 20px;
}
.admin-sidebar h2 {
  margin-bottom: 20px;
}
.admin-sidebar nav ul {
  list-style: none;
  padding: 0;
}
.admin-sidebar nav ul li {
  margin-bottom: 15px;
}
.admin-sidebar nav ul li a {
  color: #fff;
  text-decoration: none;
}
.admin-sidebar nav ul li a:hover {
  text-decoration: underline;
}
.admin-main {
  flex: 1;
  padding: 40px;
  background: var(--background-color);
}
.admin-widgets {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}
.admin-widgets .widget {
  flex: 1 1 200px;
  background: var(--primary-color);
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.2s;
}
.admin-widgets .widget:hover {
  transform: translateY(-5px);
}
.admin-widgets .widget-total { background: #2980b9; }
.admin-widgets .widget-deposit { background: #27ae60; }
.admin-widgets .widget-withdrawal { background: #e67e22; }
.admin-widgets .widget-pending { background: #8e44ad; }
canvas#adminChart {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin: 40px 0;
}
.admin-table thead {
  background: var(--primary-color);
  color: #fff;
}
.admin-table th, .admin-table td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
}
.admin-table tr:nth-child(even) {
  background: var(--background-color);
}

/* ---------------------------------------
   RESPONSIVE ADMIN PANEL WIDGETS
--------------------------------------- */
@media (max-width: 768px) {
  .admin-widgets {
    flex-direction: column;
  }
}

/* ---------------------------------------
   USER SIDEBAR LOGO + USERNAME STYLING
   (Flex container for logo + username, colors)
--------------------------------------- */
.welcome-container {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding: 0 10px;
}
.sidebar-logo {
  height: 50px;      /* fixed height to ensure correct size */
  width: auto;
  display: block;
  object-fit: contain;
}
.username-highlight {
  color: var(--accent-color);
  font-size: 1.2rem;
  white-space: nowrap;
}

/* ---------------------------------------
   USER SIDEBAR LOGO + USERNAME MOBILE RESPONSIVE
--------------------------------------- */
@media (max-width: 480px) {
  .welcome-container {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .sidebar-logo {
    height: 40px; /* smaller fixed height for mobile */
    width: auto;
  }
  .username-highlight {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.1rem;
    white-space: nowrap;
  }
  .admin-table {
  width: 100%;
  border-collapse: collapse;
}
  .admin-table td,
  .admin-table th {
  word-break: break-word;
  padding: 8px;
  border: 1px solid #ddd;
  }
  #animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  }
}
