.days-between-calculator {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    box-sizing: border-box;
}

.days-between-calculator *,
.days-between-calculator *::before,
.days-between-calculator *::after {
    box-sizing: border-box;
}

.days-between-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 24px;
    align-items: start;
}

.days-between-layout > * {
    min-width: 0;
}

.days-between-card {
    width: 100%;
    min-width: 0;
    padding: 24px;
    border: 1px solid #dfe3e7;
    border-radius: 14px;
    background-color: #fff;
    box-shadow: 0 18px 42px -36px rgba(28, 37, 46, .48);
}

.days-between-card-title {
    margin: 0 0 18px;
    color: #2f3b46;
    font-size: 1.15em;
    font-weight: 900;
    line-height: 1.35;
}

.days-between-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.days-between-field,
.days-between-unit,
.days-between-link-box {
    min-width: 0;
}

.days-between-field .form-label,
.days-between-unit .form-label,
.days-between-link-box .form-label {
    display: block;
    margin: 0 0 7px;
    color: #667482;
    font-size: .86em;
    font-weight: 900;
    line-height: 1.35;
    text-transform: uppercase;
}

.days-between-field input,
.days-between-field select,
.days-between-unit input,
.days-between-unit select,
.days-between-link-row input,
.days-between-field .form-control,
.days-between-unit .form-control,
.days-between-link-row .form-control {
    display: block;
    width: 100%;
    height: 46px;
    border: 1px solid #dfe3e7;
    border-radius: 8px;
    padding: 0 14px;
    background-color: #fff;
    color: #273340;
    font-family: inherit;
    font-size: 15px;
    line-height: 46px;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.days-between-field input:focus,
.days-between-field select:focus,
.days-between-unit input:focus,
.days-between-unit select:focus,
.days-between-link-row input:focus,
.days-between-field .form-control:focus,
.days-between-unit .form-control:focus,
.days-between-link-row .form-control:focus {
    outline: none;
    border-color: rgba(255, 72, 91, .5);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 72, 91, .12);
}

.days-between-field input::placeholder,
.days-between-link-row input::placeholder {
    color: #a2a8ae;
}

.days-between-hint {
    min-height: 18px;
    margin-top: 6px;
    color: #94999e;
    font-size: 13px;
    line-height: 1.45;
}

.days-between-unit {
    margin-top: 16px;
}

