* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Color Variables */
:root {
    --primary-blue: #7ecbfa;
    --primary-violet: #7a6ff0;
    --primary-purple: #d1c4e9;
    --primary-white: #ffffff;
    --primary-dark: #2d2d44;
    --primary-gradient: linear-gradient(135deg, #7ecbfa 0%, #7a6ff0 100%);
    --accent-gradient: linear-gradient(45deg, #7a6ff0, #d1c4e9);
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--primary-purple);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(122, 111, 240, 0.08);
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    flex-wrap: nowrap;
    gap: 1rem;
    position: relative;
    min-height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    white-space: nowrap;
    z-index: 1001;
}

.logo img {
    height: 120px;
    max-height: 15vw;
    width: auto;
    max-width: 320px;
    object-fit: contain;
    display: block;
    /* margin-right: 2rem; */
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    width: 30px;
    height: 25px;
    justify-content: space-between;
    padding: 5px;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary-violet);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 2000; /* Ensure it's above everything */
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 80px 2rem 2rem;
}

/* Active class when menu is open */
.mobile-menu-overlay.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

/* Navigation links inside overlay */
.mobile-menu-overlay .nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-bottom: 2rem;
    text-align: center;
    width: 100%;
}

/* Each link item */
.mobile-menu-overlay .nav-links li {
    list-style: none;
}

/* Link appearance */
.mobile-menu-overlay .nav-links a {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    background: var(--primary-gradient);
    color: #fff;
    display: block;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 4px 12px var(--shadow-light);
}

/* Hover effect */
.mobile-menu-overlay .nav-links a:hover {
    background: var(--accent-gradient);
    color: #fff;
    transform: translateY(-2px);
}

/* Buttons (like logout, register, etc.) */
.mobile-menu-overlay .nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 280px;
}

.mobile-menu-overlay .nav-buttons button {
    width: 100%;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 3px 10px var(--shadow-light);
    transition: all 0.3s ease;
}

.mobile-menu-overlay .nav-buttons button:hover {
    background: var(--accent-gradient);
    transform: translateY(-2px);
}

/* Desktop Navigation */
.desktop-nav {
    display: flex;
}

.nav-links {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links li {
  white-space: nowrap;
}


.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s, background 0.3s, box-shadow 0.3s, transform 0.2s;
    position: relative;
    white-space: nowrap;
    border-radius: 50px;
    padding: 10px 18px;
    font-size: 1rem;
    margin: 0 0.1rem;
    letter-spacing: 0.01em;
    display: flex;
    align-items: center;
}

.nav-links a.customer-data-btn,
.nav-links a.sales-report-btn,
.nav-links a.add-stock-btn,
.nav-links a.start-billing-btn,
.nav-links a.login-btn {
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px var(--shadow-light);
    border: none;
    outline: none;
    font-size: 0.9rem;
    padding: 8px 16px;
    margin: 0 0.1rem;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.nav-links a.customer-data-btn:hover,
.nav-links a.sales-report-btn:hover,
.nav-links a.add-stock-btn:hover,
.nav-links a.start-billing-btn:hover,
.nav-links a.login-btn:hover {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 16px var(--shadow-medium);
    transform: translateY(-2px) scale(1.04);
}

.nav-links a:hover {
    color: var(--primary-violet);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--accent-gradient);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    width: 100%;
    margin-left: auto;
    margin-right: 0;
    padding: 0.5rem 0;
}

.start-billing-btn, .add-stock-btn {
    background: var(--primary-gradient);
    color: var(--primary-white);
    padding: 12px 25px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    font-size: 0.9rem;
}

.start-billing-btn:hover, .add-stock-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(122, 111, 240, 0.18);
}



/* Hero Section */
.hero {
    min-height: 100vh;
    background: url('../images/image.jpg') center center/cover no-repeat;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    filter: blur(4px) brightness(0.92) saturate(0.9);
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content h1,
.hero-content p {
    color: #181818;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: slideInLeft 1s ease-out;
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    margin-bottom: 2rem;
    animation: slideInLeft 1s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: slideInLeft 1s ease-out 0.4s both;
    flex-wrap: wrap;
}

.btn-primary {
    background: var(--primary-white);
    color: var(--primary-violet);
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(122, 111, 240, 0.18);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-white);
    padding: 15px 30px;
    border: 2px solid var(--primary-white);
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: var(--primary-white);
    color: var(--primary-violet);
    transform: translateY(-3px);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: slideInRight 1s ease-out 0.6s both;
}

.dashboard-preview {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg);
    transition: transform 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.dashboard-preview:hover {
    transform: perspective(1000px) rotateY(-10deg) rotateX(2deg) scale(1.05);
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--primary-purple);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--primary-white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-light);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow-medium);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-white);
}

.feature-card h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 4rem 0;
    background: var(--primary-purple);
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    color: var(--text-dark);
}

.about-text h3 {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    color: var(--primary-violet);
    margin-bottom: 1rem;
    position: relative;
}

.about-text h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    bottom: -5px;
    left: 0;
    background: var(--accent-gradient);
}

.about-text p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.about-text ul {
    list-style: none;
    margin-bottom: 2rem;
}

.about-text ul li {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-light);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.about-text ul li::before {
    content: '✔';
    color: var(--primary-violet);
    margin-right: 10px;
    font-size: 1.2rem;
}

