/* General Styles */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f4f7f6; margin: 0; color: #333; }
.btn { padding: 8px 15px; border: none; border-radius: 5px; cursor: pointer; font-size: 14px; text-decoration: none; display: inline-block; }
.btn-primary { background-color: #007bff; color: white; }
.btn-primary:hover { background-color: #0056b3; }
.btn-danger { background-color: #dc3545; color: white; }
.btn-danger:hover { background-color: #c82333; }
.form-group { margin-bottom: 15px; }
label { display: block; margin-bottom: 5px; font-weight: bold; }
input[type="text"], input[type="password"], input[type="number"], .form-control { width: calc(100% - 22px); padding: 8px 10px; border-radius: 5px; border: 1px solid #ccc; font-size: 14px; }
.is-invalid { border-color: #dc3545; }
.invalid-feedback { color: #dc3545; font-size: 12px; }
hr { border: 0; border-top: 1px solid #eee; margin: 20px 0; }

/* Login Page */
.login-wrapper { width: 360px; padding: 20px; margin: 100px auto; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.login-wrapper h2 { text-align: center; }
.login-wrapper .note { font-size: 12px; color: #777; text-align: center; margin-top: 10px; }
.alert-error { background-color: #f8d7da; color: #721c24; padding: 10px; border-radius: 5px; margin-bottom: 15px; }

/* Dashboard */
.header { background-color: white; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.header h1 { margin: 0; font-size: 24px; }
.header span { margin-right: 15px; }
.container { display: flex; padding: 20px; gap: 20px; }
.settings-panel { width: 400px; background: white; padding: 20px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); overflow-y: auto; max-height: 85vh; flex-shrink: 0; }
.preview-panel { flex-grow: 1; }
#preview_area {
    width: 100%;
    aspect-ratio: 1.414 / 1;
    border: 2px dashed #ccc;
    position: relative;
    background-color: #eee;
    overflow: hidden;
}
#bg_preview { width: 100%; height: 100%; object-fit: contain; }
#name_preview {
    position: absolute;
    white-space: nowrap;
    cursor: move;
    padding: 5px;
    border: 1px dotted #007bff;
    user-select: none;
    transform: translate(-50%, -50%);
}
.position-info { margin-top: 10px; font-size: 14px; color: #555; text-align: center; }
.font-controls { display: flex; gap: 10px; align-items: center; }
.font-controls input[type="number"] { width: 60px; }
.font-controls button { width: 30px; height: 30px; font-size: 16px; border: 1px solid #ccc; background-color: #f0f0f0; }
.font-controls button.active { background-color: #007bff; color: white; border-color: #007bff; }
.recipient-list { margin-top: 20px; }
#recipient_table_wrapper { max-height: 250px; overflow-y: auto; border: 1px solid #eee; margin-top: 10px; }
#recipient_table { width: 100%; border-collapse: collapse; }
#recipient_table td { padding: 8px; border-bottom: 1px solid #eee; vertical-align: middle; }
#recipient_table td.action-buttons { text-align: right; white-space: nowrap; }
#recipient_table tr:last-child td { border-bottom: none; }
.list-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.btn-print-single, .btn-delete-single { font-size: 12px; padding: 4px 8px; }
.btn-delete-single { margin-left: 5px; }