/* Minimal Preflight-equivalent reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "DM Sans", Sans-serif;
    background-color: #f7f9fc;
    line-height: inherit;
}

h1, h2, h3, h4, p {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

button, input, select {
    font-family: inherit;
    font-size: 100%;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    margin: 0;
    padding: 0;
}

button {
    cursor: pointer;
    background-color: transparent;
    background-image: none;
    text-transform: none;
}

table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
}

hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
}

/* Custom styles */
.card {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

#message-text {
    font-size: 16px;
}

input, select {
    border: 1px solid #e5e7eb;
    padding: 10px !important;
    border-radius: 0.375rem;
    background-color: white;
    transition: all 0.2s ease-in-out;
    color: #1f2937;
}

input:focus, select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    outline: none;
}

.btn-primary {
    padding: 12px 16px;
    border-radius: 6px;
    border: 1px solid #00ab82;
    background-color: #00ab82;
    font-weight: 600;
    color: #FFF;
    margin-top: 12px;
}

.btn-primary:hover {
    border: 1px solid #038364;
    background-color: #038364;
    color: #FFF;
}

.btn-secondary {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #242626;
    background-color: #242626;
    font-weight: 600;
    color: #FFF;
    margin-top: 12px;
}

.btn-secondary:hover {
    border: 1px solid #000000;
    background-color: #000000;
    color: #FFF;
}

.rezultat-simulare-credit {
    font-size: 48px;
    font-weight: 600;
    letter-spacing: 0px;
    color: #033C8D;
}

.results-table-container {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
}

.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px;
}

.results-table th:first-child,
.results-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: #f9fafb;
    border-right: 1px solid #e5e7eb;
    min-width: 200px;
}

.results-table th:not(:first-child),
.results-table td:not(:first-child) {
    min-width: 120px;
    white-space: nowrap;
}

.results-table thead th:first-child {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    z-index: 20;
}

.results-table tbody tr:hover td:first-child {
    background-color: #f3f4f6;
}

.results-table tbody td:first-child {
    z-index: 10;
}

@media (max-width: 768px) {
    .rezultat-simulare-credit {
        font-size: 40px;
    }

    .results-table-container {
        overflow-x: auto;
        overflow-y: visible;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .results-table {
        min-width: 100%;
    }

    .results-table th:first-child,
    .results-table td:first-child {
        position: static;
        background-color: transparent;
        border-right: none;
        min-width: 160px;
        max-width: 160px;
        width: 160px;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.4;
        font-size: 14px;
        z-index: auto;
    }

    .results-table th:not(:first-child),
    .results-table td:not(:first-child) {
        min-width: 100px;
        white-space: normal;
        word-wrap: break-word;
    }

    .results-table th,
    .results-table td {
        padding: 8px 12px;
        font-size: 14px;
    }

    .results-table thead th:first-child,
    .results-table tbody td:first-child {
        z-index: auto;
    }
}

input:disabled, select:disabled {
    background-color: #f3f4f6 !important;
    cursor: not-allowed;
    color: #6b7280;
}

/* Extracted Tailwind utilities */

/* Layout */
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.w-full {
    width: 100%;
}

.max-w-sm {
    max-width: 24rem;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-50 {
    z-index: 50;
}

.overflow-x-auto {
    overflow-x: auto;
}

/* Flex / Grid — hidden must come after flex/grid so both-class elements stay hidden */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-6 {
    gap: 1.5rem;
}

.hidden {
    display: none;
}

/* Spacing */
.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.pb-2 {
    padding-bottom: 0.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-10 {
    margin-bottom: 2.5rem;
}

.mb-14 {
    margin-bottom: 3.5rem;
}

.mt-5 {
    margin-top: 1.25rem;
}

.mt-10 {
    margin-top: 2.5rem;
}

.mt-16 {
    margin-top: 4rem;
}

.mt-20 {
    margin-top: 5rem;
}

/* Typography */
.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-md {
    font-size: 1rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.whitespace-nowrap {
    white-space: nowrap;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-800 {
    color: #1f2937;
}

.text-gray-900 {
    color: #111827;
}

.text-green-600 {
    color: #16a34a;
}

.text-red-600 {
    color: #dc2626;
}

/* Backgrounds */
.bg-white {
    background-color: #fff;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-gray-900 {
    --tw-bg-opacity: 1;
    background-color: rgb(17 24 39 / var(--tw-bg-opacity));
}

.bg-opacity-50 {
    --tw-bg-opacity: 0.5;
}

.bg-green-100 {
    background-color: #dcfce7;
}

.bg-blue-50\/50 {
    background-color: rgb(239 246 255 / 0.5);
}

/* Borders */
.border-b {
    border-bottom-width: 1px;
}

.border-b-2 {
    border-bottom-width: 2px;
}

.border-t-2 {
    border-top-width: 2px;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.border-blue-100 {
    border-color: #dbeafe;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.divide-y > :not([hidden]) ~ :not([hidden]) {
    border-top-width: 1px;
}

.divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
    border-color: #e5e7eb;
}

.divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
    border-color: #f3f4f6;
}

/* Effects */
.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-150 {
    transition-duration: 150ms;
}

.hover\:bg-gray-50:hover {
    background-color: #f9fafb;
}

/* Breakpoints: md = 768px, lg = 1024px */
@media (min-width: 768px) {
    .md\:p-10 {
        padding: 2.5rem;
    }

    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