.about-text .about-btn {
    background: var(--primary-gradient);
    color: var(--primary-white);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.about-text .about-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(122, 111, 240, 0.18);
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-visual img {
    border-radius: 15px;
    width: 100%;
    max-width: 500px;
    height: auto;
}

/* Stats Section */
.stats {
    padding: 4rem 0;
    background: var(--primary-purple);
    color: var(--text-dark);
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.stat-item p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    opacity: 0.9;
}

/* CTA Section */
.cta {
    padding: 6rem 0;
    background: var(--primary-purple);
    text-align: center;
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cta h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: var(--primary-violet);
    margin-bottom: 1rem;
}

.cta p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: var(--primary-white);
    padding: 3rem 0 1rem;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-violet);
}

.footer-section p, .footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: var(--primary-white);
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    color: #999;
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Billing App Styles */
.billing-app {
    display: none;
    background: var(--primary-purple);
    min-height: 100vh;
    padding-top: 80px;
    position: relative;
    z-index: 1;
}

.billing-app.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.home-page.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.billing-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px var(--shadow-light);
    backdrop-filter: blur(10px);
    margin-top: 20px;
    margin-bottom: 20px;
}

.billing-logo {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 150px;
    height: auto;
    z-index: 10;
}

.billing-header {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-dark);
    padding-top: 20px;
}

.billing-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 10px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.back-btn {
    background: linear-gradient(45deg, var(--success-color), #20c997);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.back-dashboard-btn {
  min-width: 160px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  background-color: #6c757d;
  color: white;
  border: none;
  text-align: left; /* Text aligned left including arrow */
}

.back-dashboard-btn:hover {
  background-color: #5a6268;
}
.logout-btn {
  min-width: 120px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  cursor: pointer;
  background-color: #dc3545;
  color: white;
  border: none;
}

.logout-btn:hover {
  background-color: #c82333;
}

.billing-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.section h2 {
    color: var(--primary-violet);
    margin-bottom: 20px;
    font-size: clamp(1.3rem, 3vw, 1.5rem);
    border-bottom: 2px solid var(--primary-violet);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-violet);
    box-shadow: 0 0 0 3px rgba(122, 111, 240, 0.1);
}

.btn {
    background: var(--accent-gradient);
    color: var(--primary-white);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 5px;
    white-space: nowrap;
    min-width: 120px;
}

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

.btn-success {
    background: linear-gradient(45deg, var(--success-color), #38f9d7);
}

.btn-danger {
    background: linear-gradient(45deg, var(--danger-color), #ba68c8);
}

.btn-warning {
    background: linear-gradient(45deg, var(--warning-color), #ffb300);
}

/* Enhanced Responsive Tables (Bill Items and Stock) */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-light);
}

/* Responsive table for mobile - Enhanced */
@media (max-width: 768px) {
    .items-table,
    .stock-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        margin-top: 15px;
        border-radius: 8px;
    }
    
    .items-table thead,
    .stock-table thead {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    
    .items-table tbody,
    .stock-table tbody {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    
    .items-table tr,
    .stock-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }
    
    .items-table th, .items-table td,
    .stock-table th, .stock-table td {
        min-width: 100px;
        padding: 10px 8px;
        font-size: 0.85rem;
    }
    
    .items-table th:last-child,
    .items-table td:last-child,
    .stock-table th:last-child,
    .stock-table td:last-child {
        min-width: 80px;
    }
}

/* Card-based layout for very small screens */
@media (max-width: 480px) {
    .items-table,
    .stock-table {
        display: block;
        overflow: visible;
        white-space: normal;
        margin-top: 12px;
        font-size: 0.8rem;
        background: transparent;
        box-shadow: none;
    }
    
    .items-table thead,
    .stock-table thead {
        display: none; /* Hide headers on very small screens */
    }
    
    .items-table tbody,
    .stock-table tbody {
        display: block;
    }
    
    .items-table tr,
    .stock-table tr {
        display: block;
        background: white;
        margin-bottom: 10px;
        border-radius: 8px;
        box-shadow: 0 2px 8px var(--shadow-light);
        padding: 12px;
        position: relative;
    }
    
    .items-table td,
    .stock-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 6px 0;
        border: none;
        font-size: 0.85rem;
        min-width: auto;
        word-break: break-word;
        white-space: normal;
    }
    
    .items-table td:before,
    .stock-table td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--primary-violet);
        min-width: 80px;
        margin-right: 0;
        margin-bottom: 2px;
        word-break: break-word;
        white-space: normal;
        display: block;
    }
    
    .items-table td:last-child,
    .stock-table td:last-child {
        justify-content: flex-end;
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
        margin-top: 4px;
    }
    
    .items-table td:last-child:before,
    .stock-table td:last-child:before {
        display: none;
    }
    
    .btn-remove {
        padding: 4px 8px;
        font-size: 0.75rem;
        min-width: auto;
    }
    
    /* Specific rules for customer data table to ensure mobile display */
    #customerDataSection .items-table td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--primary-violet);
        min-width: 80px;
        margin-right: 0;
        margin-bottom: 2px;
        word-break: break-word;
        white-space: normal;
        display: block;
    }
    
    #customerDataSection .items-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 6px 0;
        border: none;
        font-size: 0.85rem;
        min-width: auto;
        word-break: break-word;
        white-space: normal;
    }
    
    /* Specific rules for sales report table to ensure mobile display */
    #salesReportSection .items-table td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--primary-violet);
        min-width: 80px;
        margin-right: 0;
        margin-bottom: 2px;
        word-break: break-word;
        white-space: normal;
        display: block;
    }
    
    #salesReportSection .items-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 6px 0;
        border: none;
        font-size: 0.85rem;
        min-width: auto;
        word-break: break-word;
        white-space: normal;
    }
    
    /* Specific rules for stock table to ensure mobile display */
    #stockSection .stock-table td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: var(--primary-violet);
        min-width: 80px;
        margin-right: 0;
        margin-bottom: 2px;
        word-break: break-word;
        white-space: normal;
        display: block;
    }
    
    #stockSection .stock-table td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 6px 0;
        border: none;
        font-size: 0.85rem;
        min-width: auto;
        word-break: break-word;
        white-space: normal;
    }
}

