﻿.st-rt-wrap {
    --st-blue: #0099ff;
    --st-blue-dark: #007acc;
    --st-bg: #f4f6f8;
    --st-card: #ffffff;
    --st-border: #d9e1e8;
    --st-text: #1f2933;
    --st-muted: #687782;
    --st-soft: #eef7ff;
    max-width: 1180px;
    margin: 28px auto;
    padding: 0 14px;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--st-text);
    box-sizing: border-box;
}
.st-rt-wrap * { box-sizing: border-box; }
.st-rt-box {
    background: var(--st-card);
    border: 1px solid var(--st-border);
    border-radius: 12px;
    padding: 26px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(31,41,51,0.06);
}
.st-rt-title {
    margin: 0 0 6px 0;
    font-size: 28px;
    line-height: 1.2;
    color: var(--st-text);
    letter-spacing: -0.3px;
}
.st-rt-subtitle {
    color: var(--st-muted);
    margin: 0 0 24px 0;
    font-size: 15px;
}
.st-rt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 18px;
    margin-top: 24px;
}
.st-rt-card {
    display: block;
    position: relative;
    min-height: 120px;
    padding: 24px 24px 22px 24px;
    border: 1px solid var(--st-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--st-text);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    transition: all .18s ease;
}
.st-rt-card:before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    bottom: 18px;
    width: 4px;
    background: var(--st-blue);
    border-radius: 0 4px 4px 0;
}
.st-rt-card:hover {
    transform: translateY(-1px);
    border-color: var(--st-blue);
    box-shadow: 0 10px 22px rgba(0,153,255,0.13);
}
.st-rt-card strong {
    display: block;
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--st-text);
}
.st-rt-card span { color: var(--st-muted); font-size: 14px; }
.st-rt-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}
.st-rt-field { margin-bottom: 17px; }
.st-rt-field label {
    display: block;
    font-weight: 700;
    margin-bottom: 7px;
    font-size: 14px;
    color: #2f3a44;
}
.st-rt-field input,
.st-rt-field textarea,
.st-rt-field select,
.st-rt-items-table input,
.st-rt-items-table textarea {
    width: 100%;
    max-width: 100%;
    padding: 11px 12px;
    border: 1px solid #c9d3dc;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    color: var(--st-text);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.st-rt-field input:focus,
.st-rt-field textarea:focus,
.st-rt-field select:focus,
.st-rt-items-table input:focus,
.st-rt-items-table textarea:focus {
    border-color: var(--st-blue);
    box-shadow: 0 0 0 3px rgba(0,153,255,0.12);
}
.st-rt-field textarea { min-height: 96px; }
.st-rt-button,
.st-rt-button-secondary,
.st-rt-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none !important;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    transition: all .15s ease;
    margin: 3px 4px 3px 0;
    white-space: nowrap;
}
.st-rt-button { background: var(--st-blue); color: #fff !important; }
.st-rt-button:hover { background: var(--st-blue-dark); color: #fff !important; }
.st-rt-button-secondary { background: #334155; color: #fff !important; }
.st-rt-button-secondary:hover { background: #1e293b; color: #fff !important; }
.st-rt-actions a {
    background: #eef2f6;
    color: #24313d !important;
    min-height: 30px;
    padding: 7px 10px;
    font-size: 12.5px;
    font-weight: 700;
}
.st-rt-actions a:hover { background: var(--st-soft); color: #005fa3 !important; }
.st-rt-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 18px;
    background: #fff;
    border: 1px solid var(--st-border);
    border-radius: 10px;
    overflow: hidden;
}
.st-rt-table th,
.st-rt-table td {
    padding: 12px 12px;
    border-bottom: 1px solid #e8edf2;
    text-align: left;
    vertical-align: top;
}
.st-rt-table th {
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.st-rt-table tr:last-child td { border-bottom: none; }
.st-rt-table tbody tr:hover td { background: #fbfdff; }
.st-rt-notice {
    padding: 13px 15px;
    background: #ecfdf3;
    border: 1px solid #bfe8ca;
    border-left: 5px solid #22c55e;
    border-radius: 8px;
    margin-bottom: 18px;
}
.st-rt-error {
    padding: 13px 15px;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-left: 5px solid #e11d48;
    border-radius: 8px;
    margin-bottom: 18px;
}
.st-rt-small { color: var(--st-muted); font-size: 13px; }
.st-rt-hint { color: var(--st-muted); font-size: 13px; margin-top: 6px; line-height: 1.35; }
.st-rt-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.st-rt-field {
    min-width: 0;
}

.st-rt-field input,
.st-rt-field select,
.st-rt-field textarea {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

.st-rt-field select {
    min-height: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    padding-right: 42px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: #fff;
}

.st-rt-field select option {
    font-size: 15px;
    line-height: 1.5;
    padding: 8px 10px;
}

.st-rt-customer-field {
    min-width: 0 !important;
}

@media (max-width: 1250px) {
    .st-rt-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .st-rt-form-grid {
        grid-template-columns: 1fr;
    }

    .st-rt-customer-field {
        min-width: 100% !important;
    }
}

.st-rt-wrap select {
    font-family: inherit;
}


.st-rt-intro-field {
    margin-top: 18px;
    margin-bottom: 24px;
}
.st-rt-intro-field textarea {
    min-height: 86px;
    resize: vertical;
}

.st-rt-items-table textarea { min-height: 68px; resize: vertical; }
.st-rt-items-table th:nth-child(1), .st-rt-items-table td:nth-child(1) { width: 42%; }
.st-rt-items-table th:nth-child(2), .st-rt-items-table td:nth-child(2) { width: 11%; }
.st-rt-items-table th:nth-child(3), .st-rt-items-table td:nth-child(3) { width: 11%; }
.st-rt-items-table th:nth-child(4), .st-rt-items-table td:nth-child(4) { width: 18%; }
.st-rt-items-table th:nth-child(5), .st-rt-items-table td:nth-child(5) { width: 18%; }
@media (max-width: 860px) {
    .st-rt-wrap { margin: 18px auto; padding: 0 10px; }
    .st-rt-box { padding: 18px; border-radius: 10px; }
    .st-rt-title { font-size: 24px; }
    .st-rt-items-table textarea { min-height: 80px; }
}

/* Querformat-Handy / kleine Tablets: Tabellen noch normal in einer Zeile lassen */
@media (max-width: 860px) and (min-width: 701px) {
    .st-rt-table th,
    .st-rt-table td {
        padding: 8px 10px;
        font-size: 14px;
        vertical-align: top;
    }

    .st-rt-action-select {
        min-width: 150px;
        max-width: 180px;
        font-size: 14px;
    }

    .st-rt-button,
    .st-rt-button-secondary {
        margin-bottom: 8px;
    }
}

/* Nur auf wirklich schmalen Handy-Breiten in Kartenansicht umschalten */
@media (max-width: 700px) {
    .st-rt-table, .st-rt-table thead, .st-rt-table tbody, .st-rt-table th, .st-rt-table td, .st-rt-table tr { display:block; width:100%; }
    .st-rt-table thead { display:none; }
    .st-rt-table tr { border-bottom: 1px solid #e8edf2; padding: 10px 0; }
    .st-rt-table td { border-bottom: 0; padding: 7px 12px; }
    .st-rt-actions a { width: auto; }
    .st-rt-action-select {
        min-width: 100%;
        max-width: 100%;
    }
}

