:root {
    color-scheme: light;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    border: 1px solid rgb(203 213 225);
    border-radius: 0.75rem;
    background: #fff;
    padding: 0.75rem 0.9rem;
    color: rgb(15 23 42);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-textarea {
    min-height: 8rem;
    resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: rgb(37 99 235);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.btn-primary,
.btn-secondary,
.btn-danger,
.btn-muted,
.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border-radius: 0.75rem;
    padding: 0.65rem 0.9rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.btn-primary {
    background: rgb(37 99 235);
    color: white;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

.btn-primary:hover {
    background: rgb(29 78 216);
}

.btn-success {
    background: rgb(5 150 105);
    color: white;
}

.btn-secondary {
    background: rgb(15 23 42);
    color: white;
}

.btn-danger {
    background: rgb(225 29 72);
    color: white;
}

.btn-muted {
    background: rgb(241 245 249);
    color: rgb(51 65 85);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-danger:hover,
.btn-muted:hover,
.btn-success:hover {
    transform: translateY(-1px);
}

.icon-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.icon-actions form {
    display: inline-flex;
}

.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    min-width: 3rem;
    border: 0;
    border-radius: 0.75rem;
    padding: 0;
    color: white;
    cursor: pointer;
    text-decoration: none;
    flex: 0 0 auto;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.icon-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.12);
}

.icon-action:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.icon-action svg {
    width: 1.35rem;
    height: 1.35rem;
    flex-shrink: 0;
    display: block;
}

.icon-action-muted {
    background: rgb(71 85 105);
}

.icon-action-muted:hover {
    background: rgb(51 65 85);
}

.icon-action-primary {
    background: rgb(37 99 235);
    color: white;
}

.icon-action-primary:hover {
    background: rgb(29 78 216);
}

.icon-action-secondary {
    background: rgb(15 23 42);
    color: white;
}

.icon-action-success {
    background: #65a30d;
    color: white;
}

.icon-action-success:hover {
    background: #4d7c0f;
}

.icon-action-danger {
    background: rgb(225 29 72);
    color: white;
}

.icon-action-danger:hover {
    background: rgb(190 18 60);
}

.icon-action-whatsapp {
    background: #25d366;
    color: white;
}

.icon-action-whatsapp:hover {
    background: #1ebe5d;
}

.icon-action-edit {
    background: #f59e0b;
}

.icon-action-edit:hover {
    background: #d97706;
}

.icon-action-print {
    background: #64748b;
}

.icon-action-print:hover {
    background: #475569;
}

.icon-action-pdf {
    background: #2563eb;
}

.icon-action-pdf:hover {
    background: #1d4ed8;
}

.icon-action-pdf-withdrawal {
    background: #4f46e5;
}

.icon-action-pdf-withdrawal:hover {
    background: #4338ca;
}

.icon-action-pdf-return {
    background: #0d9488;
}

.icon-action-pdf-return:hover {
    background: #0f766e;
}

.icon-action-laudo {
    background: #7c3aed;
}

.icon-action-laudo:hover {
    background: #6d28d9;
}

.icon-action-receipt {
    background: #059669;
}

.icon-action-receipt:hover {
    background: #047857;
}

.icon-action-withdrawal {
    background: #ea580c;
}

.icon-action-withdrawal:hover {
    background: #c2410c;
}

.icon-action-return {
    background: #0891b2;
}

.icon-action-return:hover {
    background: #0e7490;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid rgb(226 232 240);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.data-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid rgb(226 232 240);
    padding: 0.9rem 1rem;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background: rgb(248 250 252);
    color: rgb(71 85 105);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: none;
    overflow-y: auto;
    background: rgba(15, 23, 42, 0.44);
    padding: 1rem;
}

.modal-backdrop.is-open {
    display: grid;
    place-items: start center;
}

.modal-panel {
    width: min(100%, 960px);
    margin-top: 2rem;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.24);
}

.pdf-template {
    position: fixed;
    left: -10000px;
    top: 0;
    width: 794px;
    min-height: 1123px;
    background: white;
    color: #111827;
    font-family: Arial, sans-serif;
    letter-spacing: 0;
}

.pdf-page {
    width: 794px;
    min-height: 1123px;
    padding: 44px;
    background: white;
}

.pdf-section {
    margin-top: 18px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    overflow: hidden;
}

.pdf-section-title {
    background: #f3f4f6;
    padding: 10px 14px;
    font-weight: 700;
    color: #111827;
}

.pdf-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.pdf-cell {
    border-top: 1px solid #e5e7eb;
    padding: 10px 14px;
    font-size: 13px;
}

.pdf-label {
    display: block;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
}

@media print {
    body * {
        visibility: hidden;
    }

    .print-area,
    .print-area * {
        visibility: visible;
    }
}