@media (max-width: 360px) {
    .items-table,
    .stock-table {
        margin-top: 10px;
        font-size: 0.75rem;
    }
    
    .items-table tr,
    .stock-table tr {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .items-table td,
    .stock-table td {
        padding: 4px 0;
        font-size: 0.8rem;
    }
    
    .items-table td:before,
    .stock-table td:before {
        min-width: 70px;
        font-size: 0.75rem;
    }
    
    .btn-remove {
        padding: 3px 6px;
        font-size: 0.7rem;
    }
    
    /* Specific rules for customer data table at 360px */
    #customerDataSection .items-table td:before {
        min-width: 70px;
        font-size: 0.75rem;
    }
    
    #customerDataSection .items-table td {
        padding: 4px 0;
        font-size: 0.8rem;
    }
    
    /* Specific rules for sales report table at 360px */
    #salesReportSection .items-table td:before {
        min-width: 70px;
        font-size: 0.75rem;
    }
    
    #salesReportSection .items-table td {
        padding: 4px 0;
        font-size: 0.8rem;
    }
    
    /* Specific rules for stock table at 360px */
    #stockSection .stock-table td:before {
        min-width: 70px;
        font-size: 0.75rem;
    }
    
    #stockSection .stock-table td {
        padding: 4px 0;
        font-size: 0.8rem;
    }
}

.items-table th, .items-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.items-table th {
    background: var(--accent-gradient);
    color: var(--primary-white);
    font-weight: 600;
    font-size: 0.9rem;
}

.items-table tr:hover {
    background-color: var(--primary-purple);
}

.items-table td {
    font-size: 0.9rem;
}

.total-section {
    background: var(--accent-gradient);
    color: var(--primary-white);
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    text-align: center;
}

.total-section h3 {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    margin-bottom: 10px;
}

.customer-section {
    grid-column: 1 / -1;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
    margin-bottom: 20px;
}

.customer-section h2 {
    color: var(--primary-violet);
    margin-bottom: 20px;
    font-size: clamp(1.3rem, 3vw, 1.5rem);
    border-bottom: 2px solid var(--primary-violet);
    padding-bottom: 10px;
}

.customer-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #f5c6cb;
}

.actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Message System */
.message {
    padding: 12px 16px;
    margin: 10px 0;
    border-radius: 6px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px var(--shadow-light);
    display: none;
}

/* Responsive autocomplete dropdown */
@media (max-width: 768px) {
    .autocomplete-dropdown {
        max-height: 150px;
    }
    
    .autocomplete-option {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .autocomplete-dropdown {
        max-height: 120px;
    }
    
    .autocomplete-option {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

.autocomplete-option {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
    line-height: 1.4;
}

.autocomplete-option:hover,
.autocomplete-option.active {
    background-color: var(--primary-purple);
    color: white;
}

.autocomplete-option:last-child {
    border-bottom: none;
}

/* Customer dropdown specific styles */
#customerDropdown .autocomplete-option {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
}

#customerDropdown .autocomplete-option strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

#customerDropdown .autocomplete-option small {
    color: #666;
    font-size: 0.85rem;
}

#customerDropdown .autocomplete-option:hover small {
    color: #ccc;
}

/* Enhanced customer dropdown styling */
#customerDropdown {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 12px var(--shadow-light);
    z-index: 1000;
}

#customerDropdown .autocomplete-option {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

#customerDropdown .autocomplete-option:hover {
    background-color: var(--primary-purple);
}

#customerDropdown .autocomplete-option:last-child {
    border-bottom: none;
}

/* Form group with relative positioning for autocomplete */
.form-group {
    position: relative;
}

/* Button styles */
.btn-remove {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.btn-remove:hover {
    background-color: #c82333;
}

/* Stock Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow: auto;
    background: rgba(44, 44, 44, 0.35);
    justify-content: center;
    align-items: center;
}

.stock-container {
    position: relative;
    max-width: 1200px;
    width: 95vw;
    max-height: 90vh;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.13);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto;
    /* Prevent click propagation to background */
    pointer-events: auto;
}

.stock-header {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.stock-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    margin-bottom: 10px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close {
    position: absolute;
    top: 18px;
    right: 24px;
    font-size: 2rem;
    color: var(--primary-violet);
    cursor: pointer;
    font-weight: bold;
    transition: color 0.2s;
    z-index: 10;
}

.close:hover {
    color: var(--text-dark);
}

/* Add Stock Form Styles */
.add-stock-form {
    background: #f8f9ff;
    border: 2px solid #cfcafc;
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 rgba(122, 111, 240, 0.08);
    padding: 32px 28px 24px 28px;
    margin-bottom: 32px;
    transition: box-shadow 0.2s;
}
.add-stock-form:focus-within, .add-stock-form:hover {
    box-shadow: 0 8px 32px 0 rgba(122, 111, 240, 0.13);
}

.add-stock-form h2 {
    color: var(--primary-violet);
    margin-bottom: 20px;
    font-size: clamp(1.3rem, 3vw, 1.5rem);
    border-bottom: 2px solid var(--primary-violet);
    padding-bottom: 10px;
}

.form-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 20px;
}

