/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 0.5px 1px rgba(0,0,0,0.05);
    max-width: 500px;
}

.form label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 0.82rem;
    color: #636366;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    font-size: 0.95rem;
    background: white;
    color: #1c1c1e;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.15);
}

.form textarea { resize: vertical; font-family: inherit; }

.form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238e8e93' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
    padding-right: 1.8rem;
    cursor: pointer;
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.modal-form { padding: 0; background: transparent; box-shadow: none; }
.detail-card-body:has(.modal-form) { background: white; border-radius: 0 0 14px 14px; }
.modal-form label { font-size: 0.78rem; color: #8e8e93; margin-bottom: 0.25rem; }
.modal-form .form-field > .ios-toggle { margin-top: 0.25rem; margin-bottom: 0; }
.modal-form .form-actions { margin-top: 1rem; }

.form-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.form-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1c1c1e;
    background: #fff;
}

.form-field input[type="date"] {
    height: 34px;
}

.form-field select:invalid {
    color: #c7c7cc;
}
.form-field select option { color: #1c1c1e; }
.form-field select option:disabled { color: #c7c7cc; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

.form-hint {
    margin: 0.3rem 0 0;
    font-size: 0.72rem;
    color: #8e8e93;
    line-height: 1.3;
}

/* ── Inline forms ──────────────────────────────────────────────────────────── */
.inline { display: inline; }

td select {
    padding: 0.25rem 1.3rem 0.25rem 0.4rem;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 7px;
    font-size: 0.82rem;
    background: white;
    color: #1c1c1e;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 10 6'%3E%3Cpath fill='%238e8e93' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.35rem center;
    cursor: pointer;
}
