/* Global Styles */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: #fff;
  display: flex;
  height: 100vh;
  overflow-x: hidden;
}


.profile-section {
      display: none;
      animation: fadeIn 0.4s ease-in-out;
    }
    .profile-section.active {
      display: block;
    }

    @keyframes fadeIn {
      from {opacity: 0; transform: translateY(10px);}
      to {opacity: 1; transform: translateY(0);}
    }

    /* Card for forms */
    .form-card {
      background: #fff;
      padding: 25px;
      border-radius: 12px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.08);
      max-width: 600px;
      margin: 20px auto;
    }
    .form-card h3 {
      margin-bottom: 20px;
      color: #2c3e50;
    }
    .form-group {
      margin-bottom: 18px;
    }
    .form-group label {
      display: block;
      margin-bottom: 6px;
      font-weight: 500;
      color: #444;
    }
    .form-group input {
      width: 100%;
      padding: 12px;
      border: 1px solid #ddd;
      border-radius: 8px;
      font-size: 15px;
      transition: border 0.3s;
    }
    .form-group input:focus {
      border-color: #2980b9;
      outline: none;
    }
    .btn {
      display: inline-block;
      background: #2980b9;
      color: #fff;
      padding: 12px 25px;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-size: 15px;
      transition: background 0.3s, transform 0.2s;
    }
    .btn:hover {
      background: #1c5980;
      transform: translateY(-2px);
    }
/* Sections */
.content-section {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}
.content-section.active {
  display: block;
}

/* Form card */
.form-card {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  max-width: 600px;
  margin: 30px auto;
  margin-top: 100px;
}
.form-card h3 {
  color: aquamarine;
  margin-bottom: 20px;
 }
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: mediumaquamarine;
}
.form-group input {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color:antiquewhite;
  width: 78%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
}
.form-group input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 5px rgba(37,99,235,0.3);
}
.btn {
  background: linear-gradient(45deg,#2563eb,#1d4ed8);
  color: #fff;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
}

/* Transition animation */
@keyframes fadeIn {
  from {opacity: 0; transform: translateY(10px);}
  to {opacity: 1; transform: translateY(0);}
}



/* Wrapper */
.dashboard-wrapper {
  margin-left: 10px;
  display: flex;
  width: 100%;
  height: 100%;
}

/* Sidebar */

/* Earning table content section  */

.hidden {
  display: none;
}

.active {
  display: block; /* or flex/grid depending on layout */
}


.section {
  padding: 20px;
  animation: fadeIn 0.4s ease-in-out;
}
.section h2 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #333;
}

.table-controls {
  gap: 12px;
  margin-left: 11px;
  display: flex;
   margin-bottom: 10px;
}
.search-box, select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: aquamarine;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}

.styled-table {
 margin-left: 10px;
  width: 98%;
  border-collapse: collapse;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.styled-table thead {
  background: #4CAF50;
  color: #fff;
}
.styled-table th, .styled-table td {
  padding: 12px 15px;
  text-align: left;
}
.styled-table tbody tr:nth-child(even) {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);}
.styled-table tbody tr:hover {
     background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}


/* Common base for both */
.sidebar {
  width: 250px;
  background: #111827;
  transition: transform 0.3s ease;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #4a90e2 #1e1e2d;
  z-index: 200;
  transform: translateX(0);   /* visible by default */
}

/* Hidden state */
.sidebar.active {
  transform: translateX(-100%);
}

/* Toggle button */
.sidebar-toggle {
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 300;
  background: #1f2937;
  color: #fff;
  border: none;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

/* Mobile override (just width if needed) */



.sidebar.collapsed {
  transform: translateX(-100%);
}



.sidebar-toggle:hover {
  background: #374151;
}


/* Scrollbar */

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: #1e1e2d;
}

.sidebar::-webkit-scrollbar-thumb {
  background-color: #4a90e2;
  border-radius: 10px;
}

/* Brand */
.sidebar .brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  margin-bottom: 1rem;
}
.sidebar .brand img {
margin-left: 55%;
  width: 40px;
}
.sidebar .brand h2 {
  font-size: 1.2rem;
  color: #4ade80;
  margin-left: 10px;
  white-space: nowrap;
}
.sidebar-toggle {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.4rem;
  margin-left: auto;
}

/* Sidebar Links */
.sidebar nav a,
.sidebar .menu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.2rem;
  margin: 0.2rem 0.5rem;
  border-radius: 8px;
  color: #a5b4fc;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 15px;
  white-space: nowrap;
}
.sidebar.active {
  transform: translateX(-100%);
}

.sidebar nav a i,
.sidebar .menu-toggle i {
  margin-right: 12px;
  min-width: 20px;
}

