/**
 * Invoice Draw - Custom Flat UI Styles
 * Modern, clean, and minimal design
 */

:root {
    --primary: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #16a085;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --gray: #95a5a6;
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* Cards */
.card {
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
}

.card-body {
    padding: 1.5rem;
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

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

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-outline-primary {
    color: #3498db;
    border: 2px solid #3498db;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.btn-outline-secondary {
    color: #7f8c8d;
    border: 2px solid #7f8c8d;
    background: transparent;
}

.btn-outline-secondary:hover {
    background: #7f8c8d;
    border-color: #7f8c8d;
    color: white;
}

.btn-outline-success {
    color: #27ae60;
    border: 2px solid #27ae60;
    background: transparent;
}

.btn-outline-success:hover {
    background: #27ae60;
    border-color: #27ae60;
    color: white;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e0e6ed;
    padding: 0.625rem 1rem;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.15);
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.form-text {
    font-size: 0.875rem;
    color: #7f8c8d;
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    border-bottom: 1px solid #e0e6ed;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 700;
}

.navbar-brand i {
    font-size: 1.5rem;
    vertical-align: middle;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.25rem;
}

.alert-danger {
    background-color: #fadbd8;
    color: #c0392b;
}

.alert-success {
    background-color: #d5f4e6;
    color: #1e8449;
}

.alert-info {
    background-color: #d6eaf8;
    color: #1a5490;
}

.alert-warning {
    background-color: #fef5e7;
    color: #ba6b0a;
}

/* Table */
.table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: #f8f9fa;
}

.table th {
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e6ed;
    padding: 1rem;
}

.table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Badges */
.badge {
    border-radius: 6px;
    padding: 0.35em 0.65em;
    font-weight: 600;
}

/* Pagination */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border-radius: 6px;
    border: 2px solid #e0e6ed;
    color: #3498db;
    padding: 0.5rem 0.875rem;
    margin: 0 0.125rem;
}

.page-link:hover {
    background: #3498db;
    border-color: #3498db;
    color: white;
}

.page-item.active .page-link {
    background: #3498db;
    border-color: #3498db;
}

/* Image Preview */
#imagePreview {
    animation: fadeIn 0.3s;
}

#imagePreview img {
    border-radius: 8px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Footer */
footer {
    border-top: 1px solid #e0e6ed;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.625rem 0.75rem;
    }
}

/* Loading State */
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Shadow Utilities */
.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

/* Border Utilities */
.border-0 {
    border: none !important;
}

/* Success Icon Animation */
.bi-check-circle-fill {
    animation: scaleIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

/* Trophy Animation */
.bi-trophy-fill {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}





