/* General Resets and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif; /* Modern font */
  background: #f0f2f5; /* Light grey background */
  color: #333; /* Darker text for readability */
  line-height: 1.6;
  scroll-behavior: smooth;
}

a {
  color: #dc3545;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #c82333;
  text-decoration: underline;
}

/* Header Styling */
.main-header {
  background-color: #dc3545; /* Primary blue */
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 25px; /* More padding */
  flex-wrap: nowrap; /* Prevent wrapping for header items */
}

.logo h1 {
  font-size: 1.7rem; /* Slightly smaller for better balance */
  font-weight: 700;
  letter-spacing: 1px;
  white-space: nowrap; /* Prevent logo text from breaking */
  min-width: fit-content; /* Ensure logo doesn't shrink too much */
}

/* Navigation */
.main-nav .nav-list {
  display: flex;
  list-style: none;
  align-items: center;
  margin: 0; /* Reset margin */
  padding: 0; /* Reset padding */
}

.main-nav .nav-list li {
  margin-left: 25px; /* Spacing between links */
}

.main-nav .nav-link {
  color: #fff;
  text-decoration: none;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background 0.3s ease, transform 0.2s ease;
  font-weight: 600;
  display: block; /* Make links block level for better click area */
  white-space: nowrap; /* Prevent menu items from breaking */
}

.main-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px); /* Subtle hover effect */
  text-decoration: none;
}

.main-nav .nav-link.active {
  background: #c82333; /* Darker blue for active link */
  font-weight: 700;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

.main-nav .login-btn {
  background-color: #ffc107; /* Accent yellow */
  color: #333;
  padding: 8px 20px;
  border-radius: 20px; /* Pill shape */
  font-weight: 600;
  margin-left: 30px; /* More space for login button */
}

.main-nav .login-btn:hover {
  background-color: #e0a800;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Hamburger Menu */
.hamburger {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100; /* Ensure it's above other content */
  margin-left: 20px; /* Space from logo */
}

.hamburger span {
  width: 100%;
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

/* Hamburger animation */
.hamburger.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg); /* Adjusted for better pivot */
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg); /* Adjusted for better pivot */
}

/* Main Content Container */
.container {
  max-width: 1000px; /* Slightly smaller for better content focus */
  margin: 30px auto;
  padding: 0 25px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  padding-top: 30px;
  padding-bottom: 30px;
}

/* Section Headings */
.section-title {
  color: #dc3545; /* Primary blue */
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(0, 123, 255, 0.2);
}

.section-subtitle {
  color: #333;
  font-size: 1.8rem;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  margin-left: 0px;
  position: relative;
  
}

.section-subtitle::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 80%;
  background-color: #dc3545;
  border-radius: 2px;
}

p {
  margin-bottom: 15px;
  font-size: 1rem;
  line-height: 1.8em;
}

/* Table Styling */
.table-responsive {
  overflow-x: auto; /* Ensures tables are scrollable on small screens */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling for iOS */
  margin-bottom: 20px;
}

