* {
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro', 'Inter', sans-serif;
    background: #1a1a1a;
    color: #e0e0e0;
}

h1 {
    font-family: 'SF Pro', 'Inter', sans-serif;
    text-align: center;
    color: #ffffff;
}

.form-section {
    background: #2a2a2a;
    padding: 30px;
    margin: auto;
    max-width: 900px;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

label {
    font-family: 'SF Pro', 'Inter', sans-serif;
    font-weight: 600;
    display: block;
    margin-top: 15px;
    color: #d0d0d0;
    font-size: 14px;
    letter-spacing: 0.2px;
}

input, select, textarea {
    font-family: 'SF Pro', 'Inter', sans-serif;
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    font-size: 16px;
    background: #333333;
    color: #e0e0e0;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #5c6bc0;
    box-shadow: 0 0 0 3px rgba(92, 107, 192, 0.3);
}

button {
    font-family: 'SF Pro', 'Inter', sans-serif;
    background: rgb(64, 63, 63);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.8px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    touch-action: manipulation;
}

button:hover {
    background: gray;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.dubbing-row {
    border: 1px solid #4a4a4a;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    background: #333333;
    transition: background 0.2s ease;
}

.dubbing-row:hover {
    background: #333333;
}

.dubbing-row:nth-child(even) {
    background: #333333;
}

.dubbing-row:nth-child(even):hover {
    background: #333333;
}

.deleteBtn {
    font-family: 'SF Pro', 'Inter', sans-serif;
    background: rgb(108, 6, 6);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    max-width: 140px;
    margin: 15px auto 0;
    text-align: center;
}

.deleteBtn:hover {
    background: rgb(143, 23, 2);
    transform: translateY(-1px);
}

.deleteBtn:active {
    transform: translateY(0);
}

.client-details {
    border: 1px solid #4a4a4a;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    background: #333333;
    transition: background 0.2s ease;
}

.client-details:hover {
    background: #333333;
}

.client-details:nth-child(even) {
    background: #333333;
}

.client-details:nth-child(even):hover {
    background: #333333;
}

#invoice {
    display: none;
    background: #fff;
    width: 100%;
    max-width: 760px;
    padding: 40px;
    margin: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    font-family: 'SF Pro', 'Inter', sans-serif;
}

#invoice {
    background: #ffffff !important;
    color: #1a252f !important;
}

#invoice header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #1a252f;
    padding-bottom: 12px;
    margin-bottom: 25px;
}

#invoice header h2 {
    margin: 0;
    font-size: 28px;
    color: #1a252f;
    font-weight: 700;
    letter-spacing: -0.5px;
}

#invoice header .date {
    font-size: 13px;
    color: #1a252f;
    font-weight: 500;
}

.section {
    margin-top: 20px;
}

.section h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #1a252f;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 6px;
    font-weight: 600;
}

.section p {
    margin: 6px 0;
    font-size: 13px;
    white-space: pre-line;
    color: #2d3748;
}

.gst-label {
    font-weight: 600;
    display: inline;
    margin-right: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
}

th, td {
    border: 1px solid #e5e7eb;
    padding: 10px;
    text-align: left;
    font-size: 13px;
}

th {
    background: #1a252f;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

td {
    background: #f9fafb;
}

.total {
    text-align: right;
    font-weight: 700;
    padding: 12px 0 0;
    font-size: 15px;
    border-top: 2px solid #1a252f;
    color: #1a252f;
}

.bank, .signature {
    margin-top: 35px;
    font-size: 13px;
    color: #2d3748;
}

.bank p {
    margin: 6px 0;
}

.signature {
    text-align: right;
    font-weight: 700;
    margin-top: 70px;
    font-size: 15px;
    color: #1a252f;
}

.bank, .signature, .section, tr {
    page-break-inside: avoid;
}

@media (max-width: 600px) {
    body {
        padding: 15px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    input, select, textarea {
        font-size: 14px;
        padding: 10px;
    }
    
    button {
        font-size: 14px;
        padding: 12px;
    }
    
    .dubbing-row {
        padding: 15px;
    }
    
    .deleteBtn {
        font-size: 12px;
        padding: 8px;
        max-width: 120px;
    }
    
    #invoice {
        padding: 20px;
    }
    
    #invoice header {
        flex-direction: column;
        align-items: flex-start;
    }
}

#topGenerateBtn {
    font-family: 'SF Pro', 'Inter', sans-serif;
    background: rgb(64, 63, 63);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 20px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.8px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
    display: block;
    margin-left: auto;
    margin-right: auto;
    touch-action: manipulation;
}

#topGenerateBtn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.6;
}