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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

#loginOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
}

.form-container {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    padding: 35px 30px;
    width: 100%;
    max-width: 400px;
    color: #fff;
    margin: 20px;
    margin-bottom: 150px;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #ffffff;
}

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

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

.auth-form-group input {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    outline: none;
}

.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.btn-group button {
    flex: 1;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background-color: #2c3e50;
    border: none;
    border-top: 4px solid #3498db;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-group button:hover {
    background-color: #0056b3;
}

#loginError {
    color: #ff4d4d;
    margin-top: 15px;
    text-align: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    text-align: center;
    padding: 30px 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
}

.header-text {
    margin-right: 150px;
}

.header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.header p {
    font-size: 1.5rem;
    opacity: 0.9;
    font-weight: 300;
    position: relative;
    z-index: 1;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    padding: 0 20px;
}

.nav-tab {
    width: 50%;
    background: none;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.5s;
}

.nav-tab:hover::before {
    left: 100%;
}

.nav-tab:hover {
    color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.nav-tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: white;
    box-shadow: 0 -2px 10px rgba(52, 152, 219, 0.1);
}

/* Content Area */
.content {
    padding: 30px;
    min-height: 600px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Sections */
.form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}


.form-section:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h3::before {
    content: '';
    width: 20px;
    height: 20px;
    background: #3498db;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

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

.form-group {
    flex: 1;
    min-width: 250px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.form-group input:required:invalid {
    border-color: #e74c3c;
}

.form-group input:required:valid {
    border-color: #27ae60;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Tables */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.items-table thead {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.items-table th,
.items-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.items-table th {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.items-table tbody tr {
    transition: all 0.3s ease;
}

.items-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

.items-table tbody tr:nth-child(even) {
    background: #f8f9fa;
}

.items-table tbody tr:nth-child(even):hover {
    background: #e9ecef;
}

.items-table input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f639a 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d 0%, #656d6e 100%);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #1e7e44 100%);
}

/* Action Buttons */
.action-buttons {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-top: 3px solid #3498db;
}

/* Total Section */
.total-section {
    margin-top: 30px;
    padding: 25px;
    background: white;
    border-radius: 10px;
    border: 2px solid #e9ecef;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 1.1rem;
}

.total-row:last-child {
    border-bottom: none;
}

.total-row.final {
    font-weight: 700;
    font-size: 1.3rem;
    color: #2c3e50;
    border-top: 2px solid #3498db;
    padding-top: 15px;
    margin-top: 10px;
}

/* Invoice Preview Styles */
.invoice-preview {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    margin: 0 auto;
}

.invoice-header {
    display: flex;
    flex-direction: column;
    background-color: #90e3ecff;
    border-bottom: 3px solid #3498db;
    padding: 20px;
    border-radius: 20px 0;
    align-items: center;
}

.invoice-header h2 {
    text-align: center;
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 800;
}

.invoice-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.invoice-details .logo {
    position: absolute;
    top: -80;
    left: -230;
}

.invoice-details .logo2 {
    position: absolute;
    top: -90;
    left: 320;
}

.logo2 img {
    width: 120px;
    margin-bottom: 15px;
}

.logo img {
    width: 170px;
    margin-bottom: 15px;
}

.company-info {
    max-width: 450px;
    font-size: 13px;
    color: #444;
    text-align: center;
}

.invoice-details {
    text-align: center;
    position: relative;
}

.invoice-details h3 {
    color: #e74c3c;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 5px;
}

.invoice-details p {
    font-size: 13px;
    color: #666;
}

.client-info {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.client-info h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.client-info p {
    color: #666;
    line-height: 1.6;
}

/* Bank Details */
.Bank-Details-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.bank-details {
    flex: 1;
}

.bank-details h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.bank-details p {
    margin-bottom: 8px;
    color: #666;
}

/* Terms & Conditions */
.terms-conditions {
    margin-top: 40px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #e74c3c;
}

.terms-conditions h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
}

.terms-conditions ol {
    padding-left: 20px;
}

.terms-conditions li {
    margin-bottom: 10px;
    color: #666;
    line-height: 1.6;
}

.footer,
footer {
    background: #2c3e50;
    color: #ffffff;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    border-top: 4px solid #3498db;
    width: 100%;
    margin: 20px auto 0;
    border-radius: 15px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
}

.footer p,
footer p {
    margin: 6px 0;
}

.footer a,
footer a {
    color: #f1c40f;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

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


/* Responsive Design */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 10px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header p {
        font-size: 1rem;
    }

    .content {
        padding: 20px;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group {
        min-width: 100%;
    }

    .nav-tabs {
        /* flex-direction: column; */
        padding: 0;
    }

    .nav-tab {
        padding: 20px 10px;
        font-weight: 600;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #e9ecef;
        border-radius: 0;
    }

    .invoice-header {
        flex-direction: column;
        gap: 20px;
    }

    .invoice-details {
        text-align: left;
        flex: 1;
    }

    .items-table {
        font-size: 0.85rem;
    }

    .items-table th,
    .items-table td {
        padding: 8px 6px;
    }

    .Bank-Details-container {
        flex-direction: column;
        gap: 20px;
    }

    .btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .action-buttons {
        text-align: stretch;
    }

    .form-section {
        overflow-x: auto;
    }
}

@media screen and (max-width: 480px) {
    .header-text {
        margin-right: 0;
    }

    .header {
        flex-direction: column;
    }

    .header h1 {
        font-size: 1.3rem;
    }

    .header img {
        width: 120px;
    }

    .form-section {
        padding: 15px;
    }

    .items-table {
        font-size: 0.75rem;
    }

    .items-table th,
    .items-table td {
        padding: 6px 4px;
    }

    .total-row {
        font-size: 1rem;
    }

    .total-row.final {
        font-size: 1.1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 1000;
}

/* Success/Error Messages */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

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

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

.message.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}