* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        :root {
            --primary-color: #4361ee;
            --secondary-color: #3a0ca3;
            --accent-color: #4cc9f0;
            --light-color: #f8f9fa;
            --dark-color: #212529;
            --success-color: #4ade80;
            --danger-color: #f43f5e;
            --warning-color: #f59e0b;
            --border-color: #e5e7eb;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

        body {
            background-color: #f5f7fb;
            color: var(--dark-color);
            line-height: 1.6;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 20px;
        }
        a {
            text-decoration: none;
        }
        header {
            text-align: center;
            margin-bottom: 30px;
            padding: 20px;
            border-radius: 12px;
            background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
            color: white;
            box-shadow: var(--shadow);
        }

        header h1 {
            font-size: 2.5rem;
            margin-bottom: 10px;
        }

        header p {
            font-size: 1.1rem;
            opacity: 0.9;
            max-width: 600px;
            margin: 0 auto;
        }

        .app-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
        }

        @media (max-width: 900px) {
            .app-container {
                grid-template-columns: 1fr;
            }
        }

        .card {
            background-color: white;
            border-radius: 12px;
            padding: 25px;
            box-shadow: var(--shadow);
            margin-bottom: 20px;
        }

        .card-title {
            font-size: 1.5rem;
            margin-bottom: 20px;
            color: var(--secondary-color);
            padding-bottom: 10px;
            border-bottom: 2px solid var(--border-color);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .card-title i {
            color: var(--primary-color);
        }

        .form-group {
            margin-bottom: 18px;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: var(--dark-color);
        }

        input, select, textarea {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            font-size: 1rem;
            transition: border-color 0.3s, box-shadow 0.3s;
        }

        input:focus, select:focus, textarea:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
        }

        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 12px 24px;
            border: none;
            border-radius: 8px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-primary {
            background-color: var(--primary-color);
            color: white;
        }

        .btn-primary:hover {
            background-color: #3a56d4;
            transform: translateY(-2px);
        }

        .btn-success {
            background-color: var(--success-color);
            color: white;
        }

        .btn-success:hover {
            background-color: #22c55e;
            transform: translateY(-2px);
        }

        .btn-danger {
            background-color: var(--danger-color);
            color: white;
        }

        .btn-danger:hover {
            background-color: #e11d48;
            transform: translateY(-2px);
        }

        .btn-secondary {
            background-color: #6c757d;
            color: white;
        }

        .btn-secondary:hover {
            background-color: #5a6268;
            transform: translateY(-2px);
        }

        .btn-block {
            width: 100%;
        }

        .btn-sm {
            padding: 8px 12px;
            font-size: 0.9rem;
        }

        .items-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
        }

        .items-table th {
            background-color: #f1f5f9;
            padding: 12px 15px;
            text-align: left;
            font-weight: 600;
            color: var(--dark-color);
            border-bottom: 2px solid var(--border-color);
        }

        .items-table td {
            padding: 15px;
            border-bottom: 1px solid var(--border-color);
        }

        .items-table tr:hover {
            background-color: #f8fafc;
        }

        .items-table .actions {
            display: flex;
            gap: 8px;
        }

        .total-section {
            background-color: #f1f5f9;
            padding: 20px;
            border-radius: 8px;
            margin-top: 25px;
        }

        .total-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            font-size: 1.1rem;
        }

        .total-row.final-total {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--secondary-color);
            padding-top: 15px;
            border-top: 2px solid var(--border-color);
            margin-top: 10px;
        }

        .invoice-preview {
            background-color: white;
            padding: 30px;
            border-radius: 12px;
            box-shadow: var(--shadow);
            min-height: 100%;
        }

        .invoice-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 30px;
            padding-bottom: 20px;
            border-bottom: 2px solid var(--primary-color);
        }

        .invoice-logo-container {
            width: 200px;
            height: 100px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            border: 1px solid var(--border-color);
            border-radius: 8px;
            background-color: white;
            padding: 5px;
        }

        #preview-logo {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        .default-logo {
            font-size: 2rem;
            color: var(--primary-color);
            font-weight: 700;
            text-align: center;
            padding: 20px;
        }

        .invoice-title {
            text-align: right;
        }

        .invoice-title h1 {
            font-size: 2.5rem;
            color: var(--dark-color);
            font-weight: 700;
            margin-bottom: 5px;
        }

        .invoice-title p {
            color: #6b7280;
        }

        .invoice-details {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 30px;
            margin-bottom: 30px;
        }

        .invoice-to h3, .invoice-from h3 {
            margin-bottom: 10px;
            color: var(--secondary-color);
        }

        .invoice-items-preview {
            width: 100%;
            border-collapse: collapse;
            margin: 25px 0;
        }

        .invoice-items-preview th {
            background-color: #f1f5f9;
            padding: 12px 15px;
            text-align: left;
            font-weight: 600;
            color: var(--dark-color);
            border-bottom: 2px solid var(--border-color);
        }

        .invoice-items-preview td {
            padding: 15px;
            border-bottom: 1px solid var(--border-color);
        }

        .invoice-footer {
            display: flex;
            justify-content: space-between;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 2px solid var(--border-color);
        }

        .invoice-notes {
            width: 60%;
        }

        .invoice-totals-preview {
            width: 35%;
        }

        .signature-section {
            margin-top: 40px;
            display: flex;
            justify-content: space-between;
            padding-top: 30px;
            border-top: 1px solid var(--border-color);
        }

        .signature-box {
            width: 48%;
            text-align: center;
        }

        .signature-line {
            height: 1px;
            background-color: #333;
            margin: 40px 0 10px;
            position: relative;
        }

        .signature-line:before {
            content: "";
            position: absolute;
            top: -20px;
            left: 0;
            right: 0;
            height: 40px;
            border-bottom: 1px solid #333;
        }

        .signature-label {
            margin-top: 60px;
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--dark-color);
        }

        .signature-date {
            margin-top: 10px;
            font-size: 1rem;
            color: #666;
        }

        .invoice-actions {
            display: flex;
            gap: 15px;
            margin-top: 30px;
            justify-content: flex-end;
            flex-wrap: wrap;
        }

        .empty-message {
            text-align: center;
            padding: 30px;
            color: #64748b;
            font-style: italic;
        }

        .logo-upload-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
            border: 2px dashed var(--border-color);
            border-radius: 8px;
            background-color: #f9fafb;
            margin-bottom: 20px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .logo-upload-container:hover {
            border-color: var(--primary-color);
            background-color: #f0f7ff;
        }

        .logo-upload-icon {
            font-size: 3rem;
            color: var(--primary-color);
            margin-bottom: 15px;
        }

        .logo-upload-text {
            text-align: center;
            margin-bottom: 10px;
        }

        .logo-upload-text h3 {
            color: var(--secondary-color);
            margin-bottom: 5px;
        }

        .logo-upload-text p {
            color: #6b7280;
            font-size: 0.9rem;
        }

        .logo-preview {
            display: none;
            margin-bottom: 20px;
            text-align: center;
        }

        .logo-preview img {
            max-width: 100%;
            max-height: 150px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            padding: 10px;
            background-color: white;
        }

        .logo-actions {
            display: flex;
            gap: 10px;
            justify-content: center;
            margin-top: 10px;
        }

        .company-details {
            margin-top: 20px;
        }

        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            padding: 15px 20px;
            border-radius: 8px;
            background-color: var(--success-color);
            color: white;
            font-weight: 600;
            box-shadow: var(--shadow);
            transform: translateX(150%);
            transition: transform 0.4s ease;
            z-index: 1000;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .notification.show {
            transform: translateX(0);
        }

        .print-only {
            display: none;
        }

        @media print {
            body * {
                visibility: hidden;
            }
            
            .invoice-preview, .invoice-preview * {
                visibility: visible;
            }
            
            .invoice-preview {
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
                box-shadow: none;
                padding: 20px;
            }
            
            .invoice-actions, .btn {
                display: none !important;
            }
            
            .print-only {
                display: block;
            }
            
            .logo-upload-container, .logo-preview {
                display: none !important;
            }
            
            .signature-line {
                background-color: #000 !important;
            }
            
            .signature-line:before {
                border-bottom: 1px solid #000 !important;
            }
        }
        