table {
  width: 100%;
  min-width: 550px; /* Ensure tables have a minimum width to prevent squishing */
  border-collapse: separate; /* Allows border-radius on cells */
  border-spacing: 0; /* Remove default spacing */
  margin-bottom: 20px;
  border-radius: 8px; /* Rounded corners for the entire table */
  overflow: hidden; /* Ensures content respects border-radius */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

table th, table td {
  border: 1px solid #e0e0e0;
  padding: 12px 15px;
  text-align: center;
  vertical-align: middle;
}

table thead th {
  background-color: #dc3545;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9rem;
}

table tbody tr:nth-child(even) {
  background-color: #f8f9fa; /* Zebra striping */
}

table tbody tr:hover {
  background-color: #e9f5ff; /* Subtle hover effect */
}

/* List Styling */
ul, ol {
  margin-left: 25px;
  margin-bottom: 20px;
  padding-left: 0; /* Reset default padding */
}

ul li, ol li {
  margin-bottom: 8px;
  font-size: 1rem;
}

/* Highlight Link */
.highlight-link {
  font-weight: 600;
}

/* Footer */
.main-footer {
  background-color: #333;
  color: #f0f2f5;
  padding: 30px 25px;
  text-align: center;
  margin-top: 40px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.main-footer p {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #ccc;
}

.social-links a {
  margin: 0 10px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.social-links a:hover {
  transform: translateY(-3px);
}

.social-links img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1); /* Makes icons white */
}


/* Responsive Design */
@media (max-width: 992px) {
  .header-content, .footer-content {
    padding: 15px 20px;
  }
  .container {
    margin: 20px auto;
    padding: 25px 20px;
  }
  .logo h1 {
    font-size: 1.5rem;
  }
  .section-title {
    font-size: 1.8rem;
  }
  .section-subtitle {
    font-size: 1.5rem;
  }
  .main-nav .nav-list li {
    margin-left: 15px; /* Adjust spacing for slightly smaller screens */
  }
  .main-nav .login-btn {
    margin-left: 20px;
  }
}

@media (max-width: 768px) {
  .header-content {
    padding: 15px 20px; /* Consistent padding */
  }

  /* Hamburger specific styling */
  .hamburger {
    display: flex; /* Show hamburger icon */
  }

  /* Hide regular nav on mobile */
  .main-nav .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #dc3545;
    position: absolute;
    top: 65px; /* Position below header */
    left: 0;
    padding: 15px 0;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  }

  .main-nav .nav-list.active {
    display: flex; /* Show when active */
    opacity: 1;
    transform: translateY(0);
  }

  .main-nav .nav-list li {
    margin: 0;
    width: 100%;
    text-align: center;
  }

  .main-nav .nav-link {
    padding: 12px 20px;
    border-radius: 0;
    white-space: normal; /* Allow text to wrap in mobile menu */
  }

  .main-nav .login-btn {
    margin: 10px auto; /* Center the login button in the mobile menu */
    width: fit-content; /* Adjust width to content */
    border-radius: 5px; /* Less rounded for mobile menu */
    padding: 10px 30px;
  }

  .logo {
    flex-grow: 1; /* Allow logo to take available space */
    text-align: left;
    margin-right: 20px; /* Space between logo and hamburger */
  }

  .logo h1 {
    font-size: 1.4rem;
    white-space: normal; /* Allow logo text to wrap if very long */
  }

  .section-title {
    font-size: 1.5rem;
    text-align: left; /* Align left on smaller screens */
    border-bottom: none;
    padding-bottom: 0;
  }

  .section-subtitle {
    font-size: 1.3rem;
  }

  .container {
    padding: 20px; /* Consistent padding */
  }

  .footer-content {
    flex-direction: column;
    gap: 10px;
  }

  /* Ensure table responsiveness works correctly on mobile */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 550px; /* Explicitly keep minimum width for horizontal scroll */
  }
}

@media (max-width: 480px) {
  .logo h1 {
    font-size: 1.2rem;
  }
  .container {
    padding: 15px;
  }
  .section-title {
    font-size: 1.3rem;
  }
  .section-subtitle {
    font-size: 1.2rem;
  }
  p, ul li, ol li {
    font-size: 0.95rem;
  }
  .header-content {
    padding: 10px 15px; /* Further reduce header padding */
  }
  .hamburger {
    width: 28px;
    height: 22px;
  }
  .hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  .hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }
}
/* Login Page Specific Styles */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #007bff, #0056b3); /* Gradient background */
}

.login-container {
    background-color: #fff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 30px;
    font-weight: 700;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
    outline: none;
}

.login-button {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
}