.form-row > div {
    flex: 1;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-actions {
    text-align: center;
    margin-top: 20px;
}

.form-actions .btn {
    min-width: 120px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 600;
}

/* Stock Table Styles */
.stock-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-light);
}

.stock-table th, .stock-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.stock-table th {
    background: var(--accent-gradient);
    color: var(--primary-white);
    font-weight: 600;
    font-size: 0.9rem;
}

.stock-table tr:last-child td {
    border-bottom: none;
}

.stock-table tr:hover {
    background-color: var(--primary-purple);
}

/* Small button for Remove */
.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    min-width: 80px;
}

/* Mobile Responsiveness */
@media (max-width: 1200px) {
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .hero-container {
        gap: 3rem;
    }
    
    .billing-section {
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .nav-links {
        justify-content: center;
        gap: 0.3rem;
        margin-left: 0;
    }
    .nav-links a,
    .nav-links a.customer-data-btn,
    .nav-links a.sales-report-btn,
    .nav-links a.add-stock-btn,
    .nav-links a.start-billing-btn {
        font-size: 0.98rem;
        padding: 10px 12px;
    }
    .logo img {
        height: 90px;
        max-width: 220px;
    }
    
    .hero-container {
        gap: 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    .billing-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .customer-form {
        grid-template-columns: 1fr 1fr;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .stock-container {
        width: 98vw;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    /* Show hamburger menu and hide desktop navigation */
    .hamburger-menu {
        display: flex;
    }
    
    .desktop-nav {
        display: none !important;
    }
    
    /* Mobile navigation layout */
    .nav-container {
        padding: 0 1rem;
        justify-content: space-between;
        align-items: center;
        height: 70px;
    }
    
    .logo {
        font-size: 1.6rem;
        order: 1;
    }
    
    .hamburger-menu {
        order: 2;
    }
    
    /* Fix hero section spacing for mobile */
    .hero {
        min-height: auto;
        padding: 120px 0 60px;
        margin-top: 0;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-content {
        order: 1;
    }
    
    .hero-visual {
        order: 2;
        margin-top: 2rem;
    }
    
    .hero-content h1 {
        margin-top: 1rem;
    }
    
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 12px 24px;
        font-size: 1rem;
        width: 100%;
        max-width: 250px;
    }
    
    .dashboard-preview {
        max-width: 80%;
        margin: 0 auto;
        transform: none;
    }
    
    .features {
        padding: 4rem 0;
    }
    
    .section-title p {
        padding: 0 1rem;
    }
    
    .features-grid {
        padding: 0 1rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-visual {
        order: -1;
        margin-bottom: 2rem;
    }
    
    .about-visual img {
        max-width: 100%;
    }
    
    .billing-container {
        padding: 20px;
        margin-top: 100px;
    }
    
    .customer-form {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 20px;
    }
    
    .items-table th, 
    .items-table td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
    
    .billing-logo {
        width: 80px;
        top: 10px;
        right: 10px;
    }
    
    .billing-header {
        padding-top: 15px;
    }
    
    .stock-container {
        padding: 15px;
        max-height: 95vh;
    }
    
    .stock-table th, .stock-table td {
        padding: 10px 6px;
        font-size: 0.8rem;
    }
    
    .add-another-item {
        padding: 15px;
    }
    
    .add-another-item .btn {
        padding: 12px 24px;
        font-size: 1rem;
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 576px) {
    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        height: 70px;
    }
    
    .home-page {
        padding-top: 80px !important;
        min-height: calc(100vh - 80px) !important;
        width: 100% !important;
        overflow: visible !important;
        display: block !important;
    }
    
    /* Fix hero section spacing for small mobile */
    .hero {
        min-height: calc(100vh - 80px) !important;
        padding: 100px 0 40px !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        margin-top: 0 !important;
    }
    
    .hero-container {
        padding: 0 0.5rem !important;
        width: 100% !important;
    }
    
    /* Mobile navigation adjustments */
    .nav-container {
        padding: 0 1rem;
        height: 70px;
    }
    
    .logo {
        font-size: 1.4rem;
    }
    
    .logo img {
        height: 80px;
        max-width: 200px;
    }
    
    .hamburger-menu {
        width: 28px;
        height: 22px;
    }
    
    .hamburger-menu span {
        height: 2.5px;
    }
    
    .mobile-menu-overlay .nav-links a {
        font-size: 1.3rem;
        padding: 0.8rem 1.5rem;
    }
    
    .mobile-menu-overlay .nav-buttons button {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        max-width: 220px;
        padding: 10px 20px;
    }
    
    .dashboard-preview {
        max-width: 90%;
        padding: 1rem;
    }
    
    .features {
        padding: 3rem 0;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .feature-card h3 {
        font-size: 1.3rem;
    }
    
    .feature-card p {
        font-size: 0.9rem;
    }
    
    .about-container {
        padding: 0 1.5rem;
    }
    
    .about-text h3 {
        font-size: 1.4rem;
    }
    
    .about-text .about-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .billing-container {
        padding: 15px;
        margin-top: 80px;
        margin-bottom: 15px;
    }
    
    .billing-header h1 {
        font-size: 2rem;
    }
    
    .billing-section {
        gap: 15px;
    }
    
    .items-table {
        display: block;
        overflow-x: auto;
        font-size: 0.8rem;
    }
    
    .items-table th, 
    .items-table td {
        padding: 8px 6px;
        min-width: 80px;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    .actions .btn {
        width: 100%;
        max-width: 200px;
        margin: 5px 0;
    }
    
    .section {
        padding: 15px;
    }
    
    .billing-header h1 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .about-text h3 {
        font-size: 1.5rem;
    }
    
    .billing-app {
        padding: 0;
        min-height: unset;
    }
    
    .about-text p, .about-text ul li {
        font-size: 1rem;
    }
    
    .billing-logo {
        width: 80px;
        top: 10px;
        right: 10px;
    }
    
    .billing-header {
        padding-top: 8px;
    }
    
    .stock-container {
        padding: 8px;
        width: 99vw;
        max-height: 99vh;
        border-radius: 15px;
    }
    
    .stock-header h1 {
        font-size: 1.5rem;
    }
    
    .stock-table {
        font-size: 0.7rem;
    }
    
    .stock-table th, .stock-table td {
        padding: 6px 3px;
    }
    
    .close {
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
    }
    
    .items-table tr {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        margin-bottom: 20px;
    }
    
    .items-table td {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .items-table td:before {
        content: attr(data-label) ": ";
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .total-section {
        margin-top: 30px;
        padding: 25px;
    }
    
    .total-section h3 {
        font-size: 1.6rem;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        margin-bottom: 10px;
        font-size: 1rem;
    }
    
    .form-group input {
        padding: 12px;
        font-size: 16px;
    }
    
    .actions {
        margin-top: 30px;
    }
    
    .actions .btn {
        margin: 8px 0;
        padding: 15px 20px;
        font-size: 16px;
    }
}

/* Ensure all buttons are visible and accessible */
.btn, .start-billing-btn, .add-stock-btn, .back-btn, .add-stock-inner-btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Ensure all form elements are visible */
input, select, textarea, label {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure tables are properly displayed */
.items-table, .stock-table {
    display: table !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure modals are properly positioned */
.modal {
    display: none;
}

.modal[style*="display: flex"] {
    display: flex !important;
}

/* Ensure dropdown is visible when active */
.autocomplete-dropdown[style*="display: block"] {
    display: block !important;
}

input[type="file"] {
    display: none !important;
}

/* Add Another Item Button */
.add-another-item {
    text-align: center;
    padding: 20px;
    background: rgba(122, 111, 240, 0.05);
    border-radius: 15px;
    border: 2px dashed var(--primary-violet);
    margin-top: 10px;
}

.add-another-item .btn {
    background: var(--primary-gradient);
    color: var(--primary-white);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.add-another-item .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(122, 111, 240, 0.18);
}

.add-item-form {
    display: block;
}

/* Center align all text in Bill Items table */
.billing-section .items-table th,
.billing-section .items-table td {
    text-align: center !important;
}

/* Small button for Remove */
.btn-small {
    padding: 4px 10px !important;
    font-size: 0.85rem !important;
    border-radius: 5px !important;
    min-width: unset !important;
    width: auto !important;
    height: 28px;
    line-height: 1.2;
}

/* Mobile Responsiveness for Billing App */
/* Enhanced Responsive Design for Billing App */
@media (max-width: 1200px) {
    .billing-container {
        max-width: 95%;
        margin: 15px auto;
        padding: 25px;
    }
    
    .billing-section {
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .billing-container {
        max-width: 98%;
        margin: 10px auto;
        padding: 20px;
    }
    
    .billing-section {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .billing-logo {
        width: 120px;
        top: 15px;
        right: 15px;
    }
    
    .billing-header h1 {
        font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    }
    
    .billing-header h2 {
        font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    }
}

@media (max-width: 768px) {
    .billing-app {
        padding-top: 70px;
        min-height: calc(100vh - 70px);
    }
    
    .billing-container {
        margin: 8px;
        padding: 18px;
        border-radius: 15px;
    }
    
    .billing-logo {
        width: 100px;
        top: 12px;
        right: 12px;
    }
    
    .billing-header {
        margin-bottom: 25px;
        padding-top: 15px;
    }
    
    .billing-header h1 {
        font-size: clamp(1.4rem, 3vw, 2rem);
        margin-bottom: 8px;
    }
    
    .billing-header h2 {
        font-size: clamp(0.8rem, 2.2vw, 1rem);
        line-height: 1.3;
    }
    
    .section {
        padding: 20px;
        margin-bottom: 15px;
    }
    
    .section h2 {
        font-size: clamp(1.1rem, 2.8vw, 1.3rem);
        margin-bottom: 15px;
    }
    
    .customer-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    input, select, textarea {
        padding: 10px;
        font-size: 15px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100px;
        margin: 3px;
    }
    
    .back-btn {
        padding: 8px 16px;
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .items-table {
        margin-top: 15px;
        font-size: 0.85rem;
    }
    
    .items-table th, .items-table td {
        padding: 12px 8px;
    }
    
    .items-table th {
        font-size: 0.8rem;
    }
    
    .total-section {
        padding: 15px;
        margin-top: 15px;
    }
    
    .total-section h3 {
        font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    }
    
    .actions {
        gap: 10px;
        margin-top: 20px;
    }
    
    .actions .btn {
        padding: 12px 18px;
        font-size: 14px;
        min-width: 110px;
    }
    
    .bill-summary-row {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .bill-summary-row .form-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .bill-summary-row .form-group label {
        margin-bottom: 5px;
        margin-right: 0;
    }
    
    .bill-summary-row .form-group input {
        width: 100%;
        max-width: 150px;
    }
}

@media (max-width: 576px) {
    .billing-app {
        padding-top: 70px;
        min-height: calc(100vh - 70px);
    }
    
    .billing-container {
        margin: 5px;
        padding: 15px;
        border-radius: 12px;
    }
    
    .billing-logo {
        width: 80px;
        top: 10px;
        right: 10px;
    }
    
    .billing-header {
        margin-bottom: 20px;
        padding-top: 10px;
    }
    
    .billing-header h1 {
        font-size: clamp(1.2rem, 2.8vw, 1.8rem);
        margin-bottom: 6px;
    }
    
    .billing-header h2 {
        font-size: clamp(0.7rem, 2vw, 0.9rem);
        line-height: 1.2;
    }
    
    .section {
        padding: 15px;
        margin-bottom: 12px;
    }
    
    .section h2 {
        font-size: clamp(1rem, 2.5vw, 1.2rem);
        margin-bottom: 12px;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }
    
    input, select, textarea {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 90px;
        margin: 2px;
    }
    
    .back-btn {
        padding: 6px 12px;
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    .items-table {
        margin-top: 12px;
        font-size: 0.8rem;
    }
    
    .items-table th, .items-table td {
        padding: 8px 6px;
    }
    
    .items-table th {
        font-size: 0.75rem;
    }
    
    .total-section {
        padding: 12px;
        margin-top: 12px;
    }
    
    .total-section h3 {
        font-size: clamp(1rem, 2.3vw, 1.2rem);
    }
    
    .actions {
        gap: 8px;
        margin-top: 15px;
        flex-direction: column;
    }
    
    .actions .btn {
        padding: 10px 16px;
        font-size: 13px;
        min-width: 100px;
        width: 100%;
        max-width: 200px;
    }
    
    .bill-summary-row {
        gap: 12px;
    }
    
    .bill-summary-row .form-group input {
        max-width: 120px;
        padding: 6px 8px;
        font-size: 13px;
    }
    
    .service-charges-display {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .billing-app {
        padding-top: 65px;
        min-height: calc(100vh - 65px);
    }
    
    .billing-container {
        margin: 3px;
        padding: 12px;
        border-radius: 10px;
    }
    
    .billing-logo {
        width: 70px;
        top: 8px;
        right: 8px;
    }
    
    .billing-header {
        margin-bottom: 15px;
        padding-top: 8px;
    }
    
    .billing-header h1 {
        font-size: clamp(1.1rem, 2.5vw, 1.6rem);
        margin-bottom: 5px;
    }
    
    .billing-header h2 {
        font-size: clamp(0.65rem, 1.8vw, 0.8rem);
        line-height: 1.1;
    }
    
    .section {
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .section h2 {
        font-size: clamp(0.9rem, 2.2vw, 1.1rem);
        margin-bottom: 10px;
    }
    
    .form-group {
        margin-bottom: 8px;
    }
    
    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 4px;
    }
    
    input, select, textarea {
        padding: 7px 8px;
        font-size: 13px;
    }
    
    .btn {
        padding: 7px 14px;
        font-size: 12px;
        min-width: 80px;
        margin: 2px;
    }
    
    .back-btn {
        padding: 5px 10px;
        font-size: 11px;
        margin-bottom: 10px;
    }
    
    .items-table {
        margin-top: 10px;
        font-size: 0.75rem;
    }
    
    .items-table th, .items-table td {
        padding: 6px 4px;
    }
    
    .items-table th {
        font-size: 0.7rem;
    }
    
    .total-section {
        padding: 10px;
        margin-top: 10px;
    }
    
    .total-section h3 {
        font-size: clamp(0.9rem, 2.1vw, 1.1rem);
    }
    
    .actions {
        gap: 6px;
        margin-top: 12px;
    }
    
    .actions .btn {
        padding: 8px 14px;
        font-size: 12px;
        min-width: 90px;
    }
    
    .bill-summary-row {
        gap: 10px;
    }
    
    .bill-summary-row .form-group input {
        max-width: 100px;
        padding: 5px 6px;
        font-size: 12px;
    }
    
    .service-charges-display {
        font-size: 0.85rem;
    }
}

@media (max-width: 360px) {
    .billing-container {
        margin: 2px;
        padding: 10px;
        border-radius: 8px;
    }
    
    .billing-logo {
        width: 60px;
        top: 6px;
        right: 6px;
    }
    
    .billing-header h1 {
        font-size: clamp(1rem, 2.3vw, 1.4rem);
    }
    
    .billing-header h2 {
        font-size: clamp(0.6rem, 1.6vw, 0.75rem);
    }
    
    .section {
        padding: 10px;
    }
    
    .section h2 {
        font-size: clamp(0.8rem, 2vw, 1rem);
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 11px;
        min-width: 70px;
    }
    
    .items-table {
        font-size: 0.7rem;
    }
    
    .items-table th, .items-table td {
        padding: 4px 3px;
    }
    
    .actions .btn {
        padding: 6px 12px;
        font-size: 11px;
        min-width: 80px;
    }
}

/* Mobile Responsiveness for Stock Management */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .add-stock-form {
        padding: 20px;
    }
    
    .add-stock-form h2 {
        font-size: clamp(1.2rem, 3vw, 1.4rem);
    }
    
    .stock-container {
        width: 98vw;
        padding: 20px;
        max-height: 95vh;
    }
    
    .stock-table {
        display: block;
        overflow-x: auto;
        font-size: 0.8rem;
    }
    
    .stock-table th, .stock-table td {
        padding: 10px 6px;
        min-width: 100px;
    }
    
    .stock-table th:last-child,
    .stock-table td:last-child {
        min-width: 80px;
    }
}

@media (max-width: 576px) {
    .stock-container {
        padding: 15px;
        width: 98vw;
        max-height: 98vh;
    }
    
    .add-stock-form {
        padding: 15px;
    }
    
    .add-stock-form h2 {
        font-size: clamp(1.1rem, 2.8vw, 1.3rem);
    }
    
    .stock-table {
        font-size: 0.75rem;
    }
    
    .stock-table th, .stock-table td {
        padding: 8px 4px;
        min-width: 80px;
    }
    
    .form-actions .btn {
        min-width: 120px;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Enhanced mobile responsive rules for form-actions buttons */
    .form-actions {
        display: flex;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 20px;
    }
    
    .form-actions .btn {
        min-width: 100px;
        padding: 12px 16px;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .btn-small {
        padding: 4px 8px;
        font-size: 0.7rem;
        min-width: 60px;
    }
}

@media (max-width: 480px) {
    .stock-container {
        padding: 10px;
        width: 99vw;
        max-height: 99vh;
        border-radius: 15px;
    }
    
    .stock-header h1 {
        font-size: 1.5rem;
    }
    
    .add-stock-form {
        padding: 12px;
    }
    
    .add-stock-form h2 {
        font-size: clamp(1rem, 2.5vw, 1.2rem);
    }
    
    .stock-table {
        font-size: 0.7rem;
    }
    
    .stock-table th, .stock-table td {
        padding: 6px 3px;
        min-width: 70px;
    }
    
    .close {
        top: 10px;
        right: 15px;
        font-size: 1.5rem;
    }
    
    /* Enhanced mobile responsive rules for form-actions buttons at 480px */
    .form-actions {
        display: flex;
        gap: 0.8rem;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 15px;
    }
    
    .form-actions .btn {
        min-width: 90px;
        padding: 10px 14px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

.bill-summary-row {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin: 20px 0 0 0;
}
.bill-summary-row .form-group {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}
.bill-summary-row .form-group label {
    margin-bottom: 0;
    margin-right: 8px;
    font-weight: 600;
    font-size: 1rem;
}
.bill-summary-row .form-group input {
    width: 120px;
    padding: 8px 12px;
    font-size: 1rem;
} 

.customer-data-btn, .sales-report-btn, .add-stock-btn, .start-billing-btn {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 22px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px var(--shadow-light);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
    outline: none;
    margin: 0 0.1rem;
    min-width: 120px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.customer-data-btn:hover, .sales-report-btn:hover, .add-stock-btn:hover, .start-billing-btn:hover {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 16px var(--shadow-medium);
    transform: translateY(-2px) scale(1.04);
} 
@media (max-width: 992px) {
    .nav-links {
        justify-content: center;
        gap: 0.3rem;
    }
    .nav-links a,
    .nav-links a.customer-data-btn,
    .nav-links a.sales-report-btn,
    .nav-links a.add-stock-btn,
    .nav-links a.start-billing-btn {
        font-size: 0.98rem;
        padding: 10px 12px;
    }
}
@media (max-width: 700px) {
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.7rem;
        padding: 0.5rem 0;
    }
    .nav-links a,
    .nav-links a.customer-data-btn,
    .nav-links a.sales-report-btn,
    .nav-links a.add-stock-btn,
    .nav-links a.start-billing-btn {
        width: 100%;
        font-size: 1rem;
        padding: 13px 0;
        margin: 0;
        text-align: center;
    }
} 

.app-section,
#billingApp,
#stockSection,
#customerDataSection,
#salesReportSection {
    min-height: 100vh;
    margin: 0;
    padding-top: 80px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
    width: 100%;
    top: 0;
    left: 0;
}

/* Ensure active sections are above mobile menu overlay */
#billingApp[style*="display: block"],
#stockSection[style*="display: block"],
#customerDataSection[style*="display: block"],
#salesReportSection[style*="display: block"] {
    z-index: 1001;
    position: relative;
    top: 0;
    left: 0;
}

@media (max-width: 700px) {
    .app-section,
    #billingApp,
    #stockSection,
    #customerDataSection,
    #salesReportSection {
        min-height: 100vh;
        padding-top: 70px;
    }
    .home-page {
        padding-top: 70px !important;
        margin-top: 0 !important;
    }
    body {
        margin: 0 !important;
        padding: 0 !important;
    }
} 

/* --- Unified Card Form Design for Add Stock & Add New Item --- */
.card-form, .add-stock-form, .add-item-form {
    background: #f8f9ff;
    border: 2px solid #e0e0f7;
    border-radius: 18px;
    box-shadow: 0 4px 24px 0 rgba(122, 111, 240, 0.10);
    padding: 32px 28px 24px 28px;
    margin-bottom: 32px;
    transition: box-shadow 0.2s, border-color 0.2s;
    position: relative;
}
.card-form:focus-within, .card-form:hover,
.add-stock-form:focus-within, .add-stock-form:hover,
.add-item-form:focus-within, .add-item-form:hover {
    box-shadow: 0 8px 32px 0 rgba(122, 111, 240, 0.16);
    border-color: #bdb6f6;
}
.card-form .card-header,
.add-stock-form > .card-header,
.add-item-form > .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}
.card-form h2,
.add-stock-form h2,
.add-item-form h2 {
    color: var(--primary-violet);
    margin: 0;
    font-size: clamp(1.3rem, 3vw, 1.5rem);
    font-weight: 700;
    border-bottom: none;
    padding-bottom: 0;
}
.card-form .btn,
.add-stock-form .btn,
.add-item-form .btn {
    box-shadow: 0 2px 8px var(--shadow-light);
}
@media (max-width: 768px) {
  .card-form, .add-stock-form, .add-item-form {
    padding: 18px 8px 18px 8px;
    border-radius: 14px;
  }
  .card-form .card-header,
  .add-stock-form > .card-header,
  .add-item-form > .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }
}
@media (max-width: 480px) {
  .card-form, .add-stock-form, .add-item-form {
    padding: 10px 4px 14px 4px;
    border-radius: 10px;
  }
} 

 .action-button {
  padding: 6px 14px;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  color: white;
  cursor: pointer;
  transition: background 0.2s ease;
}

.approve-btn {
  background-color: #28a745;
}

.approve-btn:hover {
  background-color: #218838;
}

.reject-btn {
  background-color: #dc3545;
}

.reject-btn:hover {
  background-color: #c82333;
}

/* Profile Section Styles */
.vendor-form {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    color: var(--primary-violet);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-purple);
}

/* Radio and Checkbox Styles */
.radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.radio-label:hover {
    border-color: var(--primary-violet);
    background: var(--primary-purple);
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-violet);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    border-color: var(--primary-violet);
    background: var(--primary-purple);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 0.2rem;
    accent-color: var(--primary-violet);
}

.checkbox-label a {
    color: var(--primary-violet);
    text-decoration: underline;
}

.checkbox-label a:hover {
    color: var(--primary-blue);
}

/* Education and Experience Entries */
.education-entry, .experience-entry {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}

.education-entry:last-child, .experience-entry:last-child {
    margin-bottom: 0;
}

.remove-entry {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.remove-entry:hover {
    background: #c82333;
}

/* File Upload Styles */
.file-preview {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.file-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.file-preview .file-item {
    background: var(--primary-purple);
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-preview .file-item .remove-file {
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 10px;
}

/* Signature Canvas */
#signatureCanvas {
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.signature-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.signature-actions .btn {
    flex: 1;
}

/* Success Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--success-color);
    margin: 0;
    font-size: 1.5rem;
}

.modal-body {
    padding: 1rem 2rem;
}

.modal-body p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-light);
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    justify-content: flex-end;
}

/* Profile Button Styles */
.profile-btn {
    margin-left: 1rem;  /* Adjust this value to increase or decrease space */
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;

    display: flex;
    align-items: center;         /* Vertically center */
    justify-content: center;     /* Horizontally center */
    
    cursor: pointer;
    border: none;
    background: var(--primary-gradient);
    transition: all 0.3s ease;
}


.profile-btn img {
    position: relative;
    min-width: 100%;      /* Ensure covers full width */
    min-height: 100%;     /* Ensure covers full height */
    object-fit: cover;    /* Crop & cover container */
    border-radius: 50%;   /* Circular shape */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the image */
    display: block;
}



.profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(122, 111, 240, 0.3);
    color: white;
    text-decoration: none;
}

.profile-action-buttons {
  display: flex;
  justify-content: space-between; /* left align first button, right align second */
  align-items: center;
  gap: 1rem;
}

.profile-action-buttons .btn {
    min-width: 140px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

.btn-danger:hover {
    background-color: #c82333;
}

.section-header {
  text-align: center;
}



/* Responsive Design for Profile Form */
@media (max-width: 768px) {
    .vendor-form {
        margin: 1rem;
        border-radius: 10px;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .form-section h3 {
        font-size: 1.3rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .radio-label {
        padding: 0.75rem;
    }
    
    .signature-actions {
        flex-direction: column;
    }
    
    #signatureCanvas {
        width: 100%;
        height: 150px;
    }
    
    .modal-content {
        margin: 1rem;
        width: calc(100% - 2rem);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .vendor-form {
        margin: 0.5rem;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .form-section h3 {
        font-size: 1.2rem;
    }
    
    .education-entry,
    .experience-entry {
        padding: 0.75rem;
    }
    
    .file-preview img {
        max-width: 80px;
        max-height: 80px;
    }
    
    .modal-content {
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }
}

/* Animation for form sections */
.form-section {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading state for form submission */
.vendor-form.loading {
    opacity: 0.7;
    pointer-events: none;
}

.vendor-form.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid var(--primary-purple);
    border-top: 4px solid var(--primary-violet);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vendor-profile-section {
    display: flex;
    justify-content: center;
    
}

.profile-card {
    background: linear-gradient(135deg, #ffffff, #f6f4ff);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    animation: fadeIn 0.6s ease-in-out; 
}

.profile-card .section-header h2 {
    font-size: 1.8rem;
    color: #5334f5;
    margin-bottom: 0.3rem;
}

.profile-card .section-header p {
    color: #666;
    margin-bottom: 1.2rem;
}

.vendor-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.vendor-info .info-row {
    padding: 0.6rem 1rem;
    background: #f5f3ff;
    border-radius: 8px;
    font-size: 0.95rem;
    border-left: 4px solid #6a5dfc;
}

.vendor-info .info-row strong {
    color: #3d3577;
}

.profile-action-buttons {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.btn {
    padding: 0.6rem 1.4rem;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary {
    background-color: #e4e1ff;
    color: #3d3577;
}

.btn-secondary:hover {
    background-color: #cfcaff;
}

.btn-danger {
    background-color: #c03a77;
    color: black
}

.btn-danger:hover {
    background-color: #a22d65;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}


.profile-photo {
  transition: 0.3s;
}
.profile-photo:hover {
  opacity: 0.8;
}

.profile-edit-input {
  padding: 4px;
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 60%;
}

