

/* ===============================
        System form layout
   =============================== */

.sys-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}


/* 分兩欄 */
.form-row {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

/* 分欄 */
.row-column {
	display: flex;
    flex-direction: column;
	flex-wrap: wrap;
	gap: 30px;
}

/* 一般表單 */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
	display: flex;
	align-items: center;
	gap: 8px;
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.95rem;
	font-weight: 500;
}

.form-group label i {
	color: #00d9ff;
	font-size: 0.9rem;
}

.form-help {
	display: block;
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.8rem;
}

.form-actions {
	display: flex;
    justify-content: center;
	gap: 10px;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.required {
	color: var(--red);
}

/* ===============================
        System input layout
   =============================== */

.sys-input {
	width: 100%;
	background-color: rgba(15, 23, 42, 0.85);
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	padding: 10px 14px;
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.95rem;
	font-family: inherit;
	box-sizing: border-box;
	outline: none;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

input.sys-input {
	height: 44px;
	cursor: text;
}

textarea.sys-input {
	min-height: 80px;
	height: auto;
	line-height: 1.6;
	cursor: text;
}

select.sys-input {
	height: 44px;
	line-height: 24px;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338bdf8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px;
	padding-right: 38px;
	cursor: pointer;
}

.sys-input:focus {
	outline: none;
	border-color: #00d9ff;
	box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
}

/* 唯讀模式樣式 */
.sys-input:disabled,
select.sys-input:disabled {
	background-color: rgba(255, 255, 255, 0.02);
	cursor: default;
	border-color: rgba(255, 255, 255, 0.05);
	opacity: 0.8;
}

.sys-input:disabled:focus,
select.sys-input:disabled:focus {
	outline: none;
	border-color: rgba(255, 255, 255, 0.05);
}

/* 禁用狀態下隱藏下拉箭頭 */
select.sys-input:disabled {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background-image: none;
	pointer-events: none;
}


.sys-input.link {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	color: var(--accent);
	text-decoration: none;
	transition: all 0.3s;
	word-break: break-all;
}

.sys-input.link i {
	font-size: 0.85rem;
	opacity: 0.7;
	transition: all 0.3s;
}

.sys-input.link:hover i {
	opacity: 1;
	transform: translateX(2px);
}


/* ===============================
   表單錯誤訊息樣式
   =============================== */

.form-error {
	color: #ef4444;
	font-size: 0.875rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	animation: slideDown 0.3s ease;
}

.form-error::before {
	content: "⚠";
	font-size: 1rem;
}

.sys-input.error {
	border-color: #ef4444 !important;
	background-color: rgba(239, 68, 68, 0.05);
}

.sys-input.error:focus {
	border-color: #ef4444 !important;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}


@media (max-width: 992px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}