/* style.css */

:root {
    --color-primary-500: #06b6d4; /* cyan-500 */
    --color-primary-600: #0891b2; /* cyan-600 */
    --color-bg-light: #f8fafc;   /* slate-50 */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg-light);
    background-image: radial-gradient(circle at top, #e0f2fe, var(--color-bg-light) 30%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #e2e8f0;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Global Focus Styles */
*:focus-visible {
    outline: 2px solid var(--color-primary-500) !important;
    outline-offset: 2px !important;
    border-radius: 0.375rem;
}

/* Custom Form & Navigation Styles */
.form-radio:checked {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
    border-color: var(--color-primary-600);
    background-color: var(--color-primary-600);
}

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

/* Animation */
@keyframes content-enter {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-enter {
    animation: content-enter 0.4s ease-out forwards;
}

/* Responsive Styles */
@media (max-width: 768px) {
    /* Hide top nav on mobile */
    header + nav {
        display: none;
    }

    .responsive-table thead {
        display: none;
    }
    .responsive-table tr {
        display: block;
        border: 1px solid #e2e8f0;
        border-radius: 0.75rem;
        margin-bottom: 1rem;
        padding: 1rem;
        background-color: white;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
    }
    .responsive-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        text-align: right;
        border-bottom: 1px solid #f1f5f9;
    }
    .responsive-table td:last-child {
        border-bottom: none;
    }
    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 600;
        text-align: left;
        margin-right: 1rem;
        color: #64748b;
    }
    .responsive-table td.actions-cell {
        justify-content: flex-end;
        padding-top: 0.75rem;
    }
}

/* Styles for the off-screen invoice container */
#invoice-print-container {
    display: block;
    position: absolute;
    top: -9999px;
    left: -9999px;
    width: 800px; /* Standard A4-like width */
    background-color: white;
    padding: 40px;
    font-family: Arial, sans-serif;
    color: #333;
    border: 1px solid #ccc;
}

#invoice-print-container h1 {
    font-size: 24px;
    font-weight: bold;
    color: #0891b2; /* cyan-600 */
    margin-bottom: 8px;
}

#invoice-print-container h2 {
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

#invoice-print-container p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 4px;
}

#invoice-print-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

#invoice-print-container th, #invoice-print-container td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

#invoice-print-container th {
    background-color: #f8fafc; /* slate-50 */
    font-weight: bold;
}

#invoice-print-container .text-right {
    text-align: right;
}

#invoice-print-container .font-bold {
    font-weight: bold;
}

#invoice-print-container .total-row td {
    font-size: 16px;
    font-weight: bold;
    border-top: 2px solid #333;
}