.sidebar nav a span,
.sidebar .menu-toggle span {
  flex: 1;
}

.sidebar nav a:hover,
.sidebar nav a.active,
.sidebar .menu-toggle:hover {
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Menu Toggle with Arrow */
.menu-toggle {
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}

.menu-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
}
.menu-toggle.active .arrow {
  transform: rotate(90deg);
}

/* Submenu */
.submenu {
  max-height: 0;
  overflow: hidden;
  flex-direction: column;
  margin: 0 0.5rem;
  border-left: 2px solid rgba(255, 255, 255, 0.1);
  background: #1f2937;
  border-radius: 0 0 8px 8px;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}
.submenu a {
  padding: 0.6rem 2.5rem;
  font-size: 14px;
  color: #cbd5e1;
  display: block;
}
.submenu a:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #fff;
}
.submenu.open {
  max-height: 400px;
  opacity: 1;
}


/* Arrow animation */
.arrow {
  transition: transform 0.3s ease;
}
.menu-toggle.active .arrow {
  transform: rotate(180deg);
}

/* Main Content */
.content {
  flex: 1;
  margin-left: 250px;
  transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .content {
  margin-left: 0;
}

 


.content header h1 {
  margin-top: 67px;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}
.content header p {
  opacity: 0.8;
}

/* Cards Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}
.card {
  background: rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  backdrop-filter: blur(12px);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.card h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
}
.card .value {
  font-size: 1.4rem;
  font-weight: bold;
  color: #4ade80;
}
.card.highlight {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
}
.card.highlight .time {
  font-size: 1.8rem;
  font-weight: bold;
  animation: pulse 1.5s infinite alternate;
}
/* Shopping Cart Layout */
/* Container for Cart */
.cart-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;         /* allow wrapping on smaller screens */
  width: 100%;
  box-sizing: border-box;
}

/* Cart Items */
.cart-items {
  flex: 2;
  min-width: 300px;
  overflow-x: auto;        /* scroll if table overflows */
}

.cart-items table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.cart-items th,
.cart-items td {
  color: cornsilk;
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.cart-items th {
  background: aquamarine;
  color: #111827;
  font-weight: 600;
}

.cart-items img {
  width: 60px;
  border-radius: 5px;
}

/* Quantity Input */
.qty-input {
  width: 60px;
  padding: 5px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Remove Button */
.remove-btn {
  background: #ff4d4d;
  border: none;
  padding: 6px 12px;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.remove-btn:hover {
  background: #e63939;
}

/* Cart Summary */
.cart-summary {
  flex: 1;
 
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.1);
  max-height: fit-content;
  min-width: 260px;
}

.cart-summary h2 {
  margin-bottom: 15px;
  font-size: 18px;
  font-weight: 600;
}

.cart-summary p {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  font-size: 15px;
}

.checkout-btn {
  width: 100%;
  padding: 12px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 15px;
  font-size: 16px;
}

.checkout-btn:hover {
  background: #45a049;
}

/* ✅ Responsive Fix for Mobile */


/* Responsive */
 



/* Animations */
@keyframes pulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
} 

/* Responsive */
/* Mobile adjustments */
@media (max-width: 768px) {
  body {
    overflow: auto;
  }

  /* Sidebar should slide from left */
  .sidebar {
    position: fixed;
    top: 0;
      /* hidden by default */
    width: 220px;
    height: 100%;
    transform: translateX(-100%); 
    transition: left 0.3s ease;
    z-index: 300;
  }

  /* When active, slide into view */
  .sidebar.active {
   transform: translateX(0); 
  }

.cart-items table,
  .cart-items thead,
  .cart-items tbody,
  .cart-items th,
  .cart-items td,
  .cart-items tr {

                width: 384px;   
  }

  /* Hide headers (we’ll show labels instead) */
  .cart-items thead {
    display: none;
  }

  .cart-items tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: cadetblue;
    }
  

  .cart-items td {
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 5px;
  }

  /* Add labels before each cell */
  .cart-items td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #444;
    flex: 1;
    text-align: left;
  }

  .cart-items td img {
    width: 50px;
  }

  .qty-input {
    width: 45px;
  }
  
.active{
  margin-top: 70px;
}
  /* Ensure submenus can scroll */
  .sidebar nav {
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }

  /* Content takes full width */
  .content {
   margin-right: 8px !important;
   margin-left: -2px !important;
   
    width: 100%;
  }

  /* Sidebar toggle button */
  .sidebar-toggle {
    display: block;
    position: fixed;
    top: 15px;
    left: 15px;
    background: #1f2937;
    padding: 10px 12px;
    border-radius: 6px;
    z-index: 400;
  }

  /* Grid responsiveness */
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
  }
}