.login-button:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.error-message {
    color: #dc3545; /* Red color for error messages */
    margin-top: 15px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* Admin Dashboard Specific Styles */
.admin-dashboard {
    padding-top: 40px;
    padding-bottom: 40px;
}

.admin-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.widget {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.widget h3 {
    color: #dc3545;
    font-size: 1.6rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.widget p {
    color: #666;
    margin-bottom: 20px;
}

.widget-link {
    display: inline-block;
    background-color: #28a745; /* Green button */
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.widget-link:hover {
    background-color: #218838;
    transform: translateY(-2px);
    text-decoration: none;
}

/* Responsive adjustments for Login and Admin pages */
@media (max-width: 576px) {
    .login-container {
        padding: 30px 20px;
        margin: 20px; /* Add margin to prevent sticking to edges */
    }
    .login-title {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }
    .login-button {
        padding: 10px 20px;
        font-size: 1rem;
    }
    .admin-widgets {
        grid-template-columns: 1fr; /* Stack widgets vertically on small phones */
    }
    .widget {
        padding: 20px;
    }
    .widget h3 {
        font-size: 1.4rem;
    }
}
/* ... (Your existing CSS from previous steps) ... */

/* Add Archivo Narrow to the font stack if not already there, for numbers specifically */
body {
    font-family: 'Poppins', sans-serif;
    /* ... other body styles ... */
}

.mini-machine-container {
    position: relative;
    width: 500%; /* Smaller width to fit inside a widget */
    height: 240%; /* Smaller height */
    margin: 20px auto; /* Center it within the widget */
    border-radius: 1px;
    overflow: hidden; /* Ensure image and boxes stay within bounds */
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.2); /* Inner shadow for depth */
}

.mini-machine-container .machine-bg {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the container, crop if necessary */
    position: absolute;
    top: 0;
    left: 0;
   
}

.spinning-boxes {
    position: absolute;
    left: 55%; /* Center horizontally */
    top: 27%; /* Center vertically */
    transform: translate(-50%, -50%); /* Adjust for element's own size */
    
    display: flex; /* Use flexbox for spacing */
    justify-content: center;
    align-items: center;
    gap: 30px; /* Reduced gap between boxes */
    padding: 8px 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.upload-widget .box { /* More specific targeting to avoid conflicts */
    width: 35px; /* Adjust box size */
    height: 50px;
    background: #ffff;
     /*border: 2px solid #333; Darker border for contrast */
    border-radius: 5px; /* Slightly rounded corners */
    font-size: 1rem; /* Larger font for numbers */
    font-family: "Archivo Narrow", monospace; /* Use Archivo Narrow for numbers */
    font-weight: 600;
    line-height: 50px; /* Vertically center single digit */
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333; /* Dark text color */
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1); /* Inner shadow for embossed look */
}

    
        .input-box {
            padding: 10px;
            font-size: 18px;
            width: 300px;
            text-align: center;
            border: 1.5px solid black;
            border-radius: 5px;
        }
        .spin-btn {
            padding: 10px 20px;
            font-size: 18px;
            margin: 0px;
            background: #dc3545;
            color: white;
            border: none;
            cursor: pointer;
            border-radius: 5px;
        }
        .spin-btn:hover {
            background: #c82333;
        }
        @keyframes blink {
    50% { opacity: 0; }
}
 .form-container {
            background-color: #fff;
            padding: 30px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
            width: 100%;
            box-sizing: border-box;
        }

        h2 {
            text-align: center;
            color: #333;
            margin-bottom: 25px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #555;
            font-weight: bold;
        }

        .form-group input[type="text"],
        .form-group input[type="tel"],
        .form-group input[type="number"],
        .form-group input[type="time"],
        .form-group select {
            width: 100%;
            padding: 12px;
            border: 1px solid #ccc;
            border-radius: 5px;
            box-sizing: border-box; /* Ensures padding doesn't affect total width */
            font-size: 16px;
        }
        .form-group input[type="text"]:focus,
        .form-group input[type="tel"]:focus,
        .form-group input[type="number"]:focus,
        .form-group input[type="time"]:focus,
        .form-group select:focus {
            border-color: #dc3545;
            outline: none;
            box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
        }

        .form-group .required::after {
            content: ' *';
            color: red;
        }

        .submit-button {
            width: 100%;
            padding: 12px;
            background-color: #dc3545;
            color: white;
            border: none;
            border-radius: 5px;
            font-size: 18px;
            cursor: pointer;
            transition: background-color 0.3s ease;
            max-width: 200px;
        }

        .submit-button:hover {
            background-color: #c82333;
        }

        /* Responsive adjustments */
        @media (max-width: 600px) {
            .form-container {
                padding: 20px;
            }

            h2 {
                font-size: 24px;
            }

            .form-group label,
            .form-group input,
            .submit-button {
                font-size: 14px;
            }
        }