/* BASE STYLES & TAILWIND EMULATION */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
    margin: 0;
}

.main-container {
    background-color: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 750px;
    /* Adjusted max-width for 3 columns */
    margin: 32px auto;
}

.text-center {
    text-align: center;
}

.mb-6 {
    margin-bottom: 24px;
}

.text-3xl {
    font-size: 1.875rem;
}

.font-bold {
    font-weight: 700;
}

.text-gray-800 {
    color: #1f2937;
}

.text-gray-500 {
    color: #6b7280;
}

.mt-2 {
    margin-top: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

.text-xl {
    font-size: 1.25rem;
}

.font-semibold {
    font-weight: 600;
}

.text-gray-700 {
    color: #374151;
}

.space-y-4>div+div {
    margin-top: 16px;
}

.block {
    display: block;
}

.text-sm {
    font-size: 0.875rem;
}

.w-full {
    width: 100%;
}

.px-4 {
    padding-left: 16px;
    padding-right: 16px;
}

.py-2 {
    padding-top: 8px;
    padding-bottom: 8px;
}

.border {
    border-width: 1px;
    border-style: solid;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.rounded-lg {
    border-radius: 8px;
}

.focus\:outline-none:focus {
    outline: none;
}

.focus\:ring-2:focus {
    box-shadow: 0 0 0 2px var(--tw-ring-color);
    z-index: 10;
    position: relative;
}

.focus\:ring-indigo-500:focus {
    --tw-ring-color: #6366f1;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-1 {
    flex: 1 1 0%;
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* 3-COLUMN GRID STYLES */
.grid-container {
    display: grid;
    /* 3 Columns: Period, Nominal, Effective Period */
    grid-template-columns: 1fr minmax(0, 1.2fr) minmax(0, 1.2fr);
    gap: 1px;
    background-color: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.grid-header,
.grid-cell {
    padding: 12px;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.875rem;
}

.grid-header {
    background-color: #4f46e5;
    color: white;
    font-weight: 600;
}

.grid-row-label {
    background-color: #e0e7ff;
    color: #4f46e5;
    font-weight: 600;
    justify-content: flex-start;
    padding-left: 20px;
}

.grid-cell input {
    width: 100%;
    text-align: right;
    border: none;
    padding: 8px;
    background-color: transparent;
    font-weight: 500;
}

.future-value-section {
    display: flex;
    gap: 24px;
    align-items: flex-end;
}

.future-value-result {
    flex: 1;
    padding: 16px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
}

.time-horizon-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-horizon-group label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}