/* form-common.css - 表单 + 照片上传组件（惩戒档案 / 个人简介海报 共享）*/
.form-group {
    margin-bottom: 1.2rem;
}
.form-group label {
    display: block;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 6px;
    font-weight: bold;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--fg);
}
.form-group textarea {
    resize: vertical;
    min-height: 60px;
    line-height: 1.5;
}
.form-row {
    display: flex;
    gap: 12px;
}
.form-row .form-group {
    flex: 1;
}
/* 标签选择 */
.tag-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag-opt {
    padding: 6px 16px;
    border: 1.5px solid var(--light-border);
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    color: var(--muted);
    transition: all 0.2s;
    user-select: none;
    background: var(--bg);
}
.tag-opt:hover {
    border-color: var(--fg);
    color: var(--fg);
}
.tag-opt.selected {
    background: var(--fg);
    color: var(--bg);
    border-color: var(--fg);
    font-weight: bold;
}
.tag-opt.tag-add {
    border-style: dashed;
    color: var(--light-border);
    font-size: 18px;
    padding: 4px 14px;
}
.tag-opt.tag-add:hover {
    border-color: var(--fg);
    color: var(--fg);
}
/* 照片上传 */
.photo-upload-area {
    display: flex;
    gap: 10px;
}
.photo-slot {
    width: 100px;
    height: 100px;
    border: 2px dashed var(--light-border);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background: var(--hover-bg);
    transition: border-color 0.2s;
}
.photo-slot:hover {
    border-color: var(--fg);
}
.photo-slot.has-photo {
    border-style: solid;
    border-color: var(--fg);
}
.photo-slot .photo-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 28px;
    color: var(--light-border);
    pointer-events: none;
}
.photo-slot.has-photo .photo-placeholder {
    display: none;
}
.photo-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photo-slot .photo-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: none;
    z-index: 2;
}
.photo-slot.has-photo .photo-remove {
    display: block;
}
.photo-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}


@media (max-width: 480px) {
    .photo-slot { width: 80px; height: 80px; }
    .form-row { flex-direction: column; }
}
