:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --light: #f8fafc;
    --dark: #0f172a;
    --border: #e2e8f0;
    --text: #1e293b;
    --text-light: #64748b;
    --background: #ffffff;
    --card-bg: #ffffff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--light);
    color: var(--text);
    line-height: 1.6;
}

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

.card {
    background: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

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

.table th {
    background-color: var(--light);
    font-weight: 600;
}

.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.navbar {
    background: var(--card-bg);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--primary);
    color: white;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-processing {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-shipped {
    background-color: #dcfce7;
    color: #166534;
}

.badge-delivered {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-paid {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-partial {
    background-color: #ffedd5;
    color: #9a3412;
}

.badge-overdue {
    background-color: #fee2e2;
    color: #991b1b;
}

.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
}

.signature-pad {
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: white;
    width: 100%;
    height: 150px;
    cursor: crosshair;
}

.invoice-header {
    text-align: center;
    margin-bottom: 2rem;
}

.invoice-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.invoice-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.invoice-table th,
.invoice-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid var(--border);
}

.invoice-table th {
    background-color: var(--light);
    font-weight: 600;
}

.invoice-total {
    text-align: right;
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1rem;
}

.print-only {
    display: none;
}

.autocomplete-suggestions {
    position: absolute;
    background: white;
    border: 1px solid var(--border);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
    margin-top: 2px;
    box-shadow: var(--shadow);
    border-radius: 0.375rem;
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.suggestion-item:hover {
    background-color: var(--primary);
    color: white;
}

.suggestion-item:last-child {
    border-bottom: none;
}

@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block;
    }
    
    body {
        background: white;
        font-size: 12px;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}