.days-between-options {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.days-between-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid #dfe3e7;
    border-radius: 12px;
    background-color: #f8f9fb;
    cursor: pointer;
    user-select: none;
    transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.days-between-check:hover {
    border-color: rgba(255, 72, 91, .35);
    background-color: rgba(255, 72, 91, .06);
}

.days-between-check input {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--color-accent, #ff485b);
}

.days-between-check span {
    min-width: 0;
    color: #2f3b46;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.days-between-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.days-between-actions .btn,
.days-between-actions button,
.days-between-actions input[type="button"],
.days-between-actions input[type="submit"],
.days-between-link-row .btn,
.days-between-link-row button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--color-accent, #ff485b);
    border-radius: 8px;
    background-color: var(--color-accent, #ff485b);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}

.days-between-actions .btn:hover,
.days-between-actions button:hover,
.days-between-actions input[type="button"]:hover,
.days-between-actions input[type="submit"]:hover,
.days-between-link-row .btn:hover,
.days-between-link-row button:hover {
    border-color: var(--color-accent-dark, #e73b50);
    background-color: var(--color-accent-dark, #e73b50);
    color: #fff;
    text-decoration: none;
}

.days-between-actions .btn:active,
.days-between-actions button:active,
.days-between-actions input[type="button"]:active,
.days-between-actions input[type="submit"]:active,
.days-between-link-row .btn:active,
.days-between-link-row button:active {
    transform: translateY(1px);
}

.days-between-actions .btn:focus,
.days-between-actions button:focus,
.days-between-actions input[type="button"]:focus,
.days-between-actions input[type="submit"]:focus,
.days-between-link-row .btn:focus,
.days-between-link-row button:focus {
    outline: none;
}

.days-between-actions .btn:focus-visible,
.days-between-actions button:focus-visible,
.days-between-actions input[type="button"]:focus-visible,
.days-between-actions input[type="submit"]:focus-visible,
.days-between-link-row .btn:focus-visible,
.days-between-link-row button:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 72, 91, .14);
}

.days-between-actions .btn-secondary,
.days-between-actions .btn-light,
.days-between-actions .btn-outline-secondary,
.days-between-actions button[type="reset"],
.days-between-link-row .btn-secondary,
.days-between-link-row .btn-light,
.days-between-link-row .btn-outline-secondary {
    border-color: #dfe3e7;
    background-color: #f4f5f7;
    color: #667482;
}

.days-between-actions .btn-secondary:hover,
.days-between-actions .btn-light:hover,
.days-between-actions .btn-outline-secondary:hover,
.days-between-actions button[type="reset"]:hover,
.days-between-link-row .btn-secondary:hover,
.days-between-link-row .btn-light:hover,
.days-between-link-row .btn-outline-secondary:hover {
    border-color: rgba(255, 72, 91, .42);
    background-color: rgba(255, 72, 91, .08);
    color: var(--color-accent, #ff485b);
}

.days-between-error {
    min-height: 20px;
    margin-top: 12px;
    color: var(--color-accent-dark, #e73b50);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.days-between-main-result {
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid rgba(255, 72, 91, .18);
    border-radius: 12px;
    background-color: rgba(255, 72, 91, .07);
    color: #2f3b46;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.35;
}

.days-between-result-list {
    overflow: hidden;
    border: 1px solid #dfe3e7;
    border-radius: 12px;
    background-color: #fff;
}

.days-between-result-row {
    display: grid;
    grid-template-columns: minmax(130px, .8fr) minmax(0, 1.2fr);
    gap: 14px;
    align-items: center;
    padding: 13px 15px;
    border-bottom: 1px solid #eceded;
    background-color: #fff;
}

.days-between-result-row:last-child {
    border-bottom: 0;
}

.days-between-result-row span {
    min-width: 0;
    color: #667482;
    font-size: 14px;
    line-height: 1.45;
}

.days-between-result-row strong {
    min-width: 0;
    color: #222c38;
    font-size: 15px;
    font-weight: 900;
    line-height: 1.45;
    text-align: right;
    word-break: break-word;
}

.days-between-result-row-main {
    background-color: #f8f9fb;
}

.days-between-result-row-main span,
.days-between-result-row-main strong {
    color: #2f3b46;
}

.days-between-result-row-main strong {
    font-size: 18px;
}

.days-between-formula {
    margin-top: 14px;
    padding: 15px 16px;
    border: 1px solid #dfe3e7;
    border-radius: 12px;
    background-color: #f8f9fb;
    color: #4f5965;
    font-size: 14px;
    line-height: 1.6;
}

.days-between-formula strong,
.days-between-formula b {
    color: #2f3b46;
    font-weight: 900;
}

.days-between-link-box {
    margin-top: 16px;
}

.days-between-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

@media (max-width: 991px) {
    .days-between-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .days-between-card {
        padding: 18px;
        border-radius: 12px;
    }

    .days-between-card-title {
        margin-bottom: 16px;
        font-size: 1.08em;
    }

    .days-between-fields {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .days-between-field input,
    .days-between-field select,
    .days-between-unit input,
    .days-between-unit select,
    .days-between-link-row input,
    .days-between-field .form-control,
    .days-between-unit .form-control,
    .days-between-link-row .form-control {
        height: 44px;
        border-radius: 7px;
        font-size: 14px;
        line-height: 44px;
    }

    .days-between-result-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px 14px;
    }

    .days-between-result-row strong {
        text-align: left;
    }
}

@media (max-width: 575px) {
    .days-between-calculator {
        max-width: 100%;
    }

    .days-between-card {
        padding: 16px;
    }

    .days-between-main-result {
        padding: 16px;
        font-size: 20px;
    }

    .days-between-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .days-between-actions .btn,
    .days-between-actions button,
    .days-between-actions input[type="button"],
    .days-between-actions input[type="submit"] {
        width: 100%;
    }

    .days-between-link-row {
        grid-template-columns: 1fr;
    }

    .days-between-link-row .btn,
    .days-between-link-row button {
        width: 100%;
    }

    .days-between-formula {
        padding: 14px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .days-between-card {
        padding: 14px;
    }

    .days-between-main-result {
        font-size: 18px;
    }

    .days-between-check {
        padding: 11px 12px;
    }

    .days-between-check span {
        font-size: 13px;
    }
}